/* ============================================================
   THR Kalender – Frontend  v2.0
   Nur Kalender-spezifisches Layout.
   Farben, Links, Hover → alles vom Template.
   ============================================================ */

/* ---- Design-Tokens ---- */
.show_thr_calendar {
  --thr-accent:      #cdc2b6;
  --thr-accent-dark: #9e8d7b;
  --thr-border:      #e5e7eb;
  --thr-bg:          #ffffff;
  --thr-bg-soft:     #f9fafb;
  --thr-row-alt:     #f8fafc;
  --thr-muted:       #6b7280;
  --thr-shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --thr-radius:      10px;
  --thr-radius-sm:   6px;
  --thr-transition:  .15s ease;

  margin-bottom: 28px;
  min-width: 260px;
  line-height: 1.5;
}

/* ============================================================
   Mini-/Monatskalender
   ============================================================ */
.thr_calendarmod {
  border-collapse: separate;
  border-spacing: 3px;
  background: transparent;
  width: 100%;
  font-size: 13px;
  border: none;
}
.thr_calendarmod a { text-decoration: none; display: block; }
.thr_calendarmod td {
  height: 36px;
  text-align: center;
  line-height: 36px;
  border: 1px solid var(--thr-border);
  border-radius: var(--thr-radius-sm);
  background: var(--thr-bg);
}

.arrows { float: left; width: 50%; }

tr.thr_calendarmod-header td {
  text-align: center;
  font-weight: 700;
  background: var(--thr-accent);
  border-radius: var(--thr-radius-sm);
  border-color: var(--thr-accent-dark);
}
tr.thr_calendarmod-header td a {
  display: block;
  height: 36px;
  line-height: 36px;
  font-size: 26px;
  font-weight: 700;
  color: #ffffff !important;
}

td.thr_calendar_weekday {
  background: var(--thr-accent-dark);
  width: 14%;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-color: transparent;
}
td.thr_calendar_markday {
  background: var(--thr-accent);
  font-weight: 700;
  cursor: pointer;
  border-color: var(--thr-accent-dark);
}
td.thr_calendar_markday:hover { background: var(--thr-accent-dark); }
td.thr_calendar_noday { background: var(--thr-bg-soft); border-color: transparent; }
td.procal_today { outline: 2px solid var(--thr-accent-dark); outline-offset: -2px; font-weight: 700; }

/* ============================================================
   Detailansicht
   ============================================================ */
.event_details { min-height: 200px; }

.info_block {
  border: 1px solid var(--thr-border);
  border-radius: var(--thr-radius);
  padding: 18px 20px;
  box-shadow: var(--thr-shadow-sm);
}
.info_block .field_line { width: 100%; clear: both; line-height: 1.5; margin-bottom: 10px; }
.info_block .field_title {
  width: 100%;
  font-weight: 600;
  color: var(--thr-muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 0 0 2px;
}

/* ============================================================
   Übersichtsliste
   ============================================================ */
.actionlist { min-height: auto; min-width: 260px; }

.actionlist_headernav { margin: 4px 0 16px; }
.actionlist_headernav h2 { padding: 0 !important; margin: 0 !important; font-size: 20px; font-weight: 700; }
.actionlist_headernav td.arrow_left  { padding: 4px 0 0; font-size: 13px; text-align: left; }
.actionlist_headernav td.arrow_right { padding: 4px 0 0; font-size: 13px; text-align: right; }

a.go_back { display: inline-flex; align-items: center; gap: 4px; margin-top: 16px; font-weight: 600; font-size: 13px; }

.actionlist_table {
  width: 100%;
  font-size: 13.5px;
  border: 1px solid var(--thr-border);
  border-radius: var(--thr-radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: var(--thr-bg);
  box-shadow: var(--thr-shadow-sm);
}

.actionlist_header { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.actionlist_header td {
  background: var(--thr-bg-soft) !important;
  border-bottom: 2px solid var(--thr-border) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--thr-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
}

.actionlist td { padding: 10px 14px; vertical-align: top; border-bottom: 1px solid var(--thr-border); }
.actionlist tr:last-child td { border-bottom: none; }
.actionlist tr { background: var(--thr-bg); }
.actionlist tr:nth-child(even) { background: var(--thr-row-alt); }

.actionlist_date { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.actionlist_time { white-space: nowrap; color: var(--thr-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.actionlist_name { word-break: break-word; font-weight: 500; }
.actionlist_custom { font-size: 13px; }
.actionlist_actiontype { white-space: nowrap; font-size: 11.5px; font-weight: 600; }
.actionlist tr td.actionlist_actiontype { vertical-align: middle; }

.float_right { float: right; }

/* ============================================================
   Mini-JS-Tropfen-Kalender
   ============================================================ */
table.inner { border-collapse: collapse; }
table.inner td { border: 1px solid var(--thr-border); padding: 4px; }
table.inner .event { font-weight: 600; }

/* ============================================================
   Responsive: Tabelle → Karten ab 640 px
   ============================================================ */
@media (max-width: 640px) {
  .actionlist_headernav table,
  .actionlist_headernav tr { display: flex; width: 100%; align-items: center; }
  .actionlist_headernav td { display: block; }
  .actionlist_headernav td.arrow_left  { flex: 0 0 auto; padding: 0; font-size: 12px; max-width: 32%; }
  .actionlist_headernav td.arrow_right { flex: 0 0 auto; padding: 0; font-size: 12px; max-width: 32%; }
  .actionlist_headernav td[align="center"] { flex: 1 1 auto; min-width: 0; }
  .actionlist_headernav td[align="center"] h2 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .actionlist_table,
  .actionlist_table thead,
  .actionlist_table tbody { display: block; width: 100%; }
  .actionlist_table { border: none; background: transparent; box-shadow: none; }
  .actionlist_table tr.actionlist_header { display: none !important; }

  .actionlist_table tr {
    display: flex;
    flex-direction: column;
    background: var(--thr-bg);
    border: 1px solid var(--thr-border);
    border-radius: var(--thr-radius);
    margin-bottom: 12px;
    padding: 14px 16px;
    box-shadow: var(--thr-shadow-sm);
    position: relative;
  }
  .actionlist_table td { display: block; width: 100%; }
  .actionlist tr:hover, .actionlist tr:nth-child(even) { background: var(--thr-bg); }
  .actionlist td { border-bottom: none; padding: 3px 0; line-height: 1.4; }

  .actionlist_name {
    order: -1;
    font-size: 16px;
    font-weight: 700;
    padding-bottom: 8px !important;
    padding-right: 72px !important;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--thr-border);
    display: block;
  }

  .actionlist_table td.actionlist_actiontype {
    position: absolute;
    top: 14px;
    right: 14px;
    width: auto;
    max-width: 55%;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .actionlist_actiontype::before { content: none !important; }
  .actionlist_actiontype:empty { display: none; }

  .actionlist_date::before,
  .actionlist_time::before,
  .actionlist_custom::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--thr-muted);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .05em;
  }
  .actionlist_date, .actionlist_time, .actionlist_custom { font-size: 13.5px; }
  .actionlist_table td.actionlist_date,
  .actionlist_table td.actionlist_time { display: inline-block; margin-right: 14px; }

  .thr_calendarmod td { height: 38px; line-height: 38px; font-size: 13px; }
  tr.thr_calendarmod-header td { height: 48px; }
  tr.thr_calendarmod-header td a { display: block; height: 48px; line-height: 48px; font-size: 26px; text-align: center; }
  tr.thr_calendarmod-header td.cal-arrow { width: 44px; }
  tr.thr_calendarmod-header td span { display: none; }
}
