/* Opening Times Manager Public Styles */

/* Basic opening times display */
.otm-opening-times {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.otm-date {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.otm-facility-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #212529;
}

.otm-times {
    font-size: 16px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
}

.otm-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.otm-status-open {
    background-color: #d4edda;
    color: #155724;
}

.otm-countdown {
    display: inline-block;
    padding: 6px 12px;
    margin: 8px 0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
    animation: pulse 2s infinite;
}

.otm-countdown-opening {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.otm-countdown-closing {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.2);
}

.otm-countdown-reopens {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.2);
}

.otm-countdown strong {
    font-weight: 600;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Today indicator with countdown/status */
.otm-today-countdown {
    background: linear-gradient(135deg, #28a745, #1e7e34) !important;
    color: white !important;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

.otm-today-open {
    background: linear-gradient(135deg, #28a745, #1e7e34) !important;
    color: white !important;
}

.otm-today-closed {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    color: white !important;
}

.otm-status-closed {
    background-color: #f8d7da;
    color: #721c24;
}

.otm-override-info {
    font-size: 11px;
    color: #856404;
    margin-top: 8px;
    font-style: italic;
}

/* Opening times table */
.otm-opening-times-table {
    margin: 16px 0;
}

.otm-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.otm-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
}

.otm-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
    font-size: 14px;
}

.otm-table tbody tr:last-child td {
    border-bottom: none;
}

.otm-table tbody tr:hover {
    background-color: #f8f9fa;
}

.otm-facility-name {
    font-weight: 600;
    color: #212529;
}

.otm-price-value {
    font-weight: 500;
    color: #495057;
}

.otm-description {
    color: #6c757d;
    font-size: 13px;
}

/* Compact styles */
.otm-opening-times.otm-compact {
    padding: 8px 12px;
    font-size: 14px;
}

.otm-opening-times.otm-compact .otm-facility-name {
    font-size: 16px;
    margin-bottom: 4px;
}

.otm-opening-times.otm-compact .otm-times {
    font-size: 14px;
    margin-bottom: 4px;
}

/* Inline styles */
.otm-opening-times.otm-inline {
    display: inline-block;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.otm-opening-times.otm-inline .otm-facility-name,
.otm-opening-times.otm-inline .otm-date {
    display: none;
}

/* Status only styles */
.otm-status.otm-large {
    padding: 8px 16px;
    font-size: 14px;
}

.otm-status.otm-small {
    padding: 2px 6px;
    font-size: 10px;
}

/* Error states */
.otm-error {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    margin: 8px 0;
}

/* Loading state */
.otm-loading {
    color: #6c757d;
    font-style: italic;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .otm-opening-times {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .otm-facility-name {
        color: #f7fafc;
    }
    
    .otm-times {
        color: #cbd5e0;
    }
    
    .otm-date {
        color: #a0aec0;
    }
    
    .otm-table {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .otm-table th {
        background: #4a5568;
        color: #e2e8f0;
        border-color: #718096;
    }
    
    .otm-table td {
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .otm-table tbody tr:hover {
        background-color: #4a5568;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .otm-table {
        font-size: 12px;
    }
    
    .otm-table th,
    .otm-table td {
        padding: 8px 12px;
    }
    
    .otm-opening-times {
        padding: 12px;
    }
    
    .otm-facility-name {
        font-size: 16px;
    }
    
    .otm-times {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .otm-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .otm-opening-times {
        margin: 8px 0;
        padding: 8px;
    }
}

/* Animation for status changes */
.otm-status {
    transition: all 0.3s ease;
}

.otm-opening-times {
    transition: all 0.3s ease;
}

/* Weekly Schedule Styles */
.otm-schedule {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.otm-schedule-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.otm-schedule-title {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
}

.otm-schedule-subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.otm-schedule-table {
    padding: 0;
}

.otm-schedule-row {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.otm-schedule-row:hover {
    background-color: #f8f9fa;
}

.otm-schedule-row:last-child {
    border-bottom: none;
}

.otm-schedule-row.otm-today {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.otm-schedule-day {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.otm-day-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    min-width: 80px;
}

.otm-today-indicator {
    background: #2196f3;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.otm-schedule-times {
    flex: 1;
    text-align: right;
}

.otm-schedule-times .otm-times {
    font-size: 16px;
    font-weight: 500;
    color: #2e7d32;
}

.otm-schedule-times .otm-closed {
    font-size: 16px;
    font-weight: 500;
    color: #c62828;
}

.otm-schedule-notice {
    background: #fff3e0;
    border-top: 1px solid #ffcc02;
    padding: 16px 20px;
    display: flex;
    gap: 12px;
}

.otm-notice-icon {
    color: #f57c00;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.otm-notice-content {
    flex: 1;
}

.otm-override-notice {
    margin-bottom: 8px;
    font-size: 14px;
}

.otm-override-notice:last-child {
    margin-bottom: 0;
}

.otm-schedule-footer {
    background: #f8f9fa;
    padding: 12px 20px;
    border-top: 1px solid #e9ecef;
}

.otm-bank-holidays {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
}

/* Schedule countdown styling to match row styling */
.otm-schedule-row .otm-countdown {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 0 0 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
    box-shadow: none;
    background: #2196f3;
    color: white;
}

.otm-schedule-row .otm-countdown-opening {
    background: #4caf50;
}

.otm-schedule-row .otm-countdown-closing {
    background: #ff9800;
    color: #212529;
}

.otm-schedule-row .otm-countdown-reopens {
    background: #17a2b8;
    color: white;
}

/* Style variants - only modern style supported */

/* Responsive design for schedule */
@media (max-width: 768px) {
    .otm-schedule {
        margin: 16px 0;
        border-radius: 8px;
    }
    
    .otm-schedule-header {
        padding: 16px;
    }
    
    .otm-schedule-title {
        font-size: 20px;
    }
    
    .otm-schedule-row {
        padding: 12px 16px;
    }
    
    .otm-day-name {
        font-size: 14px;
        min-width: 60px;
    }
    
    .otm-schedule-times .otm-times,
    .otm-schedule-times .otm-closed {
        font-size: 14px;
    }
    
    .otm-schedule-notice {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .otm-schedule-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .otm-schedule-times {
        text-align: left;
        width: 100%;
    }
    
    .otm-day-name {
        min-width: auto;
    }
}

/* Normal Opening Times Reveal */
.otm-normal-times-reveal {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    margin: 20px 0;
    padding: 16px;
}

.otm-toggle-normal-times {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.otm-toggle-normal-times:hover {
    background: #5a67d8;
}

.otm-toggle-normal-times:active {
    background: #4c51bf;
    transform: translateY(1px);
}

.otm-normal-times-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    margin-top: 16px;
}

.otm-normal-times-content.otm-show {
    max-height: 600px;
}

.otm-normal-times-title {
    color: #333333;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding: 12px 0;
    border-bottom: 2px solid #e1e5e9;
}

/* Normal times schedule rows */
.otm-normal-times-reveal .otm-schedule-row {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 16px;
    transition: background-color 0.2s ease;
}

.otm-normal-times-reveal .otm-schedule-row:hover {
    background: #f8f9fa;
}

.otm-normal-times-reveal .otm-day-name {
    color: #666666;
    font-weight: 500;
}

.otm-normal-times-reveal .otm-times {
    color: #666666;
    font-weight: 500;
}

.otm-normal-times-reveal .otm-closed {
    color: #999999;
    font-style: italic;
}

/* Print styles */
@media print {
    .otm-opening-times,
    .otm-table,
    .otm-schedule {
        background: white !important;
        border: 1px solid #000 !important;
        color: #000 !important;
        box-shadow: none !important;
    }
    
    .otm-schedule-header {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
    
    .otm-schedule-row.otm-today {
        background: #f5f5f5 !important;
        border-left: 2px solid #000 !important;
    }
    
    .otm-today-indicator {
        background: #000 !important;
        color: #fff !important;
    }
    
    .otm-status-open {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #000;
    }
    
    .otm-status-closed {
        background: #f0f0f0 !important;
        color: #000 !important;
        border: 1px solid #000;
    }
    
    .otm-normal-times-reveal {
        background: white !important;
        border: 1px solid #000 !important;
    }
    
    .otm-toggle-normal-times {
        background: #f0f0f0 !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }
}