/* ═══════════════════════════════════════════════════════════════════════════
   LT Schließzeiten – Frontend Calendar Widget CSS
   Farben: #4C9900 (Schließzeit/Grün) · #FFFF99 (Weiterbildung/Gelb)
   ═══════════════════════════════════════════════════════════════════════════ */

.lt-sch-calendar-widget {
    /* ── Anpassbare CSS-Variablen ── */
    --lt-fe-s:        #4C9900;   /* Schließzeit – Praxisgrün              */
    --lt-fe-s-bg:     #eef7e6;   /* Zellhintergrund Schließzeit           */
    --lt-fe-w:        #FFFF99;   /* Weiterbildung – Praxisgelb            */
    --lt-fe-w-border: #b8b800;   /* Gelb-Randfarbe für Dots (Kontrast)    */
    --lt-fe-w-bg:     #fffde7;   /* Zellhintergrund Weiterbildung         */
    --lt-fe-nav:      #4C9900;   /* Navigationsleiste                     */
    --lt-fe-bg:       #ffffff;   /* Kalender-Hintergrund                  */
    --lt-fe-border:   #cfe0bf;   /* Rahmenlinien                          */
    --lt-fe-text:     #1e293b;   /* Haupttextfarbe                        */
    --lt-fe-muted:    #64748b;   /* Dezenter Text                         */
    --lt-fe-today:    #4C9900;   /* Heute-Hervorhebung                    */
    --lt-fe-r:        10px;      /* Eckradius                             */

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    width: 100%;
    max-width: 100%;
}

/* ── Widget-Titel ─────────────────────────────────────────────────────────── */
.lt-fe-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--lt-fe-text);
    margin: 0 0 14px;
    line-height: 1.3;
}

/* ── Kalender-Wrapper ─────────────────────────────────────────────────────── */
.lt-fe-cal {
    background: var(--lt-fe-bg);
    border: 1px solid var(--lt-fe-border);
    border-radius: var(--lt-fe-r);
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(76,153,0,.10), 0 1px 4px rgba(0,0,0,.05);
}

/* ── Navigation ───────────────────────────────────────────────────────────── */
.lt-fe-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--lt-fe-nav) 0%, #3d7a00 100%);
    gap: 10px;
}

.lt-fe-nav-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border: 1.5px solid rgba(255,255,255,.35);
    background: rgba(255,255,255,.12);
    color: #fff;
    border-radius: 9px;
    font-size: 26px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s;
    padding: 0;
}
.lt-fe-nav-btn:hover { background: rgba(255,255,255,.28); }
.lt-fe-nav-btn:focus { outline: 2px solid rgba(255,255,255,.55); outline-offset: 1px; }

.lt-fe-month-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.lt-fe-month-name {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .01em;
}
.lt-fe-today-btn {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.30);
    border-radius: 12px;
    padding: 3px 13px;
    cursor: pointer;
    transition: background .15s;
    line-height: 1.7;
}
.lt-fe-today-btn:hover { background: rgba(255,255,255,.32); color: #fff; }

/* ── Kalender-Raster ──────────────────────────────────────────────────────── */
.lt-fe-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

/* Wochentagszeile */
.lt-fe-grid-hdr {
    background: #f4faf0;
    border-bottom: 1px solid var(--lt-fe-border);
}
.lt-fe-wd {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--lt-fe-muted);
    padding: 10px 2px;
}

/* Tageszellen */
.lt-fe-grid-body { }

.lt-fe-cell {
    min-height: 86px;
    border-right: 1px solid var(--lt-fe-border);
    border-bottom: 1px solid var(--lt-fe-border);
    padding: 8px 6px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background: var(--lt-fe-bg);
    transition: background .1s;
}
.lt-fe-cell:nth-child(7n) { border-right: none; }

