/* VDG Mitgliederbereich – Welt B
   Optik: Termine & Kalender (#/termine), Schritt 4m - Formular "Termin anlegen", Ansicht der
   Geschaeftsstelle, Tages-Angaben, "Die nächsten Veranstaltungen". */

#page-termine .tm-viewbar.is-intern{background:#eaf0f7;border-color:#c3d3e4}
#page-termine .source-pill.is-intern.active{background:#244e6e;border-color:#244e6e}
#page-termine .event-source-actions{display:flex;gap:8px;flex-wrap:wrap}
#page-termine .tm-adminbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:0 0 18px;padding:12px 16px;background:#fff;border:1px solid var(--line);border-radius:14px}
#page-termine .tm-adminbar span{color:var(--muted);font-size:15px;flex:1 1 300px}

/* Kalender */
#page-termine .tm-calendar{margin-bottom:16px}
#page-termine .calendar-toolbar{display:flex;align-items:center;justify-content:flex-start;gap:10px;flex-wrap:wrap}
#page-termine .calendar-toolbar h2{flex:0 0 auto;margin:0 4px;min-width:170px;text-align:center}
#page-termine .tm-monthcount{color:var(--muted);font-weight:700;font-size:15px;margin-left:4px}
#page-termine .calendar-toolbar .today-btn{margin-left:auto}
#page-termine .day{min-height:92px}
#page-termine .day.event-day{cursor:pointer}
#page-termine .day.event-day:hover{border-color:#8fc97c;background:#fafdfa}
#page-termine .day.is-open{border-color:#1c5027;box-shadow:inset 0 0 0 2px #1c5027}
#page-termine .day-event{display:block;width:100%;text-align:left;font:inherit;font-size:13.5px;border:0;cursor:pointer}
#page-termine .day-event.is-intern{background:#e3ecf5;color:#1d3f5a;border-left:3px solid #244e6e}
#page-termine .day-event.is-booked{background:#1c5027;color:#fff}
#page-termine .day-dots{display:none;gap:3px;margin-top:auto}
#page-termine .day-dots i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#58ad3f}
#page-termine .day-dots i.is-intern{background:#244e6e}
#page-termine .day-dots i.is-booked{background:#1c5027}
#page-termine .tm-legend{display:flex;gap:6px 16px;flex-wrap:wrap;align-items:center;margin:12px 0 0;font-size:14px;color:#3b5550}
#page-termine .tm-legend i{display:inline-block;width:14px;height:10px;border-radius:3px;margin-right:-8px}
#page-termine .tm-legend i.is-member{background:#eef8ef;border:1px solid #b9d9b0}
#page-termine .tm-legend i.is-intern{background:#e3ecf5;border-left:3px solid #244e6e}
#page-termine .tm-legend i.is-booked{background:#1c5027}

/* Angaben zu einem Tag */
#page-termine .tm-daypanel{margin:-4px 0 18px;border:2px solid #1c5027}
#page-termine .tm-daypanel-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}
#page-termine .tm-daypanel-head h3{margin:0;font-size:19px}
#page-termine .close{font:inherit;font-size:24px;line-height:1;border:0;background:transparent;cursor:pointer;color:var(--muted);padding:2px 8px}

/* Ein Termin */
#page-termine .tm-list{display:grid;gap:10px}
#page-termine .tm-event{display:grid;grid-template-columns:72px minmax(0,1fr);gap:16px;padding:14px 16px;background:#fff;border:1px solid var(--line);border-radius:14px}
#page-termine .tm-daypanel .tm-event{border-color:#e3ece5;padding:12px 0;border-width:0 0 1px;border-radius:0}
#page-termine .tm-daypanel .tm-event:last-child{border-bottom:0}
#page-termine .tm-event.is-intern{border-left:4px solid #244e6e}
#page-termine .tm-event.is-past{opacity:.72}
#page-termine .tm-datebox{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#eef8e9;border-radius:12px;padding:8px 4px;align-self:start;color:#1c5027;line-height:1.1}
#page-termine .tm-event.is-intern .tm-datebox{background:#e3ecf5;color:#1d3f5a}
#page-termine .tm-datebox b{font-size:26px}
#page-termine .tm-datebox span{font-size:14px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
#page-termine .tm-datebox small{font-size:12.5px;color:var(--muted)}
#page-termine .tm-event-main{min-width:0}
#page-termine .tm-event-main h3{margin:4px 0 4px;font-size:19px;letter-spacing:-.02em}
#page-termine .tm-event-tags{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
#page-termine .tag-intern{background:#e3ecf5;color:#1d3f5a}
#page-termine .tag-reg{background:#f3f0e4;color:#5c4a10}
#page-termine .tm-event-meta{color:#3b5550;font-size:15.5px}
#page-termine .tm-event-text{margin:8px 0 0;font-size:15.5px;line-height:1.5;white-space:pre-line}
#page-termine .tm-event-text.is-clamped{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
#page-termine .tm-event-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:10px}
#page-termine .tm-event-actions .btn{text-decoration:none}
#page-termine .tm-admin{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px;padding-top:10px;border-top:1px dashed var(--line)}

