/* ===================================================================
   Opening Hours Widget - Desktop Navigation Only
   Shows real-time open/closed status with expandable hours
   =================================================================== */

.hours-widget {
    position: relative;
    display: none; /* Hidden by default (mobile) */
    margin-left: 1.5rem;
    /* Prevent layout shift */
    contain: layout;
}

/* Show on tablet and desktop (768px+) */
@media (min-width: 768px) {
    .hours-widget {
        display: flex;
        flex-direction: row;
        align-items: center;
    }
}

/* Status Badge (collapsed state) */
.hours-widget__status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
}

/* Open Status - WCAG AA compliant contrast (4.5:1+) */
.hours-widget__status--open {
    background: rgba(22, 163, 74, 0.15);
    border-color: rgb(22, 163, 74);
    color: rgb(21, 128, 61); /* Darker green for better contrast */
}

.hours-widget__status--open:hover {
    background: rgba(22, 163, 74, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

/* Closed Status - WCAG AA compliant contrast (4.5:1+) */
.hours-widget__status--closed {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgb(220, 38, 38);
    color: rgb(185, 28, 28); /* Darker red for better contrast */
}

.hours-widget__status--closed:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Status Icon */
.hours-widget__status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

.hours-widget__status--open .hours-widget__status-icon {
    background: rgb(34, 197, 94);
}

.hours-widget__status--closed .hours-widget__status-icon {
    background: rgb(239, 68, 68);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Status Text */
.hours-widget__status-text {
    letter-spacing: 0.05em;
}

/* Inline info (today + next day) to the right of the badge */
.hours-widget__inline-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'Space Grotesk', sans-serif;
    white-space: nowrap;
}

.hours-widget__info-today {
    color: #374151;
}

.hours-widget__info-sep {
    color: #9ca3af;
    font-size: 0.9rem;
}

.hours-widget__info-next {
    color: #6b7280;
    font-size: 0.75rem;
}

/* Dropdown Panel (expanded state) */
.hours-widget__dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 1.5rem;
    min-width: 380px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.hours-widget:hover .hours-widget__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Header */
.hours-widget__title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    font-family: 'Space Grotesk', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hours-widget__title-icon {
    width: 20px;
    height: 20px;
    stroke: var(--blue, #4A9BD9);
}

/* Next Opening Time (when closed) */
.hours-widget__next-open {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid rgb(239, 68, 68);
    border-radius: 0.25rem;
}

/* Hours List */
.hours-widget__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hours-widget__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background 0.2s ease;
}

.hours-widget__item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Today Highlight */
.hours-widget__item--today {
    background: rgba(74, 155, 217, 0.1);
    border-left: 3px solid var(--blue, #4A9BD9);
}

.hours-widget__day {
    font-size: 0.875rem;
    color: #cbd5e1;
    font-weight: 500;
}

.hours-widget__item--today .hours-widget__day {
    color: var(--blue, #4A9BD9);
    font-weight: 700;
}

.hours-widget__time {
    font-size: 0.8125rem;
    color: #94a3b8;
    font-family: 'Space Grotesk', monospace;
    text-align: right;
    line-height: 1.3;
}

.hours-widget__item--today .hours-widget__time {
    color: #ffffff;
}

/* Closed Day */
.hours-widget__time--closed {
    color: #4b5563;
    font-style: italic;
}

/* Contact Link */
.hours-widget__contact {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #334155;
}

.hours-widget__contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--red, #E74C3C);
    color: #ffffff;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.hours-widget__contact-link:hover {
    background: var(--red-dark, #C0392B);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.hours-widget__contact-icon {
    width: 16px;
    height: 16px;
}

/* Mobile - Desktop widget hidden */
@media (max-width: 767px) {
    .hours-widget {
        display: none !important;
    }
}

/* =============================================================================
   Mobile Opening Hours FAB + Bottom Sheet Modal
   ============================================================================= */

/* --- FAB: Floating Action Button (mobile only) --- */
.mobile-hours-fab {
    display: none;
}

@media (max-width: 767px) {
    .mobile-hours-fab {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 1.25rem;
        left: 1.25rem;
        z-index: 998;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: none;
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        color: white;
        box-shadow:
            0 4px 14px rgba(0, 0, 0, 0.2),
            0 1px 3px rgba(0, 0, 0, 0.1);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                    box-shadow 0.25s ease;
    }

    .mobile-hours-fab:active {
        transform: scale(0.92);
    }

    .mobile-hours-fab__dot {
        position: absolute;
        top: 4px;
        right: 4px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: 2px solid #1e293b;
        animation: pulse 2s ease-in-out infinite;
    }
}

/* --- Bottom Sheet Modal --- */
.mobile-hours-modal {
    display: none;
}

@media (max-width: 767px) {
    .mobile-hours-modal {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 100000;
        pointer-events: none;
    }

    .mobile-hours-modal.active {
        pointer-events: auto;
    }

    /* Backdrop */
    .mobile-hours-modal__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-hours-modal.active .mobile-hours-modal__backdrop {
        opacity: 1;
    }

    /* Sheet */
    .mobile-hours-modal__sheet {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: #ffffff;
        border-radius: 20px 20px 0 0;
        padding: 0.5rem 1.5rem 2rem;
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        max-height: 85vh;
        overflow-y: auto;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.12);
    }

    .mobile-hours-modal.active .mobile-hours-modal__sheet {
        transform: translateY(0);
    }

    /* Drag handle */
    .mobile-hours-modal__handle {
        width: 36px;
        height: 4px;
        background: #d1d5db;
        border-radius: 4px;
        margin: 0.5rem auto 1rem;
    }

    /* Header */
    .mobile-hours-modal__header {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .mobile-hours-modal__title {
        font-size: 1.1rem;
        font-weight: 700;
        font-family: 'Space Grotesk', sans-serif;
        color: #1e293b;
        flex: 1;
    }

    .mobile-hours-modal__close {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: none;
        background: rgba(0, 0, 0, 0.04);
        font-size: 18px;
        color: #6b7280;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.2s;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-hours-modal__close:active {
        background: rgba(0, 0, 0, 0.08);
    }

    /* Status bar */
    .mobile-hours-modal__status {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.7rem 0.85rem;
        border-radius: 12px;
        margin-bottom: 1rem;
        font-size: 0.88rem;
        font-family: 'Quicksand', sans-serif;
        color: #374151;
    }

    .mobile-hours-modal__status--open {
        background: rgba(22, 163, 74, 0.06);
        border: 1px solid rgba(22, 163, 74, 0.12);
    }

    .mobile-hours-modal__status--closed {
        background: rgba(220, 38, 38, 0.06);
        border: 1px solid rgba(220, 38, 38, 0.12);
    }

    .mobile-hours-modal__status-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        flex-shrink: 0;
        animation: pulse 2s ease-in-out infinite;
    }

    .mobile-hours-modal__status--open .mobile-hours-modal__status-dot {
        background: rgb(34, 197, 94);
    }

    .mobile-hours-modal__status--closed .mobile-hours-modal__status-dot {
        background: rgb(239, 68, 68);
    }

    /* Hours list */
    .mobile-hours-modal__list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }

    .mobile-hours-modal__item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.65rem 0.7rem;
        border-radius: 8px;
    }

    .mobile-hours-modal__item--today {
        background: rgba(74, 155, 217, 0.06);
        border-left: 3px solid #4A9BD9;
    }

    .mobile-hours-modal__day {
        font-size: 0.88rem;
        color: #374151;
        font-weight: 500;
        font-family: 'Quicksand', sans-serif;
    }

    .mobile-hours-modal__item--today .mobile-hours-modal__day {
        color: #4A9BD9;
        font-weight: 700;
    }

    .mobile-hours-modal__time {
        font-size: 0.85rem;
        color: #6b7280;
        font-family: 'Space Grotesk', sans-serif;
        font-weight: 500;
    }

    .mobile-hours-modal__item--today .mobile-hours-modal__time {
        color: #1e293b;
        font-weight: 700;
    }

    .mobile-hours-modal__time--closed {
        color: #9ca3af;
        font-style: italic;
    }

    /* Call CTA */
    .mobile-hours-modal__call {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1.25rem;
        padding: 0.85rem;
        background: #E74C3C;
        color: white;
        text-decoration: none;
        border-radius: 14px;
        font-size: 0.9rem;
        font-weight: 700;
        font-family: 'Space Grotesk', sans-serif;
        transition: background 0.2s;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-hours-modal__call:active {
        background: #C0392B;
    }
}

/* Hide FAB + modal on desktop */
@media (min-width: 768px) {
    .mobile-hours-fab,
    .mobile-hours-modal {
        display: none !important;
    }
}

/* Tablet - Smaller sizing */
@media (min-width: 768px) and (max-width: 1023px) {
    .hours-widget {
        margin-left: 0.75rem;
    }

    .hours-widget__status {
        padding: 0.3rem 0.55rem;
        font-size: 0.7rem;
    }

    .hours-widget__inline-info {
        font-size: 0.65rem;
        gap: 0.35rem;
        margin-left: 0.5rem;
    }

    .hours-widget__info-next {
        font-size: 0.6rem;
    }

    .hours-widget__dropdown {
        min-width: 340px;
    }
}

/* Large Tablet/Small Desktop - Medium sizing */
@media (min-width: 1024px) and (max-width: 1280px) {
    .hours-widget {
        margin-left: 1rem;
    }

    .hours-widget__status {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }

    .hours-widget__inline-info {
        font-size: 0.7rem;
        margin-left: 0.6rem;
    }

    .hours-widget__info-next {
        font-size: 0.65rem;
    }

    .hours-widget__dropdown {
        min-width: 360px;
    }
}