.lt-fe-cell.is-empty   { background: #f9fcf7; }
.lt-fe-cell.is-weekend { background: #f7faf5; }
.lt-fe-cell.is-today .lt-fe-day-num {
    background: var(--lt-fe-today);
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.lt-fe-cell.has-event  { cursor: default; }
.lt-fe-cell.has-event:hover { background: #eef7e6; }

/* Farbige Zell-Hintergründe je Eventtyp */
.lt-fe-cell.ev-type-schliesszeit  { background: var(--lt-fe-s-bg); }
.lt-fe-cell.ev-type-weiterbildung { background: var(--lt-fe-w-bg); }
.lt-fe-cell.ev-mixed {
    background: linear-gradient(135deg,
        var(--lt-fe-s-bg) 50%,
        var(--lt-fe-w-bg) 50%);
}

.lt-fe-day-num {
    font-size: 15px;
    font-weight: 600;
    color: var(--lt-fe-text);
    line-height: 1;
    min-width: 24px;
    text-align: center;
    margin-bottom: 5px;
}

/* Event-Dots */
.lt-fe-dots {
    display: flex;
    gap: 3px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2px;
}
.lt-fe-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.lt-fe-dot.type-s { background: var(--lt-fe-s); }
.lt-fe-dot.type-w { background: var(--lt-fe-w); border: 1.5px solid var(--lt-fe-w-border); }

/* ── Tooltip ──────────────────────────────────────────────────────────────── */
.lt-fe-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 12px;
    line-height: 1.55;
    white-space: nowrap;
    z-index: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,.22);
    pointer-events: none;
    min-width: max-content;
}
.lt-fe-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
}
.lt-fe-cell:hover .lt-fe-tooltip { display: block; }

.lt-fe-tip-line { display: flex; align-items: center; gap: 7px; }
.lt-fe-tip-line .lt-fe-dot { width: 8px; height: 8px; }
.lt-fe-tip-date { color: rgba(255,255,255,.6); font-size: 11px; margin-top: 2px; }

/* ── Legende ──────────────────────────────────────────────────────────────── */
.lt-fe-legend {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    padding: 13px 18px;
    border-top: 1px solid var(--lt-fe-border);
    background: #f4faf0;
}
.lt-fe-leg-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--lt-fe-muted);
    font-weight: 500;
}
.lt-fe-leg-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    flex-shrink: 0;
}
.lt-fe-leg-dot.type-s { background: var(--lt-fe-s); }
.lt-fe-leg-dot.type-w { background: var(--lt-fe-w); border: 1.5px solid var(--lt-fe-w-border); }

/* ── Responsive ───────────────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 900px) {
    .lt-fe-cell      { min-height: 72px; padding: 6px 4px; }
    .lt-fe-day-num   { font-size: 14px; }
    .lt-fe-wd        { font-size: 11px; }
    .lt-fe-month-name{ font-size: 18px; }
    .lt-fe-nav       { padding: 13px 16px; }
    .lt-fe-nav-btn   { width: 38px; height: 38px; font-size: 24px; }
}

/* Großes Smartphone */
@media (max-width: 600px) {
    .lt-fe-cell      { min-height: 56px; padding: 5px 3px; }
    .lt-fe-day-num   { font-size: 12px; }
    .lt-fe-dot       { width: 7px; height: 7px; }
    .lt-fe-wd        { font-size: 10px; letter-spacing: .03em; padding: 8px 1px; }
    .lt-fe-month-name{ font-size: 16px; }
    .lt-fe-nav       { padding: 11px 12px; }
    .lt-fe-nav-btn   { width: 34px; height: 34px; font-size: 21px; }
    .lt-fe-title     { font-size: 18px; }
    /* Tooltip auf kleinen Geräten: oberhalb → zentriert */
    .lt-fe-cell:hover .lt-fe-tooltip { display: none; }
}

/* Kleines Smartphone */
@media (max-width: 400px) {
    .lt-fe-cell      { min-height: 46px; padding: 3px 2px; }
    .lt-fe-day-num   { font-size: 10.5px; margin-bottom: 3px; }
    .lt-fe-wd        { font-size: 8.5px; letter-spacing: 0; padding: 6px 0; }
    .lt-fe-dot       { width: 6px; height: 6px; }
    .lt-fe-month-name{ font-size: 14px; }
    .lt-fe-nav-btn   { width: 30px; height: 30px; font-size: 18px; }
    .lt-fe-nav       { padding: 10px 8px; }
    .lt-fe-title     { font-size: 16px; }
    .lt-fe-legend    { gap: 14px; padding: 10px 12px; }
    .lt-fe-leg-item  { font-size: 12px; }
}

/* Sehr kleines Smartphone */
@media (max-width: 320px) {
    .lt-fe-wd        { font-size: 7.5px; }
    .lt-fe-day-num   { font-size: 9.5px; }
    .lt-fe-cell      { min-height: 40px; }
}
