* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Portfolio colors */
    --midnight-violet: #2B0A2B;
    --royal-purple: #6D016D;
    --lavender-veil: #E6D5F0;
    --morning-wisteria: #D4B8E8;
    --evening-wisteria: #C4A3DC;
    --dark-magenta: #870887;
    --tickle-me-amethyst: #B361B3;
    --deep-purple: #5F0C5F;
    --velvet-orchid: #6B4282;

    /* Dynamic Calendar + business card colors */
    --calendar-lilac: #BF90D1;
    --calendar-today: #A174B3;
    --gold: #D4C57D;
    --lilac: #FBE1FF;

    /* Text */
    --text-dark: #2B0A2B;
    --text-muted: #5C4566;
    --error: #A3123A;

    --display-font: "Bodoni Moda", Georgia, serif;
    --heading-font: "Libre Bodoni", Georgia, serif;
    --body-font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --radius: 12px;
}

html {
    background-color: var(--midnight-violet);
}

/* The hidden attribute loses to display: grid/flex rules,
   so this makes sure hidden always means hidden */
[hidden] {
    display: none !important;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(#000000, var(--deep-purple));
    color: var(--lilac);
    font-family: var(--body-font), serif;
    font-size: 1rem;
    line-height: 1.5;
}

/* Visible keyboard focus everywhere */
:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

/* Header Section */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 5%;
    background-color: var(--midnight-violet);
}

.backLink {
    color: var(--gold);
    font-weight: bold;
    text-decoration: none;
}

.backLink:hover {
    color: var(--lavender-veil);
    text-decoration: underline;
}

.businessName {
    font-family: "Fleur De Leah", cursive;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--morning-wisteria);
}

/* Intro Section */
main {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 5% 3rem;
}

.intro {
    max-width: 760px;
    margin-bottom: 2rem;
}

.intro h1 {
    font-family: var(--display-font), serif;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    line-height: 1.2;
    color: var(--morning-wisteria);
    margin-bottom: 1rem;
}

.intro p {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.tzNote {
    color: var(--evening-wisteria);
}

.tzNote strong {
    color: var(--lilac);
}

/* Booking Layout */
.booking {
    display: grid;
    gap: 1.5rem;
}

.calendarPanel,
.timeSlotPanel,
.formPanel,
.formSection {
    background-color: var(--lavender-veil);
    color: var(--text-dark);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.calendarPanel :focus-visible,
.timeSlotPanel :focus-visible,
.formPanel :focus-visible,
.formSection :focus-visible {
    outline-color: var(--royal-purple);
}

.calendarPanel h2,
.timeSlotPanel h2,
.formPanel h2,
.formSection h2 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--heading-font), serif;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    word-spacing: 0.1em;
}

.stepNumber {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--dark-magenta);
    color: #ffffff;
    font-family: var(--body-font), serif;
    font-size: 1rem;
    font-weight: bold;
}

/* Calendar */
.calendarHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.monthLabel {
    font-family: var(--heading-font), serif;
    font-size: 1.3rem;
    font-weight: 600;
}

.navBtn {
    width: 2.5rem;
    height: 2.5rem;
    border: 2px solid var(--evening-wisteria);
    border-radius: 50%;
    background-color: #ffffff;
    color: var(--dark-magenta);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.navBtn:hover:not(:disabled) {
    background-color: var(--dark-magenta);
    color: #ffffff;
}

.navBtn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.weekdays,
.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.35rem;
    text-align: center;
}

.weekdays {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-muted);
    padding-bottom: 0.4rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid var(--evening-wisteria);
}

.day {
    aspect-ratio: 1;
    min-height: 2.5rem;
    border: 2px solid transparent;
    border-radius: 8px;
    background: none;
    color: var(--text-muted);
    font: inherit;
    font-size: 1rem;
    cursor: not-allowed;
}

