/* ── [TK-CLEANUP] TeamMessage Event Modal (vereinheitlicht mit todo-modal.css) ── */
:root {
    --tm-surface: #fff;
    --tm-border: #e2e8f0;
    --tm-radius: 8px;
    --tm-transition: 0.15s ease;
    --tm-text-muted: #6b7280;
    --tm-accent: #0056b3;
}

#ter-kal-tm-event-modal { position: fixed; inset: 0; z-index: 100100; display: flex; align-items: center; justify-content: center; transform: translateZ(0); isolation: isolate; }
#ter-kal-tm-event-modal[hidden] { display: none; }

/* Gemeinsame .ter-kal-tem-* Dialog-Basis (identisch zu todo-modal.css, falls To-Do-Modul pausiert ist) */
.ter-kal-tem-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); cursor: pointer; z-index: 0; }
.ter-kal-tem-dialog { position: relative; z-index: 1; background: var(--tm-surface); border-radius: var(--tm-radius); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18); width: min(540px, 94vw); max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; }
.ter-kal-tem-prio-stripe { height: 4px; border-radius: var(--tm-radius) var(--tm-radius) 0 0; width: 100%; }
#ter-kal-tm-event-modal .ter-kal-tem-prio-stripe { background: var(--tm-accent); }
.ter-kal-tem-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; border-bottom: 1px solid var(--tm-border); gap: 8px; }
.ter-kal-tem-title { font-size: 1.05rem; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 7px; }
#ter-kal-tm-event-modal .ter-kal-tem-title .dashicons,
#ter-kal-tm-event-modal .ter-kal-tem-title .termin-kalender-icon { color: var(--tm-accent); }
.ter-kal-tem-close { background: none; border: none; cursor: pointer; padding: 4px; border-radius: 4px; color: var(--tm-text-muted); line-height: 1; transition: color var(--tm-transition); }
.ter-kal-tem-close:hover { color: #111; }
.ter-kal-tem-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.ter-kal-tem-view-row { display: flex; flex-direction: column; gap: 2px; }
.ter-kal-tem-view-label { font-size: 0.75rem; color: var(--tm-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.ter-kal-tem-view-value { font-size: 0.95rem; }
.ter-kal-tem-view-value a { color: var(--tm-accent); text-decoration: none; }
.ter-kal-tem-view-value a:hover { text-decoration: underline; }
.ter-kal-tem-body .ter-kal-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ter-kal-tem-body .tk-location-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ter-kal-tem-body .tk-location-btns--inline { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ter-kal-tem-body .tk-map-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 3px; border: 1px solid #c3c4c7; background: #f6f7f7; color: #3c434a; font-size: 12px; font-weight: 500; text-decoration: none; line-height: 1.4; transition: all 0.2s ease; }
.ter-kal-tem-body .tk-map-chip:hover { background: #2271b1; border-color: #2271b1; color: #ffffff; }
@media (max-width: 480px) { .ter-kal-tem-body .ter-kal-field-row { grid-template-columns: 1fr; } }
.ter-kal-tem-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; padding: 12px 20px 16px; border-top: 1px solid var(--tm-border); }

/* ── [TK-SHARE] Share Button im Modal (Popup-Styling zentral in termin_kalender.css) ── */
.ter-kal-tem-share-btn { display: inline-flex; align-items: center; gap: 5px; margin-right: auto; }
.ter-kal-tem-share-btn .dashicons,
.ter-kal-tem-share-btn .termin-kalender-icon { font-size: 16px; width: 16px; height: 16px; line-height: 1; }

/* ── [TK-TEAMMESSAGE-REPLY] Antworten & Direkt-Antwort im TeamMessage-Modal ── */
#tk-tm-modal-replies-section { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--tm-border); display: flex; flex-direction: column; gap: 8px; }
#tk-tm-modal-replies-section[hidden] { display: none; }
.tk-tm-replies-wrap { padding: 10px 12px; background: #f8fafc; border-left: 3px solid #cbd5e1; border-radius: 0 8px 8px 0; display: flex; flex-direction: column; gap: 8px; }
.tk-tm-reply-item { font-size: 12.5px; color: #1e293b; line-height: 1.45; }
.tk-tm-reply-author { color: #2271b1; }
.tk-tm-reply-meta { font-size: 11px; color: #64748b; margin-left: 6px; }
.tk-tm-reply-text { margin-top: 2px; }
.tk-tm-reply-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tk-tm-reply-form input[type="text"] { flex: 1 1 220px; min-height: 32px; padding: 4px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; box-sizing: border-box; }
.tk-tm-reply-feedback { flex-basis: 100%; font-size: 12px; color: #dc2626; }
.tk-tm-reply-feedback[hidden] { display: none; }

/* ── TeamMessage Marker im FullCalendar ─────────────────────────────────── */
.fc-event.ter-kal-is-teammessage:not(.fc-list-event) { background-color: var(--tm-accent) !important; border-color: var(--tm-accent) !important; color: #fff !important; }
.ter-kal-is-teammessage span.time_text { font-size: 0 !important; display: inline-flex; align-items: center; }
.ter-kal-is-teammessage span.time_text::before { content: '\f101'; font-family: dashicons; font-size: 16px; margin-right: 3px; }
.ter-kal-is-teammessage span.time_text::after { content: 'Meeting'; font-size: 11px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
