/**
 * Computer Booking Interface Styles
 * Modern, clean design for teacher booking interface
 */

/* Main Header */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header h1 {
    margin: 0;
    font-size: 1.8rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}

.card h2 {
    margin-top: 0;
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="number"] {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-hint {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.25rem;
}

/* Lesson Hours Chips */
.lesson-hours-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.hour-chip {
    cursor: pointer;
    user-select: none;
}

.hour-chip input[type="checkbox"] {
    display: none;
}

.chip-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid #e0e0e0;
    color: #555;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.hour-chip:hover .chip-content {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.hour-chip input[type="checkbox"]:checked + .chip-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(118, 75, 162, 0.3);
}

/* Availability Info */
.availability-info {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.availability-info.success {
    background-color: #f0fdf4;
    border-color: #86efac;
}

.availability-info.error {
    background-color: #fef2f2;
    border-color: #fca5a5;
}

.availability-info h3 {
    margin-top: 0;
    font-size: 1.2rem;
}

.availability-breakdown {
    margin-top: 1rem;
}

.hour-availability {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.hour-availability:last-child {
    border-bottom: none;
}

.hour-availability.unavailable {
    opacity: 0.6;
}

.hour-label {
    font-weight: 600;
    min-width: 80px;
}

.availability-count {
    min-width: 120px;
}

.availability-bar {
    flex: 1;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.availability-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #86efac 0%, #22c55e 100%);
    transition: width 0.3s;
}

.availability-error .availability-bar-fill {
    background: linear-gradient(90deg, #fca5a5 0%, #ef4444 100%);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-cancel {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background-color: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background-color: #667eea;
    color: white;
}

.btn-cancel {
    background-color: #fef2f2;
    color: #ef4444;
    border: 1px solid #fca5a5;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-cancel:hover {
    background-color: #ef4444;
    color: white;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

/* Bookings Table */
.bookings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.bookings-table thead {
    background-color: #f8f9ff;
}

.bookings-table th {
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #667eea;
}

.bookings-table td {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.bookings-table tbody tr:hover {
    background-color: #f8f9ff;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-approved {
    background-color: #d1fae5;
    color: #065f46;
}

.status-picked-up {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #888;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background-color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 300px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-right: 4px solid #22c55e;
}

.toast-error {
    border-right: 4px solid #ef4444;
}

.toast-info {
    border-right: 4px solid #3b82f6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .lesson-hours-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    .bookings-table {
        font-size: 0.9rem;
    }
    
    .bookings-table th,
    .bookings-table td {
        padding: 0.5rem;
    }
}
