.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--sand);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h3 {
    margin-bottom: 1rem;
    color: var(--clay-dark);
}

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

.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--slate);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    margin-bottom: 1rem;
}

.form-optional {
    font-weight: 400;
    color: var(--text-muted);
}

/* Spam trap. Kept out of the layout and away from assistive tech. */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-input);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    color: var(--slate);
    transition: border-color var(--transition-normal);
    background-color: var(--white);
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--clay-dark);
    outline-offset: 3px;
    border-color: var(--clay-dark);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
}

.checkbox-group label a {
    color: var(--clay-dark);
    text-decoration: underline;
}

.checkbox-group .form-error {
    width: 100%;
}

.form-checkbox,
input[type="checkbox"],
input[type="radio"] {
    width: 24px;
    height: 24px;
    accent-color: var(--clay);
    cursor: pointer;
}

.timeslot-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeslot-option {
    position: relative;
    cursor: pointer;
}

.timeslot-option.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Visually hidden, never display:none: the radios must stay in the tab
   order and in the accessibility tree. */
.timeslot-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.timeslot-option input:focus-visible + .timeslot-card {
    outline: 3px solid var(--clay-dark);
    outline-offset: 3px;
}

.timeslot-card {
    padding: 1.25rem 1.5rem;
    border: 2px solid var(--border-input);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.timeslot-option input:checked + .timeslot-card {
    border-color: var(--clay);
    background-color: rgba(156, 102, 68, 0.05);
    box-shadow: 0 0 0 1px var(--clay);
}

.timeslot-option:hover:not(.disabled) .timeslot-card {
    border-color: var(--clay-light);
}

.timeslot-time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    padding-right: 1.25rem;
    border-right: 2px solid var(--sand);
}

.timeslot-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--clay-dark);
    line-height: 1.2;
}

.timeslot-duration {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.timeslot-duration .icon {
    margin-right: 0.2rem;
    font-size: 0.7rem;
}

.timeslot-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.timeslot-service {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--clay-dark);
}

.timeslot-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.timeslot-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.timeslot-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--clay-dark);
}

.timeslot-price small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

.timeslot-spots {
    background: var(--moss);
    color: var(--white);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    white-space: nowrap;
}

.timeslot-spots.low {
    background: var(--brick);
}

.form-error {
    color: var(--danger-action);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

.form-control.is-invalid,
input.is-invalid {
    border-color: var(--danger-action);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--sand);
}

.auth-links a {
    color: var(--clay-dark);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-links p {
    margin-top: 0.75rem;
    color: var(--text-muted);
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.btn-google {
    background-color: var(--white);
    color: var(--slate);
    border: 2px solid var(--border-input);
}

.btn-google:hover {
    background-color: var(--bg-light);
    border-color: var(--slate);
    color: var(--slate);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-input);
}

.auth-divider span {
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form .form-control {
    background-color: rgba(255, 255, 255, 0.9);
}

.booking-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.booking-for-self {
    margin-bottom: 1.5rem;
}

.user-info-card {
    background: var(--sand);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
}

.user-info-card .user-name {
    font-weight: 600;
    color: var(--clay-dark);
    margin: 0;
}

.user-info-card .user-contact {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0.2rem 0 0;
}

.booking-for-self-hint {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.link-other, .link-self {
    color: var(--clay-dark);
    text-decoration: none;
    font-weight: 500;
}

.link-other:hover, .link-self:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }

    .timeslot-card {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 1rem;
    }

    .timeslot-time-block {
        min-width: 70px;
        padding-right: 1rem;
    }

    .timeslot-time {
        font-size: 1.25rem;
    }

    .timeslot-info {
        flex-basis: calc(100% - 100px);
    }

    .timeslot-right {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
        padding-top: 0.5rem;
        border-top: 1px solid var(--sand);
    }

    .booking-form {
        padding: 1.5rem;
        margin: 0 -15px;
        border-radius: 0;
    }
}
.booking-form button[type="submit"]:disabled {
    opacity: 0.65;
    cursor: wait;
}

.booking-total {
    text-align: right;
    margin: 1.5rem 0 0;
    color: var(--slate);
}

.booking-total strong {
    color: var(--clay-dark);
    font-size: 1.15rem;
}

.booking-deposit {
    text-align: right;
    margin: 0.25rem 0 0;
    color: var(--text-muted);
}

.booking-payment-hint {
    text-align: right;
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
