/**
 * Classroom Booking System - Custom Styles
 * สไตล์เพิ่มเติมสำหรับระบบจองห้องเรียน
 */

/* Base Font */
body {
    font-family: 'Prompt', sans-serif;
}

/* Gradient Backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Gradient Buttons */
.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.2s ease;
}

.btn-gradient:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Card hover effect */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Button pulse effect */
.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
}

/* Status badges */
.status-pending { 
    background-color: #fef3c7; 
    color: #92400e; 
}

.status-approved { 
    background-color: #d1fae5; 
    color: #065f46; 
}

.status-rejected { 
    background-color: #fee2e2; 
    color: #991b1b; 
}

.status-cancelled { 
    background-color: #f3f4f6; 
    color: #4b5563; 
}

/* Table styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
}

.data-table th:first-child {
    border-radius: 8px 0 0 0;
}

.data-table th:last-child {
    border-radius: 0 8px 0 0;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.data-table tbody tr:hover {
    background-color: #f9fafb;
}

.data-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 8px;
}

.data-table tbody tr:last-child td:last-child {
    border-radius: 0 0 8px 0;
}

/* Modal backdrop */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.show {
    opacity: 1;
}

/* Modal content */
.modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-content.show {
    transform: scale(1);
    opacity: 1;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background-color: #10b981;
    color: white;
}

.toast-error {
    background-color: #ef4444;
    color: white;
}

.toast-warning {
    background-color: #f59e0b;
    color: white;
}

.toast-info {
    background-color: #3b82f6;
    color: white;
}

/* Time slot styles */
.time-slot {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.time-slot-lecture {
    background-color: #dbeafe;
    color: #1e40af;
}

.time-slot-lab {
    background-color: #fce7f3;
    color: #9d174d;
}

.time-slot-seminar {
    background-color: #f0fdf4;
    color: #166534;
}

/* Day badge */
.day-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.75rem;
}

.day-mon { background-color: #fef3c7; color: #92400e; }
.day-tue { background-color: #fce7f3; color: #9d174d; }
.day-wed { background-color: #d1fae5; color: #065f46; }
.day-thu { background-color: #fed7aa; color: #9a3412; }
.day-fri { background-color: #dbeafe; color: #1e40af; }
.day-sat { background-color: #e0e7ff; color: #3730a3; }
.day-sun { background-color: #fee2e2; color: #991b1b; }

/* Print styles */
@media print {
    nav, .no-print, .btn, button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card, .rounded-xl, .rounded-2xl {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .toast {
        left: 20px;
        right: 20px;
    }
}

/* Schedule Card Styles */
.schedule-card {
    transition: all 0.2s ease;
}

.schedule-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Room Card Styles */
.room-card {
    transition: all 0.2s ease;
}

.room-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Subject Card Styles */
.subject-card {
    transition: all 0.15s ease;
}

.subject-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Tab Button Styles */
.tab-btn {
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #f3f4f6;
}

.tab-btn.active {
    border-bottom-color: #7c3aed;
    color: #7c3aed;
    background: #faf5ff;
}

/* Day Color Badges */
.day-1 { background-color: #ffe5b6; border-color: #d4a84a; }
.day-2 { background-color: #f6ced2; border-color: #e091a3; }
.day-3 { background-color: #cbe6cb; border-color: #6db56d; }
.day-4 { background-color: #efceb8; border-color: #d4956a; }
.day-5 { background-color: #cce2ef; border-color: #6aabcf; }
.day-6 { background-color: #efccee; border-color: #c78cc5; }
.day-7 { background-color: #ffd3d3; border-color: #e08a8a; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease;
}

.animate-slideIn {
    animation: slideIn 0.3s ease;
}
