body {
    background-image: url('../img/pickleball_background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Semi-transparent container background */
main.container {
    background-color: rgba(17, 24, 39, 0.85);
    border-radius: var(--pico-border-radius);
    padding: 2rem;
    margin: 0 auto;
    backdrop-filter: blur(5px);
}

.court-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.court-column {
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    padding: 1rem;
    background: var(--pico-card-background-color);
}

.court-column h3 {
    margin-top: 0;
    font-size: .95rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--pico-primary);
    height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.time-slot {
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: var(--pico-border-radius);
    text-align: center;
    font-size: 0.95rem;
    height: 3rem;
    min-height: 3rem;
    max-height: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.time-slot.available {
    background: var(--pico-primary-background);
    cursor: pointer;
    border: 1px solid var(--pico-primary);
    color: #000;
}

.time-slot.available:hover {
    background: var(--pico-primary);
    color: var(--pico-primary-inverse);
}

.time-slot.reserved {
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    opacity: 0.6;
    cursor: not-allowed;
}

.time-slot.reserved .time {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.1;
}

.time-slot.reserved .name {
    font-size: 0.7rem;
    opacity: 0.8;
    line-height: 1.1;
    margin-top: 0.1rem;
}

/* Homeowners only slots - look like available but with structured text */
.time-slot.homeowners-only {
    background: var(--pico-primary-background);
    cursor: pointer;
    border: 1px solid var(--pico-primary);
    color: #000;
}

.time-slot.homeowners-only:hover {
    background: var(--pico-primary);
    color: var(--pico-primary-inverse);
}

.time-slot.homeowners-only .time {
    font-size: 0.85rem;
    line-height: 1.1;
}

.time-slot.homeowners-only .name {
    font-size: 0.7rem;
    opacity: 0.8;
    line-height: 1.1;
    margin-top: 0.1rem;
}

.info-panel {
    background: var(--pico-secondary-background);
    padding: 0.5rem 1rem;
    border-radius: var(--pico-border-radius);
    margin-bottom: 1rem;
    border-left: 4px solid var(--pico-primary);
}

.modal-content {
    max-width: 700px;
}

.form-section {
    margin-top: 1rem;
}

/* Form buttons styling */
#form-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

#form-buttons #submit-btn {
    flex: 2;
}

#form-buttons #cancel-btn {
    flex: 1;
}

.hidden {
    display: none;
}

.message {
    padding: 1rem;
    border-radius: var(--pico-border-radius);
    margin: 1rem 0;
}

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

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

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.policies-section {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    background: var(--pico-card-background-color);
}

.policies-section h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.policies-section ul {
    margin: 0;
    padding-left: 1.5rem;
}

.policies-section li {
    margin-bottom: 0.5rem;
}

.recaptcha-container {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
}

/* Modal system - replace HTML5 dialog */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: var(--pico-card-background-color);
    border-radius: var(--pico-border-radius);
    max-width: 700px;
    width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 1rem;
    position: relative;
}

.modal-content article {
    margin: 0;
}

/* Fix close button styling */
.modal-content header {
    position: relative;
    padding-right: 3rem;
    padding-bottom: 0.5rem;
}

.modal-content header h3 {
    margin-bottom: 0.25rem;
}

.modal-content header button[aria-label="Close"] {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    background: var(--pico-secondary-background);
    border: 1px solid var(--pico-muted-border-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    color: var(--pico-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-content header button[aria-label="Close"]:hover {
    background: var(--pico-secondary-background);
}

.modal-content header button[aria-label="Close"]::before {
    content: "×";
    display: block;
    line-height: 0.8;
    margin-top: -0.1rem;
}

