/**
 * Openingstijden Styles
 * Table layout for opening hours display
 */

/* Container Styles */
.openingstijden-container {
    margin: calc(var(--spacing-unit) * 1.5) 0;
    font-family: var(--font-family-base);
    max-width: 800px;
    margin: 0 auto;
}

.openingstijden-title {
    margin-bottom: calc(var(--spacing-unit) * 1.25);
    font-size: 1.2em;
    font-weight: var(--font-weight-normal);
    color: var(--text-color);
}

.openingstijden-error {
    padding: calc(var(--spacing-unit) * 1.875);
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: var(--border-radius);
    margin: calc(var(--spacing-unit) * 1.25) 0;
}

/* Table Wrapper */
.openingstijden-table-wrapper {
    overflow-x: auto;
    margin: calc(var(--spacing-unit) * 1) 0;
}

/* Table Styles */
.openingstijden-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

/* Table Header */
.openingstijden-table thead {
    background-color: rgba(var(--primary-color-rgb, 1, 46, 183), 0.1);
}

.openingstijden-table th {
    padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1);
    text-align: left;
    font-weight: 500;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.openingstijden-table th.day-header {
    width: 25%;
    min-width: 100px;
}

.openingstijden-table th.this-week-header,
.openingstijden-table th.next-week-header {
    width: 37.5%;
    text-align: center;
}

/* Table Body */
.openingstijden-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-duration) var(--transition-ease);
}

/* Odd/Even Row Styling */
.openingstijden-table tbody tr:nth-child(odd) {
    background-color: rgba(255, 255, 255, 0.5);
}

.openingstijden-table tbody tr:nth-child(even) {
    background-color: rgba(248, 248, 248, 0.8);
}

.openingstijden-table tbody tr:hover {
    background-color: rgba(1, 46, 183, 0.05) !important;
}

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

.openingstijden-table td {
    padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1);
    vertical-align: middle;
    font-size: 0.85em;
}

/* Day Name Column */
.openingstijden-table .day-name {
    font-weight: 500;
    color: var(--text-color);
}

/* Hours Columns */
.openingstijden-table .this-week-hours,
.openingstijden-table .next-week-hours {
    text-align: center;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}

.openingstijden-table .open {
    color: var(--secondary-color);
    font-weight: 600;
}

.openingstijden-table .closed {
    color: var(--text-color);
    font-style: italic;
}

/* Special Days Styling */
.openingstijden-table .special-day {
    position: relative;
    font-weight: 600;
}

.openingstijden-table .special-day.open {
    color: #e67e22; /* Orange for special open days */
}

.openingstijden-table .special-day.closed {
    color: var(--text-color); /* Black for special closed days */
}

.openingstijden-table .special-label {
    display: block;
    font-size: 0.75em;
    font-weight: 400;
    font-style: italic;
    margin-top: 2px;
    color: #666;
    line-height: 1.2;
}

.openingstijden-row.highlight-today .special-label {
    color: var(--text-color);
    opacity: 0.8;
}

/* Today Highlight */
.openingstijden-row.highlight-today {
    background-color: rgba(91, 194, 139, 0.1) !important;
    border-left: 4px solid var(--secondary-color);
}

.openingstijden-row.highlight-today:hover {
    background-color: rgba(91, 194, 139, 0.2) !important;
}

.openingstijden-row.highlight-today .day-name {
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .openingstijden-table {
        font-size: 0.8em;
    }
    
    .openingstijden-table th,
    .openingstijden-table td {
        padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit) * 0.75);
    }
    
    .openingstijden-table th.day-header {
        width: 30%;
    }
    
    .openingstijden-table th.this-week-header,
    .openingstijden-table th.next-week-header {
        width: 35%;
    }
}

@media (max-width: 480px) {
    .openingstijden-table {
        font-size: 0.75em;
    }
    
    .openingstijden-table th,
    .openingstijden-table td {
        padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit) * 0.625);
    }
    
    .openingstijden-title {
        font-size: 1.1em;
    }
}

/* Type Specific Styling */
.openingstijden-type-algemeen .openingstijden-table {
    border-color: var(--border-color);
}

.openingstijden-type-algemeen .openingstijden-table thead {
    background-color: rgba(1, 46, 183, 0.08);
}

.openingstijden-type-algemeen .openingstijden-table th {
    color: var(--text-color);
    border-bottom-color: var(--border-color);
}

.openingstijden-type-post .openingstijden-table {
    border-color: var(--border-color);
}

.openingstijden-type-post .openingstijden-table thead {
    background-color: rgba(91, 194, 139, 0.08);
}

.openingstijden-type-post .openingstijden-table th {
    color: var(--text-color);
    border-bottom-color: var(--border-color);
}

/* Print Styles */
@media print {
    .openingstijden-table {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .openingstijden-table th {
        background-color: #f0f0f0 !important;
        color: #000 !important;
    }
    
    .openingstijden-row.highlight-today {
        background-color: #f0f0f0 !important;
        border-left: 2px solid #000 !important;
    }
}