/**
 * @package     MuellerWeb.Module
 * @subpackage  mod_flexible_openinghours
 * @version     2.0.0
 * @copyright   (C) 2026 Heiko Müller - Müller Web & Hosting
 */

.foh-wrapper {
    --foh-bg: #ffffff;
    --foh-text: #222222;
    --foh-heading: #111111;
    --foh-accent: #2b6cb0;
    --foh-closed: #c53030;
    --foh-today-bg: #ebf8ff;
    --foh-border: #dcdcdc;
    --foh-heading-size: 1.55rem;
    --foh-body-size: 1rem;
    --foh-padding: 28px;
    --foh-radius: 10px;
    --foh-row-py: 9px;
    --foh-grid-gap: 24px;
    --foh-max-width: 100%;
    --foh-cols-desktop: 2;
    --foh-cols-laptop: 2;
    --foh-cols-tablet-l: 2;
    --foh-cols-tablet-p: 1;
    --foh-cols-phone-l: 1;
    --foh-cols-phone-p: 1;

    font-size: var(--foh-body-size) !important;
    color: var(--foh-text);
    box-sizing: border-box !important;
    width: 100%;
    max-width: var(--foh-max-width, 100%);
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    font-family: inherit;
    text-align: left;
}

.foh-wrapper *,
.foh-wrapper *::before,
.foh-wrapper *::after {
    box-sizing: border-box !important;
}

/* Hard-constrain SVG icons so template resets (like Nicepage svg {width:100%}) NEVER blow them up */
.foh-wrapper svg.foh-svg-icon,
.foh-wrapper .foh-title-icon svg,
.foh-wrapper .foh-badge-item__icon svg {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
    fill: none;
    stroke: currentColor;
}

.foh-wrapper .foh-title-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
    color: var(--foh-accent);
}

/* Nicepage 6-Tier Responsive Grid */
.foh-wrapper .foh-grid {
    display: grid !important;
    gap: var(--foh-grid-gap, 24px) !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch;
}

.foh-wrapper.foh-has-second-panel .foh-grid {
    grid-template-columns: repeat(var(--foh-cols-desktop, 2), minmax(0, 1fr)) !important;
}

@media (max-width: 1199.98px) {
    .foh-wrapper.foh-has-second-panel .foh-grid {
        grid-template-columns: repeat(var(--foh-cols-laptop, 2), minmax(0, 1fr)) !important;
    }
}
@media (max-width: 991.98px) {
    .foh-wrapper.foh-has-second-panel .foh-grid {
        grid-template-columns: repeat(var(--foh-cols-tablet-l, 2), minmax(0, 1fr)) !important;
    }
}
@media (max-width: 767.98px) {
    .foh-wrapper.foh-has-second-panel .foh-grid {
        grid-template-columns: repeat(var(--foh-cols-tablet-p, 1), minmax(0, 1fr)) !important;
    }
}
@media (max-width: 575.98px) {
    .foh-wrapper.foh-has-second-panel .foh-grid {
        grid-template-columns: repeat(var(--foh-cols-phone-l, 1), minmax(0, 1fr)) !important;
    }
}
@media (max-width: 479.98px) {
    .foh-wrapper.foh-has-second-panel .foh-grid {
        grid-template-columns: repeat(var(--foh-cols-phone-p, 1), minmax(0, 1fr)) !important;
    }
    .foh-wrapper.foh-mobile-stack .foh-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 3px !important;
    }
    .foh-wrapper.foh-mobile-stack .foh-row__dots {
        display: none !important;
    }
    .foh-wrapper.foh-mobile-stack .foh-row__day,
    .foh-wrapper.foh-mobile-stack .foh-row__time {
        width: 100% !important;
        text-align: left !important;
        justify-content: flex-start !important;
    }
}

/* Base Panel */
.foh-wrapper .foh-panel {
    background-color: var(--foh-bg);
    color: var(--foh-text);
    padding: var(--foh-padding);
    border-radius: var(--foh-radius);
    border: 1px solid var(--foh-border);
    position: relative;
    overflow: hidden;
}

/* Header & Live Status */
.foh-wrapper .foh-header {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--foh-border);
}

.foh-wrapper .foh-header__titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.foh-wrapper .foh-main-title,
.foh-wrapper .foh-side-title,
.foh-wrapper .foh-special-dates__title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: var(--foh-heading-size) !important;
    color: var(--foh-heading) !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.foh-wrapper .foh-main-subtitle,
.foh-wrapper .foh-block-subtitle {
    margin: 2px 0 0 0 !important;
    font-weight: 600 !important;
    color: var(--foh-accent) !important;
    font-size: 0.95em !important;
}

