/* Pilates Booking System Enhanced - Styles */

/* Timetable Container */
.pbs-timetable-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Week Selector */
.pbs-week-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

#current-week-display {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Buttons */
.pbs-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #007cba;
    color: white;
}

.pbs-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pbs-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pbs-btn-secondary {
    background: #6c757d;
}

.pbs-btn-secondary:hover {
    background: #5a6268;
}

.pbs-btn-primary {
    background: #28a745;
}

.pbs-btn-primary:hover {
    background: #218838;
}

.pbs-btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.pbs-btn-block {
    display: block;
    width: 100%;
}

/* Timetable Grid */
.pbs-timetable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.pbs-timetable thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pbs-timetable th {
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.pbs-timetable th:last-child {
    border-right: none;
}

.pbs-timetable td {
    padding: 10px;
    text-align: center;
    border-right: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
    min-height: 80px;
}

.pbs-timetable td:last-child {
    border-right: none;
}

.pbs-time-slot {
    font-weight: 600;
    background: #f8f9fa;
    color: #495057;
}

/* Class Item */
.pbs-class-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin: 2px;
    position: relative;
    transition: all 0.3s ease;
}

.pbs-class-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.pbs-class-item.selected {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.pbs-class-item strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.pbs-spots-available {
    font-size: 11px;
    opacity: 0.9;
    display: block;
    margin-bottom: 8px;
}

.pbs-class-item.unavailable {
    background: #6c757d;
    opacity: 0.7;
}

.pbs-class-item.holiday {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Selected Classes Panel */
.pbs-selected-classes {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pbs-selected-classes h3 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

#selected-count {
    color: #667eea;
    font-weight: bold;
}

#selected-classes-list {
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
}

.selected-class-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

.selected-class-info {
    flex: 1;
}

.remove-class {
    color: #dc3545;
    cursor: pointer;
    font-size: 20px;
    padding: 0 10px;
    transition: transform 0.2s;
}

.remove-class:hover {
    transform: scale(1.2);
}

.pbs-booking-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.pbs-booking-actions button {
    flex: 1;
}

/* Modal */
.pbs-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.pbs-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pbs-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.pbs-close:hover {
    color: #000;
}

/* Form */
.pbs-form-group {
    margin-bottom: 20px;
}

.pbs-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.pbs-form-group input[type="text"],
.pbs-form-group input[type="email"],
.pbs-form-group input[type="tel"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.pbs-form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

#booking-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    max-height: 200px;
    overflow-y: auto;
}

#booking-summary h4 {
    margin-top: 0;
    color: #333;
}

.summary-class {
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

.summary-class:last-child {
    border-bottom: none;
}

/* Admin Styles */
.pbs-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.pbs-stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.pbs-stat-card h3 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
}

.pbs-stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
}

/* Messages */
.pbs-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pbs-message.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.pbs-message.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.pbs-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Loading Spinner */
.pbs-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .pbs-timetable {
        font-size: 12px;
    }
    
    .pbs-timetable th,
    .pbs-timetable td {
        padding: 5px;
    }
    
    .pbs-class-item {
        padding: 5px;
    }
    
    .pbs-btn-small {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .pbs-week-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .pbs-booking-actions {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    .pbs-week-selector,
    .pbs-booking-actions,
    .pbs-btn {
        display: none !important;
    }
    
    .pbs-timetable {
        box-shadow: none;
    }
}
