/*
 * TLC Business Hours - frontend styles.
 *
 * All selectors are prefixed with .tlc-business-hours-widget for specificity.
 * Layout-critical rules use !important to resist theme overrides.
 * All colours are driven by CSS custom properties output inline on the wrapper:
 *   --tlc-bg, --tlc-text, --tlc-today-bg, --tlc-today-text, --tlc-accent,
 *   --tlc-closed-colour, --tlc-open-badge, --tlc-closed-badge
 */

.tlc-business-hours-widget {
        --tlc-bg: #ffffff;
        --tlc-text: #333333;
        --tlc-today-bg: #eef6ff;
        --tlc-today-text: #0a3d62;
        --tlc-accent: #0a3d62;
        --tlc-closed-colour: #c0392b;
        --tlc-open-badge: #27ae60;
        --tlc-closed-badge: #c0392b;

        /* No outer card — tight, flush output. Background, border and shadow are
           removed so the widget sits cleanly in footers, sidebars, and content areas
           without adding unwanted whitespace or a visible box around itself. */
        background: transparent !important;
        color: var(--tlc-text) !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
        font-family: inherit !important;
        font-size: var(--tlc-font-size, 14px) !important;
        line-height: 1.5 !important;
}

.tlc-business-hours-widget * {
        box-sizing: border-box !important;
}

.tlc-business-hours-widget .tlc-bh-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        margin: 0 0 4px 0 !important;
        flex-wrap: wrap !important;
}

.tlc-business-hours-widget .tlc-bh-title {
        margin: 0 !important;
        padding: 0 !important;
        font-size: 1.25em !important;
        font-weight: 700 !important;
        color: var(--tlc-accent) !important;
        border: none !important;
}

/* Open / Closed badge - pill shape, coloured background, white text */
.tlc-business-hours-widget .tlc-bh-badge {
        display: inline-block !important;
        padding: 4px 14px !important;
        border-radius: 999px !important;
        font-size: 0.8em !important;
        font-weight: 700 !important;
        line-height: 1.6 !important;
        color: #ffffff !important;
        text-transform: uppercase !important;
        letter-spacing: 0.03em !important;
        white-space: nowrap !important;
}

.tlc-business-hours-widget .tlc-bh-badge-open {
        background-color: var(--tlc-open-badge) !important;
}

.tlc-business-hours-widget .tlc-bh-badge-closed {
        background-color: var(--tlc-closed-badge) !important;
}

/* Day list */
.tlc-business-hours-widget .tlc-bh-list {
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
}

.tlc-business-hours-widget .tlc-bh-row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        padding: 3px 8px !important;
        margin: 0 !important;
        border-bottom: none !important;
        color: var(--tlc-text) !important;
        border-radius: 4px !important;
}

.tlc-business-hours-widget .tlc-bh-row:last-child {
        border-bottom: none !important;
}

.tlc-business-hours-widget .tlc-bh-day {
        font-weight: 500 !important;
        color: var(--tlc-text) !important;
}

.tlc-business-hours-widget .tlc-bh-hours {
        text-align: right !important;
        color: var(--tlc-text) !important;
}

.tlc-business-hours-widget .tlc-bh-session {
        display: block !important;
}

/* Today row highlight */
.tlc-business-hours-widget .tlc-bh-row.tlc-bh-today {
        background-color: var(--tlc-today-bg) !important;
        color: var(--tlc-today-text) !important;
}

.tlc-business-hours-widget .tlc-bh-row.tlc-bh-today .tlc-bh-day {
        font-weight: 800 !important;
        color: var(--tlc-today-text) !important;
}

.tlc-business-hours-widget .tlc-bh-row.tlc-bh-today .tlc-bh-hours {
        color: var(--tlc-today-text) !important;
}

/* Ensure today's "Closed" still uses the today text colour for contrast,
   but a normal day's Closed label uses the closed colour. */
.tlc-business-hours-widget .tlc-bh-closed {
        color: var(--tlc-closed-colour) !important;
        font-weight: 700 !important;
}

.tlc-business-hours-widget .tlc-bh-row.tlc-bh-today .tlc-bh-closed {
        color: var(--tlc-closed-colour) !important;
}

/* Holiday name emphasis */
.tlc-business-hours-widget .tlc-bh-holiday-name {
        font-weight: 600 !important;
        color: var(--tlc-accent) !important;
}

.tlc-business-hours-widget .tlc-bh-row.tlc-bh-today .tlc-bh-holiday-name {
        color: var(--tlc-today-text) !important;
}

/* Upcoming holidays block */
.tlc-business-hours-widget .tlc-bh-holidays {
        margin-top: 16px !important;
        padding-top: 14px !important;
        border-top: 2px solid var(--tlc-accent) !important;
}

.tlc-business-hours-widget .tlc-bh-holidays-title {
        margin: 0 0 8px 0 !important;
        padding: 0 !important;
        font-size: 1em !important;
        font-weight: 700 !important;
        color: var(--tlc-accent) !important;
}

.tlc-business-hours-widget .tlc-bh-holiday-list {
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
}

.tlc-business-hours-widget .tlc-bh-holiday-row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
        padding: 6px 12px !important;
        color: var(--tlc-text) !important;
}

.tlc-business-hours-widget .tlc-bh-holiday-date {
        font-weight: 500 !important;
        color: var(--tlc-text) !important;
}

.tlc-business-hours-widget .tlc-bh-holiday-info {
        text-align: right !important;
}

/* Responsive - stack on very narrow sidebars */
@media screen and (max-width: 360px) {
        .tlc-business-hours-widget .tlc-bh-row,
        .tlc-business-hours-widget .tlc-bh-holiday-row {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 2px !important;
        }

        .tlc-business-hours-widget .tlc-bh-hours,
        .tlc-business-hours-widget .tlc-bh-holiday-info {
                text-align: left !important;
        }
}
