/* Court Booking System Styles */

.court-booking-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page-title {
    text-align: center;
    color: #334EAC;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: bold;
}

/* Booking Form Styles */
.booking-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.booking-section h2 {
    color: #334EAC;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group label {
    font-weight: 600;
    color: #334EAC;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #334EAC;
    box-shadow: 0 0 0 3px rgba(51, 78, 172, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #334EAC 0%, #081F5C 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 78, 172, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #334EAC;
    padding: 0.75rem 1.5rem;
    border: 2px solid #334EAC;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 0.5rem;
}

.btn-secondary:hover {
    background: #334EAC;
    color: white;
}

/* Bookings List Styles */
.bookings-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.bookings-section h2 {
    color: #334EAC;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.bookings-controls {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.bookings-list {
    display: grid;
    gap: 1rem;
}

.booking-card {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

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

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

.booking-name {
    font-weight: 600;
    color: #334EAC;
    font-size: 1.1rem;
}

.booking-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.booking-time {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.time-slot {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.time-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.time-value {
    font-weight: 600;
    color: #334EAC;
}

.booking-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #c82333;
}

.loading {
    text-align: center;
    color: #6c757d;
    padding: 2rem;
    font-style: italic;
}

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

.calendar-section h2 {
    color: #334EAC;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

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

.month-display {
    font-size: 1.2rem;
    font-weight: 600;
    color: #334EAC;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-header {
    background: #334EAC;
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
}

.calendar-day {
    background: white;
    padding: 1rem;
    min-height: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.other-month {
    background: #f8f9fa;
    color: #adb5bd;
}

.calendar-day.today {
    background: #e3f2fd;
    border: 2px solid #334EAC;
}

.calendar-day.has-bookings {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.day-number {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.booking-indicator {
    width: 8px;
    height: 8px;
    background: #ffc107;
    border-radius: 50%;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.event-chip {
    background: #f1f5f9;
    border-left: 4px solid #94a3b8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-chip .time {
    font-weight: 600;
}

.event-chip.court-b1 {
    border-left-color: #3b82f6;
    background: #eff6ff;
    color: #1e3a8a;
}

.event-chip.court-b2 {
    border-left-color: #10b981;
    background: #ecfdf5;
    color: #065f46;
}

.event-chip.court-basketball {
    border-left-color: #f59e0b;
    background: #fffbeb;
    color: #92400e;
}

.more-chip {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.close:hover {
    color: #334EAC;
}

/* Message Container */
.message-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1001;
    max-width: 400px;
}

.message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .court-booking-container {
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .calendar-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        font-size: 0.8rem;
    }

    .calendar-day {
        padding: 0.5rem;
        min-height: 60px;
    }

    .booking-time {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
}