/* Global Styles - Applied to all pages */
body {
    font-family: Arial, sans-serif;
    max-width: 1400px;
    margin: 50px auto;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    color: #333;
    text-align: center;
}

h2 {
    color: #333;
}

/* Form Elements - Common across multiple pages */
.form-group {
    margin-bottom: 25px;
}

/* Booking page uses smaller margin */
.booking-form .form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
}

input[type="date"],
input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

/* Buttons - Common styling */
button {
    background-color: #007bff;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
}

button:hover {
    background-color: #0056b3;
}

/* Navigation Links - Used on multiple pages */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #007bff;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* Homepage Specific Styles */
.sports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.sport-card {
    background-color: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: #333;
}

.sport-card:hover {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-5px);
}

.sport-card h2 {
    margin: 0;
    font-size: 24px;
}

/* Booking Page Specific Styles */
.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

button.success {
    background-color: #28a745;
}

button.success:hover {
    background-color: #218838;
}

/* Booking Confirmation Page Specific Styles */
.confirmation-container {
    text-align: center;
}

.success-icon {
    font-size: 60px;
    color: #28a745;
    margin-bottom: 20px;
}

.thank-you-message {
    color: #666;
    font-size: 18px;
    margin-bottom: 40px;
}

.booking-summary {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: left;
}

.booking-summary h2 {
    color: #333;
    margin-top: 0;
    text-align: center;
    margin-bottom: 20px;
}

.booking-detail {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
}

.booking-detail:last-child {
    border-bottom: none;
}

.booking-label {
    font-weight: bold;
    color: #555;
}

.booking-value {
    color: #333;
}

.reference-number {
    background-color: #007bff;
    color: white;
    padding: 15px;
    border-radius: 4px;
    font-size: 24px;
    font-weight: bold;
    margin: 20px 0;
}

/* Time Slot Selection Styles */
.time-slots-section {
    display: none;
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.time-slots-section.visible {
    display: block;
}

.time-slots-section h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.time-slots-section p {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

.courts-grid {
    display: grid;
    grid-template-columns: repeat(var(--court-columns, 4), 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 1200px) {
    body {
        max-width: 1000px;
    }
    
    .courts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        max-width: 100%;
        margin: 20px auto;
        padding: 10px;
    }
    
    .container {
        padding: 20px;
    }
    
    .courts-grid {
        grid-template-columns: 1fr;
    }
}

.court-column {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.court-header {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.court-type-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
}

/* Time slot row container - wraps weather cell + time slot for outdoor courts */
.time-slot-row {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
    align-items: stretch;  /* Both elements stretch to same height */
}

.time-slot-row .time-slot {
    flex: 1;
    margin-bottom: 0;  /* Remove margin since row already has it */
}

.time-slot {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1.4;  /* Consistent line height */
}

.time-slot.available {
    background-color: white;
    border: 2px solid #28a745;
    color: #28a745;
}

.time-slot.available:hover {
    background-color: #28a745;
    color: white;
}

.time-slot.booked {
    background-color: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
    cursor: not-allowed;
}

.time-slot.selected {
    background-color: #007bff;
    border: 2px solid #007bff;
    color: white;
}

.time-display {
    font-weight: bold;
}

.weather-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    min-width: 40px;
    flex-shrink: 0;
    box-sizing: border-box;
    line-height: 1.4;  /* Match time slot line height */
}

.weather-emoji {
    font-size: 18px;
}

.hidden-fields {
    display: none;
}

.selection-info {
    display: none;
    background-color: #e7f3ff;
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.selection-info.visible {
    display: block;
}

.selection-info p {
    margin: 5px 0;
    color: #333;
}

.selection-info strong {
    color: #007bff;
}