/* Custom Styles for VirTra Booking System */

:root {
    --primary-blue: #1e3a8a;
    --secondary-blue: #3b82f6;
    --success-green: #10b981;
    --warning-yellow: #f59e0b;
    --danger-red: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-in-out;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

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

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

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input.error {
    border-color: var(--danger-red);
}

.error-message {
    color: var(--danger-red);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--secondary-blue);
    color: white;
}

.btn-success {
    background: var(--success-green);
    color: white;
}

.btn-danger {
    background: var(--danger-red);
    color: white;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

/* Calendar Styles */
.calendar-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.calendar-day.available {
    background: #f0fdf4;
    color: #166534;
}

.calendar-day.available:hover {
    background: #dcfce7;
    transform: scale(1.05);
}

.calendar-day.limited {
    background: #fef9c3;
    color: #854d0e;
}

.calendar-day.booked {
    background: #fee2e2;
    color: #991b1b;
    cursor: not-allowed;
}

.calendar-day.blocked {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.calendar-day.selected {
    background: var(--secondary-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Time Slot Styles */
.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.time-slot {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.time-slot.available {
    background: white;
    border-color: var(--success-green);
}

.time-slot.available:hover {
    background: #f0fdf4;
    transform: scale(1.05);
}

.time-slot.selected {
    background: var(--secondary-blue);
    color: white;
    border-color: var(--secondary-blue);
}

.time-slot.booked {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.progress-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    flex: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s;
}

.progress-step.active .step-circle {
    background: var(--secondary-blue);
    color: white;
    border-color: var(--secondary-blue);
}

.progress-step.completed .step-circle {
    background: var(--success-green);
    color: white;
    border-color: var(--success-green);
}

.step-label {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.progress-step.active .step-label {
    color: var(--secondary-blue);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Alert Styles */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.alert-success {
    background: #d1fae5;
    border-left: 4px solid var(--success-green);
    color: #065f46;
}

.alert-warning {
    background: #fef3c7;
    border-left: 4px solid var(--warning-yellow);
    color: #92400e;
}

.alert-danger {
    background: #fee2e2;
    border-left: 4px solid var(--danger-red);
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    border-left: 4px solid var(--secondary-blue);
    color: #1e40af;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--secondary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .calendar-grid {
        gap: 0.25rem;
    }
    
    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .progress-steps {
        font-size: 0.75rem;
    }
    
    .step-circle {
        width: 30px;
        height: 30px;
        font-size: 0.875rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    background-color: #1f2937;
    color: white;
    text-align: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
    white-space: nowrap;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Card Hover Effect */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Print Styles */
@media print {
    nav, footer, button, .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .modal-overlay {
        position: relative;
        background: white;
    }
}