/* Days that can be booked */
.day[data-status="open"] {
    background-color: #ffffff;
    border-color: var(--evening-wisteria);
    color: var(--text-dark);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.day[data-status="open"]:hover {
    background-color: var(--calendar-lilac);
}

/* Transparent Days: Friday–Sunday and holidays */
.day[data-status="day-off"],
.day[data-status="closed"] {
    opacity: 0.35;
}

.day.isToday {
    border-color: var(--calendar-today);
    border-style: dashed;
}

.day.isSelected {
    background-color: var(--dark-magenta);
    border-color: var(--dark-magenta);
    color: #ffffff;
}

.calendarNote {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Time Slots */
.hint {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--evening-wisteria);
    border-radius: 8px;
    background-color: #ffffff;
    color: var(--text-dark);
    font: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.slot:hover {
    background-color: var(--calendar-lilac);
}

.slotLocal {
    font-size: 1.05rem;
    font-weight: bold;
}

.slotPacific {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.slot[aria-pressed="true"] {
    background-color: var(--dark-magenta);
    border-color: var(--dark-magenta);
    color: #ffffff;
}

.slot[aria-pressed="true"] .slotPacific {
    color: var(--lavender-veil);
}

/* Form */
.selectionSummary {
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border-left: 4px solid var(--dark-magenta);
    background-color: #ffffff;
    border-radius: 6px;
    font-weight: 600;
}

.field {
    margin-bottom: 1rem;
}

.field label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.required {
    color: var(--dark-magenta);
}

.optional {
    font-weight: normal;
    color: var(--text-muted);
}

.field input,
.field textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 2px solid var(--evening-wisteria);
    border-radius: 6px;
    background-color: #ffffff;
    color: var(--text-dark);
    font: inherit;
}

.field textarea {
    resize: vertical;
}

.field input[aria-invalid="true"] {
    border-color: var(--error);
}

.fieldHint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.fieldError,
.formError {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--error);
}

.fieldError:not(:empty) {
    margin-top: 0.25rem;
}

.formError:not(:empty) {
    margin-bottom: 1rem;
}

/* Honeypot: moved off screen instead of display: none,
   because some bots skip fields they can tell are hidden */
.trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.privacyNote {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Confirmation Section */
.confirmation {
    max-width: 760px;
    background-color: var(--lavender-veil);
    color: var(--text-dark);
    border-radius: var(--radius);
    padding: 2rem;
}

.confirmation :focus-visible {
    outline-color: var(--royal-purple);
}

.confirmation h2 {
    font-family: var(--heading-font), serif;
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.confirmation h3 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
}

.nextSteps {
    padding-left: 0;
}

.nextSteps li {
    margin-bottom: 0.4rem;
}

.fallbackSummary {
    margin-top: 0.75rem;
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.confirmationActions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.bookedTime {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--dark-magenta);
    background-color: #ffffff;
    border-radius: 6px;
    font-weight: 600;
}

.rescheduleNote {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.primaryBtn {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--dark-magenta);
    border-radius: 8px;
    background-color: var(--dark-magenta);
    color: #ffffff;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

.primaryBtn:hover {
    background-color: var(--deep-purple);
    border-color: var(--deep-purple);
}

.secondaryBtn {
    display: inline-block;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--dark-magenta);
    border-radius: 8px;
    background-color: #ffffff;
    color: var(--dark-magenta);
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

.secondaryBtn:hover {
    background-color: var(--dark-magenta);
    color: #ffffff;
}

.copyStatus {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Client Form Page */
.clientForm {
    display: grid;
    gap: 1.5rem;
    max-width: 860px;
}

.requiredKey {
    color: var(--gold);
    font-weight: bold;
}

.fieldRow {
    display: grid;
    gap: 0 1.25rem;
}

/* Checkbox and radio groups */
.choiceGroup {
    border: none;
    margin-bottom: 1.25rem;
}

.choiceGroup legend {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.legendHint {
    display: block;
    font-weight: normal;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* Each option is a large, easy-to-tap pill. The whole pill is the label,
   so clicking anywhere on it ticks the box. */
.choice {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border: 2px solid var(--evening-wisteria);
    border-radius: 999px;
    background-color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.choice:hover {
    border-color: var(--tickle-me-amethyst);
}

.choice input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--dark-magenta);
    cursor: pointer;
}

/* Highlight the pill when its box is ticked */
.choice:has(input:checked) {
    background-color: var(--morning-wisteria);
    border-color: var(--dark-magenta);
}

.choiceWide {
    border-radius: 8px;
}

.choiceGroup.hasError .choice {
    border-color: var(--error);
}

.otherField {
    margin-top: 0.75rem;
    max-width: 420px;
}

.formErrorTop:empty {
    display: none;
}

.formErrorTop {
    padding: 0.75rem 1rem;
    background-color: var(--lavender-veil);
    border-left: 4px solid var(--error);
    border-radius: 6px;
}

.submitBtn {
    padding: 0.8rem 2rem;
    border: 2px solid var(--dark-magenta);
    border-radius: 999px;              /* pill shape */
    background-color: var(--dark-magenta);
    color: #ffffff;
    font: inherit;
    font-size: 1.15rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(43, 10, 43, 0.25);
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.submitBtn:hover {
    background-color: transparent;
    color: var(--dark-magenta);
    transform: translateY(-2px);
}

/* Footer Section */
.footer {
    padding: 1rem 5%;
    color: var(--morning-wisteria);
    font-size: 0.9rem;
}

/* ========================================
   MEDIA QUERIES FOR RESPONSIVE DESIGN
   ======================================== */

/* Small Laptops and up (768px and above): calendar and times side by side */
@media screen and (min-width: 768px) {
    .booking {
        grid-template-columns: minmax(320px, 1fr) 1fr;
        align-items: start;
    }

    .formPanel {
        grid-column: 1 / -1;
    }

    #bookingForm {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 1.25rem;
    }

    #bookingForm .field:nth-of-type(4),
    .formError,
    .submitBtn,
    .privacyNote {
        grid-column: 1 / -1;
    }

    .submitBtn {
        justify-self: start;
        width: auto;
    }

    .clientForm .submitBtn {
        width: auto;
    }

    .fieldRow {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile Devices (up to 480px) */
@media screen and (max-width: 480px) {
    .header {
        padding: 0.75rem 1rem;
    }

    .businessName {
        font-size: 1.7rem;
    }

    main {
        padding: 1.5rem 1rem 2rem;
    }

    .calendarPanel,
    .timeSlotPanel,
    .formPanel,
    .formSection,
    .confirmation {
        padding: 1.1rem;
    }

    .days {
        gap: 0.25rem;
    }

    .day {
        min-height: 2.25rem;
        font-size: 0.95rem;
    }

    .slots {
        grid-template-columns: 1fr 1fr;
    }
}

/* Respect visitors who turn off animations */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}