/* Live Status Pill */
.foh-wrapper .foh-live-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 5px 13px !important;
    border-radius: 999px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid rgba(0,0,0,0.06);
    white-space: nowrap;
}

.foh-wrapper .foh-live-badge__dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: currentColor !important;
    display: inline-block !important;
}

.foh-wrapper .foh-live-badge--open {
    background: #dcfce7 !important;
    color: #166534 !important;
    border-color: #86efac !important;
}

.foh-wrapper .foh-live-badge--closing_soon,
.foh-wrapper .foh-live-badge--break,
.foh-wrapper .foh-live-badge--special {
    background: #fef3c7 !important;
    color: #92400e !important;
    border-color: #fde68a !important;
}

.foh-wrapper .foh-live-badge--closed,
.foh-wrapper .foh-live-badge--vacation {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border-color: #fecaca !important;
}

.foh-wrapper .foh-live-badge__detail {
    font-weight: 500 !important;
    opacity: 0.9;
}

/* Secondary Schedule Block (e.g. Betreuungszeiten / Küche) */
.foh-wrapper .foh-schedule-block--secondary {
    margin-top: 26px !important;
    padding-top: 22px !important;
    border-top: 2px solid var(--foh-border) !important;
}

.foh-wrapper .foh-block-title {
    margin: 0 0 12px 0 !important;
    font-size: calc(var(--foh-heading-size) * 0.88) !important;
    color: var(--foh-heading) !important;
    font-weight: 700 !important;
}

/* Timetable Rows */
.foh-wrapper .foh-timetable {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

.foh-wrapper .foh-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    padding: var(--foh-row-py) 10px !important;
    gap: 12px !important;
    width: 100% !important;
    transition: background-color 0.15s ease;
}

.foh-wrapper .foh-row__day {
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
}

.foh-wrapper .foh-row__dots {
    flex-grow: 1 !important;
    border-bottom: 1px dotted var(--foh-border) !important;
    margin: 0 8px !important;
    opacity: 0.75;
    min-width: 20px;
}

.foh-wrapper .foh-row__time {
    text-align: right !important;
    font-weight: 500;
}

/* Row Divider Styles */
.foh-wrapper.foh-divider-none .foh-row__dots {
    display: none !important;
}
.foh-wrapper.foh-divider-solid .foh-row {
    border-bottom: 1px solid var(--foh-border) !important;
}
.foh-wrapper.foh-divider-solid .foh-row:last-child {
    border-bottom: none !important;
}
.foh-wrapper.foh-divider-solid .foh-row__dots {
    display: none !important;
}
.foh-wrapper.foh-divider-dashed .foh-row {
    border-bottom: 1px dashed var(--foh-border) !important;
}
.foh-wrapper.foh-divider-dashed .foh-row:last-child {
    border-bottom: none !important;
}
.foh-wrapper.foh-divider-dashed .foh-row__dots {
    display: none !important;
}
.foh-wrapper.foh-divider-zebra .foh-row:nth-child(even) {
    background-color: rgba(128, 128, 128, 0.06);
    border-radius: 4px;
}
.foh-wrapper.foh-divider-zebra .foh-row__dots {
    display: none !important;
}

/* Text Alignment Styles */
.foh-wrapper.foh-align-centered_cols .foh-row {
    justify-content: center !important;
    gap: 32px !important;
}
.foh-wrapper.foh-align-centered_cols .foh-row__dots {
    display: none !important;
}
.foh-wrapper.foh-align-centered_cols .foh-row__day {
    width: 42% !important;
    justify-content: flex-start !important;
    text-align: left !important;
}
.foh-wrapper.foh-align-centered_cols .foh-row__time {
    width: 50% !important;
    text-align: center !important;
}

.foh-wrapper.foh-align-left_compact .foh-row {
    justify-content: flex-start !important;
    gap: 24px !important;
}
.foh-wrapper.foh-align-left_compact .foh-row__dots {
    display: none !important;
}
.foh-wrapper.foh-align-left_compact .foh-row__day {
    min-width: 155px !important;
}
.foh-wrapper.foh-align-left_compact .foh-row__time {
    text-align: left !important;
}

/* Today Highlight & Status Formatting */
.foh-wrapper .foh-row.is-today {
    background-color: var(--foh-today-bg) !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
}

