/**
 * Unified Time Picker Styles
 * Stellt sicher, dass die Zeitauswahl immer sichtbar ist
 */

.unified-time-section,
.time-section {
    /* Sichtbarkeit sicherstellen */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    
    /* Styling */
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.unified-time-section .time-section-header,
.time-section .time-section-header {
    margin-bottom: 15px;
}

.unified-time-section .time-section-header h4,
.time-section .time-section-header h4 {
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.unified-time-section .time-options,
.time-section .time-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.unified-time-section .time-option,
.time-section .time-option {
    display: flex;
    align-items: center;
    padding: 10px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.unified-time-section .time-option:hover,
.time-section .time-option:hover {
    background: #f0f0f0;
    border-color: #007bff;
}

.unified-time-section .time-radio,
.time-section .time-radio {
    margin-right: 10px;
}

.unified-time-section .time-label,
.time-section .time-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex: 1;
}

.unified-time-section .date-selection-container,
.unified-time-section .time-slots-container,
.time-section .date-selection-container,
.time-section .time-slots-container {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.unified-time-section .date-options,
.time-section .date-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.unified-time-section .date-option,
.time-section .date-option {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.unified-time-section .time-slots-grid,
.time-section .time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.unified-time-section .time-slot,
.time-section .time-slot {
    padding: 8px;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.unified-time-section .time-slot:hover,
.time-section .time-slot:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.unified-time-section .time-slot.selected,
.time-section .time-slot.selected {
    background: #007bff;
    color: white;
    border-color: #0056b3;
}

/* Clean Style specific adjustments */
.clean-style .unified-time-section,
.clean-style .time-section {
    margin: 10px 0;
}

/* Cart Modal specific */
#cartModal .unified-time-section,
#cart-modal .time-section,
#cart-modal .unified-time-section,
#cart-modal .time-section {
    margin: 10px 0;
}

/* Modal Styles */
.time-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.time-picker-modal[style*="display: flex"] {
    display: flex !important;
}

.time-picker-modal .time-picker-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-picker-modal .time-picker-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.time-picker-modal .time-picker-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 10px 10px 0 0;
    flex-shrink: 0;
}

.time-picker-modal .time-picker-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.time-picker-modal .close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.time-picker-modal .close-modal:hover {
    color: #000;
    background: #f0f0f0;
}

.time-picker-modal .time-picker-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.time-picker-modal .sticky-selection-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 5;
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
}

.time-picker-modal .modal-date-selection {
    margin-bottom: 15px;
}

.time-picker-modal .modal-time-selection {
    margin-bottom: 0;
}

.time-picker-modal .time-grid-container {
    padding: 20px;
}

.time-picker-modal .modal-date-selection h4,
.time-picker-modal .modal-time-selection h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.time-picker-modal .date-buttons {
    display: flex;
    gap: 10px;
}

.time-picker-modal .date-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.time-picker-modal .date-btn:hover {
    background: #f0f0f0;
}

.time-picker-modal .date-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.time-picker-modal .time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.time-picker-modal .time-slot {
    padding: 10px;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.time-picker-modal .time-slot:hover:not(.disabled) {
    background: #e2e6ea;
    border-color: #007bff;
}

.time-picker-modal .time-slot.selected {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.time-picker-modal .time-slot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f0f0f0;
}

.time-picker-modal .time-picker-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: white;
    border-radius: 0 0 10px 10px;
    flex-shrink: 0;
}

.time-picker-modal .btn-primary,
.time-picker-modal .btn-secondary {
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.time-picker-modal .btn-primary {
    background: #007bff;
    color: white;
}

.time-picker-modal .btn-primary:hover:not(:disabled) {
    background: #0056b3;
}

.time-picker-modal .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.time-picker-modal .btn-secondary {
    background: #6c757d;
    color: white;
}

.time-picker-modal .btn-secondary:hover {
    background: #545b62;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .unified-time-section,
    .time-section {
        padding: 10px;
    }
    
    .unified-time-section .time-slots-grid,
    .time-section .time-slots-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .time-picker-modal .time-picker-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
    }
    
    .time-picker-modal .time-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .time-picker-modal .time-picker-header,
    .time-picker-modal .time-picker-footer {
        padding: 15px;
    }
    
    .time-picker-modal .sticky-selection-header {
        padding: 15px 15px 10px 15px;
    }
    
    .time-picker-modal .time-grid-container {
        padding: 15px;
    }
}