#page-termine .tm-upcoming{margin:8px 0 24px}
#page-termine .tm-upcoming .section-title h2{margin:0;font-size:24px;letter-spacing:-.03em}
#page-termine .tm-more{margin-top:12px}
#page-termine .tm-past{margin-top:18px}
#page-termine .tm-past summary{cursor:pointer;font-weight:800;color:var(--leaf);font-size:16px;margin-bottom:10px}

/* Formular */
.tm-modal-back{position:fixed;inset:0;z-index:900;background:rgba(20,44,42,.45);display:flex;align-items:flex-start;justify-content:center;padding:24px 12px;overflow:auto}
.tm-modal{background:#fff;border-radius:18px;width:min(760px,100%);padding:22px 24px;box-shadow:0 24px 60px rgba(0,0,0,.25);display:grid;gap:12px;box-sizing:border-box}
.tm-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.tm-modal-head h2{margin:4px 0 0;font-size:24px;letter-spacing:-.03em}
.tm-modal .close{font:inherit;font-size:26px;line-height:1;border:0;background:transparent;cursor:pointer;color:var(--muted)}
.tm-field{display:flex;flex-direction:column;gap:4px;font-size:15px;min-width:0}
.tm-field > span{font-weight:800;color:#23413c;font-size:14.5px}
.tm-field input,.tm-field textarea,.tm-field select{font:inherit;font-size:16px;padding:9px 11px;border:1px solid var(--line);border-radius:9px;min-width:0;width:100%;box-sizing:border-box;background:#fff;color:var(--ink)}
.tm-field textarea{resize:vertical;line-height:1.45}
.tm-fs{border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:0;display:grid;gap:10px;min-width:0}
.tm-fs legend{font-weight:900;font-size:15.5px;color:#1c5027;padding:0 6px}
.tm-grid4{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,.8fr) minmax(0,1.3fr) minmax(0,.8fr);gap:10px}
.tm-hint{margin:0;color:var(--muted);font-size:14px}
.tm-radios{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tm-radio{display:flex;gap:10px;align-items:flex-start;padding:9px 11px;border:1px solid var(--line);border-radius:10px;cursor:pointer;font-size:15px}
.tm-radio:has(input:checked){border-color:#1c5027;background:#f1f8ee}
.tm-radio.is-intern:has(input:checked){border-color:#244e6e;background:#eaf0f7}
.tm-radio input{margin-top:3px;width:18px;height:18px;accent-color:#1c5027;flex:0 0 auto}
.tm-radio span{display:flex;flex-direction:column}
.tm-radio small{color:var(--muted);font-size:13.5px}
.tm-sub{display:flex;flex-wrap:wrap;gap:6px 16px;padding:8px 12px;background:#f7faf5;border-radius:10px;font-size:15px}
.tm-sub label{display:flex;gap:6px;align-items:center;cursor:pointer}
.tm-sub .tm-field{flex:1 1 100%}
.tm-segs{display:inline-flex;flex-wrap:wrap;border:1px solid #1c5027;border-radius:10px;overflow:hidden;align-self:flex-start}
.tm-seg{position:relative;cursor:pointer}
.tm-seg input{position:absolute;opacity:0;pointer-events:none}
.tm-seg span{display:block;padding:8px 16px;font-weight:800;font-size:15px;color:#1c5027}
.tm-seg + .tm-seg span{border-left:1px solid #1c5027}
.tm-seg input:checked + span{background:#1c5027;color:#fff}
.tm-seg input:focus-visible + span{outline:3px solid #58ad3f;outline-offset:-3px}
.tm-check{display:flex;gap:8px;align-items:center;font-size:15.5px;font-weight:700;cursor:pointer}
.tm-check input{width:18px;height:18px;accent-color:#1c5027}
.tm-modal-foot{display:flex;gap:10px;flex-wrap:wrap;align-items:center;border-top:1px solid var(--line);padding-top:12px}

#page-termine .weekdays b{font:inherit}
#page-termine .weekdays .wd-s{display:none}
/* Schritt 4m-2: Uhrzeit im Kalender, Teaserbild */
#page-termine .day-time{font-weight:900}
#page-termine .tm-event.has-img{grid-template-columns:72px minmax(0,1fr) auto}
/* Einheitlicher Rahmen für alle Terminbilder (5a-2) */
.tm-img{margin:0;width:200px;max-width:100%;aspect-ratio:1 / 1;border-radius:12px;overflow:hidden;background:#eef1ef;align-self:start}
.tm-img img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 30%}
.tm-imgedit{display:grid;grid-template-columns:auto minmax(0,1fr);gap:16px;align-items:start}
.tm-imgprev{max-width:min(420px,50vw)}
.tm-imgprev .tm-img{max-width:100%}
.tm-noimg{width:200px;aspect-ratio:16 / 10;display:flex;align-items:center;justify-content:center;background:#f4f7f4;border:1px dashed var(--line);border-radius:12px;color:var(--muted);font-size:14px}
.tm-imgctl{display:grid;gap:10px;min-width:0}
.tm-imgctl input[type=range]{padding:0;border:0;accent-color:#1c5027}
.tm-imgctl output{font-weight:700;color:var(--muted);margin-left:6px}
@media (max-width:1000px){
  #page-termine .tm-event.has-img{grid-template-columns:72px minmax(0,1fr) 160px}
  #page-termine .tm-event .tm-img{width:160px}
}
@media (max-width:900px){
  #page-termine .weekdays .wd-l{display:none}
  #page-termine .weekdays .wd-s{display:inline}
  #page-termine .day{min-height:58px}
  #page-termine .day-event,#page-termine .day-more{display:none}
  #page-termine .day-dots{display:flex}
}
@media (max-width:720px){
  #page-termine .tm-event{grid-template-columns:56px minmax(0,1fr);gap:12px;padding:12px}
  #page-termine .tm-datebox b{font-size:21px}
  #page-termine .tm-event.has-img{grid-template-columns:56px minmax(0,1fr)}
  #page-termine .tm-event .tm-img{grid-column:1 / -1;grid-row:auto;justify-self:start;width:100%;max-width:320px}
  .tm-imgedit{grid-template-columns:minmax(0,1fr)}
  .tm-imgprev{max-width:100%}
  #page-termine .calendar-toolbar .today-btn{margin-left:0}
  .tm-modal{padding:16px}
  .tm-grid4{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .tm-radios{grid-template-columns:minmax(0,1fr)}
  .tm-seg span{padding:8px 11px}
}

/* Schritt 12m: Newsletter-Beitrag als Vorlage (Terminformular) */
.tm-form .tm-nltpl{padding:10px 12px;border:1px dashed #b9d39c;border-radius:12px;background:#f6faf1}
.tm-form .tm-nltpl .tm-hint{display:block;margin-top:4px}

/* Schritt 12v: öffentliche Termine (Website) */
.tm-radio.is-public:has(input:checked){border-color:#5a8f3c;background:#eef6e4}
.wk-ov{position:fixed;inset:0;background:rgba(15,25,20,.55);z-index:900;display:flex;align-items:flex-start;justify-content:center;padding:4vh 16px;overflow:auto}
.wk-dlg{background:#fff;border-radius:16px;max-width:980px;width:100%;padding:24px 28px 28px;box-shadow:0 24px 70px rgba(0,0,0,.3);position:relative}
.wk-dlg h2{margin:0 0 6px}
.wk-x{position:absolute;top:12px;right:14px;border:0;background:#f1f4ef;width:36px;height:36px;border-radius:50%;font-size:22px;cursor:pointer}
.wk-sec{border:1px solid #e1e6dd;border-radius:12px;padding:16px 18px;margin:14px 0}
.wk-sec h3{margin:0 0 6px;font-size:17px}
.wk-code{display:block;white-space:pre-wrap;word-break:break-all;background:#f6f8f4;border:1px solid #e1e6dd;border-radius:8px;padding:10px 12px;font:13px/1.5 ui-monospace,Consolas,monospace;margin:8px 0}
.wk-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.wk-prev{width:100%;height:560px;border:1px solid #e1e6dd;border-radius:8px;background:#fff}
.wk-muted{color:#5b6670;font-size:14px}
.wk-list{margin:6px 0 0;padding-left:18px;font-size:14px}