.foh-wrapper .foh-today-pill {
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
    background-color: var(--foh-accent) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

.foh-wrapper .foh-status-closed {
    color: var(--foh-closed) !important;
    font-weight: 600 !important;
}

.foh-wrapper .foh-day-note-badge {
    font-size: 0.9em !important;
    color: var(--foh-closed) !important;
    font-weight: 500 !important;
}

.foh-wrapper .foh-slot-label {
    font-weight: 700 !important;
    color: var(--foh-accent) !important;
}

/* Vacation Banner */
.foh-wrapper .foh-vacation-banner {
    padding: 14px 18px !important;
    border-radius: 8px !important;
    margin-bottom: 18px !important;
    border-left: 5px solid #e53e3e !important;
    background: #fff5f5 !important;
    color: #742a2a !important;
}
.foh-wrapper .foh-vacation-banner--upcoming {
    border-left-color: #dd6b20 !important;
    background: #fffaf0 !important;
    color: #7b341e !important;
}
.foh-wrapper .foh-vacation-banner__title {
    font-weight: 700 !important;
    margin-bottom: 4px !important;
}

/* Special / Holiday Dates Table */
.foh-wrapper .foh-special-dates-box {
    margin: 16px 0 !important;
    padding: 18px !important;
    border-radius: 8px !important;
    background: rgba(128, 128, 128, 0.05);
    border: 1px solid var(--foh-border);
}
.foh-wrapper .foh-special-dates__subtitle {
    margin-top: 4px !important;
    margin-bottom: 14px !important;
    font-size: 0.92em !important;
    opacity: 0.85;
}
.foh-wrapper .foh-special-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 7px 8px !important;
    border-bottom: 1px solid var(--foh-border) !important;
    gap: 16px !important;
}
.foh-wrapper .foh-special-row:last-child {
    border-bottom: none !important;
}
.foh-wrapper .foh-special-row__date {
    font-weight: 700 !important;
    color: var(--foh-closed) !important;
}
.foh-wrapper .foh-special-row__value {
    font-weight: 600 !important;
}
.foh-wrapper .foh-special-dates__footer {
    margin-top: 14px !important;
    font-weight: 600 !important;
    text-align: center !important;
    font-style: italic;
}

/* Footnotes & Feature Badges */
.foh-wrapper .foh-global-footnote,
.foh-wrapper .foh-block-footnote {
    margin-top: 18px !important;
    padding-top: 14px !important;
    border-top: 1px solid var(--foh-border) !important;
    font-size: 0.92em !important;
    line-height: 1.55 !important;
    opacity: 0.92;
}

.foh-wrapper .foh-badges-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 18px !important;
    padding-top: 14px !important;
    border-top: 1px solid var(--foh-border) !important;
}

.foh-wrapper .foh-badge-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 6px 13px !important;
    border-radius: 999px !important;
    background: rgba(128, 128, 128, 0.08) !important;
    font-size: 0.85em !important;
    font-weight: 600 !important;
}

.foh-wrapper .foh-badge-item__icon {
    color: var(--foh-closed) !important;
    display: inline-flex !important;
}

/* Secondary Side Panel */
.foh-wrapper .foh-side-image-wrap {
    margin: calc(var(--foh-padding) * -1) calc(var(--foh-padding) * -1) 18px calc(var(--foh-padding) * -1) !important;
    overflow: hidden;
}
.foh-wrapper .foh-side-image {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: cover;
}
.foh-wrapper .foh-side-title {
    margin-bottom: 14px !important;
}

/* ==========================================================================
   8 DISTINCT DESIGN PRESETS (With High Specificity)
   ========================================================================== */

