/**
 * Opening Hours Module - Styles
 * @package     mod_opening_hours
 * @copyright   Copyright (C) 2025 DiabloDesign. All rights reserved.
 * @license     GNU General Public License version 2 or later
 */

/* ========================================
   Base Module Styles
   ======================================== */

.mod-opening-hours {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.5;
    max-width: 100%;
    font-size: 14px;
}

/* ========================================
   Unified Container
   ======================================== */

.opening-hours-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ========================================
   Separator
   ======================================== */

.opening-hours-separator {
    height: 1px;
    background: #e5e7eb;
    margin: 14px 0;
}

/* ========================================
   Title and Intro Text
   ======================================== */

.opening-hours-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
    padding: 0;
}

.opening-hours-intro {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 12px 0;
    padding: 0;
}

/* ========================================
   Special Message
   ======================================== */

.opening-hours-special-message {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 3px solid #ffc107;
}

.special-message-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.special-message-text {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

/* ========================================
   Status Indicator
   ======================================== */

.opening-hours-status {
    padding: 12px 14px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    border-radius: 6px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.status-open .status-indicator {
    background: #10b981;
}

.status-closed .status-indicator {
    background: #ef4444;
}

.status-open {
    border-color: #d1fae5;
    background: #f0fdf4;
}

.status-closed {
    border-color: #fee2e2;
    background: #fef2f2;
}

.status-text {
    font-weight: 500;
    font-size: 13px;
    color: #374151;
}

.status-detail {
    font-size: 12px;
    color: #6b7280;
    margin-left: auto;
}

.status-detail strong {
    color: #374151;
    font-weight: 500;
}

/* ========================================
   Holiday Notice
   ======================================== */

.opening-hours-holiday-notice {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.holiday-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.holiday-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.holiday-text {
    font-size: 12px;
    font-weight: 600;
}

.holiday-date {
    font-size: 11px;
    opacity: 0.75;
    font-weight: 400;
}

/* ========================================
   Days List
   ======================================== */

.opening-hours-day {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
    position: relative;
}

.opening-hours-day:last-child {
    border-bottom: none;
}

.opening-hours-day:hover {
    background: #f9fafb;
}

.opening-hours-day.is-today {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    font-weight: 500;
}

.opening-hours-day.is-today .day-name {
    color: #2563eb;
}

.opening-hours-day.is-closed {
    opacity: 0.6;
}

.opening-hours-day.is-closed:hover {
    transform: none;
}

.day-name {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    flex-wrap: wrap;
}

.today-badge {
    background: #3b82f6;
    color: #fff;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.day-hours {
    text-align: right;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.hours-time {
    color: #374151;
    font-weight: 400;
    font-size: 13px;
}

.day-status {
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
}

.day-status.status-open {
    color: #15803d;
    background: #f0fdf4;
}

.day-status.status-closed {
    color: #b91c1c;
    background: #fef2f2;
}

.day-status .status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.next-opening {
    font-size: 11px;
    color: #6b7280;
    font-weight: 400;
    padding: 2px 6px;
    background: #f3f4f6;
    border-radius: 4px;
}

.hours-break {
    color: #6b7280;
    font-size: 11px;
    font-style: italic;
}

.hours-closed {
    color: #9ca3af;
    font-style: italic;
    font-size: 12px;
}

/* ========================================
   Compact Layout
   ======================================== */

.mod-opening-hours[data-layout="compact"] .opening-hours-day {
    padding: 10px 16px;
}

.mod-opening-hours[data-layout="compact"] .day-name {
    font-size: 13px;
    flex: 0 0 100px;
}

.mod-opening-hours[data-layout="compact"] .day-hours {
    font-size: 13px;
}

.mod-opening-hours[data-layout="compact"] .hours-break {
    display: none;
}

/* ========================================
   Animations - Removed for subtle look
   ======================================== */

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .opening-hours-status {
        padding: 12px 16px;
        font-size: 14px;
    }

    .status-detail {
        flex-basis: 100%;
        margin-left: 24px;
        font-size: 13px;
    }

    .opening-hours-day {
        padding: 12px 16px;
    }

    .day-name {
        flex: 0 0 110px;
        font-size: 14px;
    }

    .day-hours {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .opening-hours-day {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .day-name {
        flex: none;
    }

    .day-hours {
        text-align: left;
        align-items: flex-start;
        width: 100%;
    }
}

/* ========================================
   Dark Mode Support (Optional)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .mod-opening-hours {
        color: #e0e0e0;
    }

    .opening-hours-list,
    .opening-hours-status {
        background: #1e1e1e;
        border-color: #333;
    }

    .opening-hours-day {
        border-bottom-color: #333;
    }

    .opening-hours-day:hover {
        background: #2a2a2a;
    }

    .opening-hours-day.is-today {
        background: linear-gradient(90deg, #1a2332 0%, #1e2836 100%);
    }

    .day-name,
    .hours-time,
    .status-text,
    .status-detail strong {
        color: #e0e0e0;
    }

    .status-detail {
        color: #999;
    }

    .hours-break,
    .hours-closed {
        color: #666;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .opening-hours-status,
    .opening-hours-special-message {
        display: none;
    }

    .opening-hours-day:hover {
        transform: none;
    }
}
