.courts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.court-card {
    background: var(--muted);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.court-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.court-card .img-box {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.court-info {
    padding: 20px;
}

.court-info .h3 {
    margin-bottom: 10px;
}

.court-info p {
    margin: 4px 0;
    color: var(--sub);
}

.court-info .price {
    font-weight: bold;
    color: var(--sand);
    margin-top: 10px;
}

.court-info .price-description {
    font-size: 0.9em;
    color: var(--sub);
    margin-top: 10px;
}

.court-info .status {
    font-style: italic;
    color: var(--sand);
}

.book-btn:disabled {
    background-color: var(--muted);
    color: var(--sub);
    cursor: not-allowed;
}

.booking-section {
    background: var(--bg2);
    padding: 60px 0;
    border-top: 1px solid var(--line);
}

.booking-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.calendar-container h3,
.time-container h3,
.summary-container h3 {
    color: var(--sand);
    margin-bottom: 15px;
}

.form-input {
    width: 100%;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    margin-bottom: 15px;
}

.time-container label {
    display: block;
    margin-bottom: 5px;
    color: var(--sub);
}

.summary-container p {
    color: var(--sub);
    margin: 8px 0;
}

.summary-container span {
    font-weight: bold;
    color: var(--text);
}

.customer-details {
    margin-top: 20px;
}

#bookNowBtn {
    width: 100%;
    margin-top: 10px;
}

.booking-notes {
    margin-top: 40px;
}

.note-box {
  border: 1px dashed rgba(255,255,255,.18);
  background: rgba(255,255,255,.03);
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--sub);
}

.note-box ul {
    padding-left: 20px;
    margin: 0;
}

.note-box li {
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .booking-details {
        grid-template-columns: 1fr;
    }
}

/* Calendar Styles */
.calendar {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--line);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#currentMonthYear {
    font-weight: bold;
    font-size: 1.2em;
}

.calendar-nav {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5em;
    cursor: pointer;
}

.calendar-body {
    display: grid;
    gap: 10px;
}

.calendar-weekdays,
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}

.calendar-weekdays div {
    font-weight: bold;
    color: var(--sub);
}

.calendar-days div {
    padding: 10px 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.calendar-days div:hover {
    background: var(--muted);
}

.calendar-days .selected {
    background: var(--sand);
    color: var(--bg);
    font-weight: bold;
}

.calendar-days .disabled {
    color: var(--sub);
    opacity: 0.5;
    cursor: not-allowed;
}

/* Custom Select Styles */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.custom-select-wrapper select {
    display: none; /* Hide original select */
}

.select-trigger {
    width: 100%;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.select-trigger::after {
    content: '▼';
    font-size: 0.7em;
    color: var(--sub);
}

.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--muted);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-top: 4px;
    z-index: 10;
    display: none; /* Hidden by default */
    max-height: 220px; /* (padding + line-height) * 5 -> (24 + 20) * 5 = 220 */
    overflow-y: auto;
}

.custom-select-wrapper.is-open .custom-options {
    display: block;
}

.custom-option {
    padding: 12px;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 20px;
}

.custom-option:hover {
    background: var(--bg);
}

.custom-option.is-selected {
    background: var(--sand);
    color: var(--bg);
    font-weight: bold;
}

.custom-select-wrapper.is-disabled .select-trigger {
    background: var(--muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Styling for Booked/Disabled Time Slots in Dropdown */
.custom-option.disabled-option {
    background-color: #2a2a2a; /* Dark gray */
    color: #555; /* Dim text */
    text-decoration: line-through; /* Visual cue it's taken */
    cursor: not-allowed;
    pointer-events: none; /* Prevents clicking */
    font-size: 0.9em;
}