/* 1. Template-Vererbung Clean (Neutral für Nicepage) */
.foh-wrapper.foh-style-inherit_clean .foh-panel {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

/* 2. Modern Card (Helle Karte mit blauem Oberbalken & Schatten) */
.foh-wrapper.foh-style-modern_card {
    --foh-bg: #ffffff;
    --foh-text: #1e293b;
    --foh-heading: #0f172a;
    --foh-accent: #2563eb;
    --foh-closed: #dc2626;
    --foh-today-bg: #eff6ff;
    --foh-border: #e2e8f0;
}
.foh-wrapper.foh-style-modern_card .foh-panel {
    border-top: 4px solid var(--foh-accent);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -3px rgba(15, 23, 42, 0.04);
}

/* 3. Klassisch / Museum (Bild 1 - Landgrafenschloss / Hinterlandmuseum Stil) */
.foh-wrapper.foh-style-museum_classic {
    --foh-bg: #f6f4ef;
    --foh-text: #46433e;
    --foh-heading: #36332e;
    --foh-accent: #7c6855;
    --foh-closed: #9b3b2b;
    --foh-today-bg: #ebe6dc;
    --foh-border: #d8d2c7;
}
.foh-wrapper.foh-style-museum_classic .foh-panel {
    background-image: radial-gradient(rgba(124, 104, 85, 0.04) 1px, transparent 0);
    background-size: 16px 16px;
    border: 1px solid #d5cec2;
    box-shadow: 0 4px 14px rgba(54, 51, 46, 0.06);
}
.foh-wrapper.foh-style-museum_classic .foh-header {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    border-bottom: 2px solid #dfd9ce;
    padding-bottom: 14px;
}
.foh-wrapper.foh-style-museum_classic .foh-header__titles {
    align-items: center !important;
    text-align: center !important;
}
.foh-wrapper.foh-style-museum_classic .foh-global-footnote {
    text-align: center !important;
    color: #57534e;
}

/* 4. Dark Contrast / Fitnessstudio (Bild 2 - Impuls Fitnessclub Stil) */
.foh-wrapper.foh-style-dark_studio {
    --foh-bg: #0c0d10;
    --foh-text: #f1f5f9;
    --foh-heading: #b8d818;
    --foh-accent: #b8d818;
    --foh-closed: #ff6b6b;
    --foh-today-bg: rgba(184, 216, 24, 0.14);
    --foh-border: #262930;
}
.foh-wrapper.foh-style-dark_studio .foh-panel {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    border: 1px solid #262930;
}
.foh-wrapper.foh-style-dark_studio .foh-main-title,
.foh-wrapper.foh-style-dark_studio .foh-block-title {
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    font-weight: 800 !important;
}
.foh-wrapper.foh-style-dark_studio .foh-row__day {
    text-transform: uppercase !important;
    font-weight: 800 !important;
    letter-spacing: 0.03em;
}
.foh-wrapper.foh-style-dark_studio .foh-today-pill {
    color: #0c0d10 !important;
}

/* 5. Gerahmter Aushang / Gastronomie (Bild 3 - Subway Stil) */
.foh-wrapper.foh-style-framed_notice {
    --foh-bg: #ffffff;
    --foh-text: #0f5132;
    --foh-heading: #0a5c36;
    --foh-accent: #e59a00;
    --foh-closed: #d9381e;
    --foh-today-bg: #ecfdf5;
    --foh-border: #0a5c36;
}
.foh-wrapper.foh-style-framed_notice .foh-panel--primary {
    border: 6px solid var(--foh-border) !important;
    box-shadow: 0 8px 20px rgba(10, 92, 54, 0.08);
}
.foh-wrapper.foh-style-framed_notice .foh-main-subtitle {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 800 !important;
}

/* 6. Feiertags- & Aktions-Tafel (Bild 4 & 5 - Mödlareuth / Bäckerei Stil) */
.foh-wrapper.foh-style-holiday_board {
    --foh-bg: #f3efe6;
    --foh-text: #3b2314;
    --foh-heading: #4a2511;
    --foh-accent: #b91c1c;
    --foh-closed: #b91c1c;
    --foh-today-bg: #e7dfd1;
    --foh-border: #cbbba8;
}
.foh-wrapper.foh-style-holiday_board .foh-panel {
    border: 2px solid #cbbba8;
    box-shadow: inset 0 0 0 4px #f3efe6, inset 0 0 0 5px #dfd5c5;
}
.foh-wrapper.foh-style-holiday_board .foh-header {
    border-bottom: 3px solid var(--foh-accent) !important;
}
.foh-wrapper.foh-style-holiday_board .foh-global-footnote {
    font-style: italic;
    font-weight: 600;
    text-align: center !important;
}

/* 7. Split-Showcase (Edle Akzentkopf-Karte) */
.foh-wrapper.foh-style-split_showcase {
    --foh-bg: #ffffff;
    --foh-text: #1e293b;
    --foh-heading: #ffffff;
    --foh-accent: #1d4ed8;
    --foh-closed: #dc2626;
    --foh-today-bg: #eff6ff;
    --foh-border: #e2e8f0;
}
.foh-wrapper.foh-style-split_showcase .foh-panel {
    box-shadow: 0 12px 30px -6px rgba(29, 78, 216, 0.12);
}
.foh-wrapper.foh-style-split_showcase .foh-header {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    margin: calc(var(--foh-padding) * -1) calc(var(--foh-padding) * -1) 20px calc(var(--foh-padding) * -1) !important;
    padding: 20px var(--foh-padding) !important;
    border-bottom: none;
}
.foh-wrapper.foh-style-split_showcase .foh-main-title,
.foh-wrapper.foh-style-split_showcase .foh-title-icon {
    color: #ffffff !important;
}
.foh-wrapper.foh-style-split_showcase .foh-main-subtitle {
    color: #bfdbfe !important;
}

/* 8. Kompakt-Widget für Footer & Sidebar */
.foh-wrapper.foh-style-compact_widget {
    --foh-padding: 16px;
    --foh-row-py: 5px;
    --foh-heading-size: 1.2rem;
    --foh-body-size: 0.92rem;
}
