/* Cowva public booking — standalone stylesheet (no framework).
   Design tokens first; components below. */

:root {
    --brand-600: #0f766e;
    --brand-700: #115e59;
    --brand-50: #f0fdfa;
    --ink-900: #0f172a;
    --ink-600: #475569;
    --ink-400: #94a3b8;
    --surface: #ffffff;
    --page-bg: #f8fafc;
    --border: #e2e8f0;
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.08);
    --font-sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--page-bg);
    color: var(--ink-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.center-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

h1,
h2,
h3 {
    line-height: 1.2;
    margin: 0 0 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

p {
    margin: 0 0 20px;
    color: var(--ink-600);
}

a {
    color: var(--brand-600);
}

/* --- Buttons ------------------------------------------------------------ */

.btn-primary {
    display: inline-block;
    background: var(--brand-600);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
}

.btn-primary:hover {
    background: var(--brand-700);
    transform: translateY(-1px);
}

.btn-primary:focus-visible {
    outline: 3px solid var(--brand-50);
    outline-offset: 2px;
}

/* --- Coming soon --------------------------------------------------------- */

.coming-soon-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    max-width: 520px;
    padding: 56px 48px;
    text-align: center;
}

.brand-mark {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--brand-600);
    margin-bottom: 28px;
}

.badge-soft {
    display: inline-block;
    background: var(--brand-50);
    color: var(--brand-700);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
}

.coming-soon-card h1 {
    font-size: clamp(1.6rem, 4vw, 2.1rem);
}

.coming-soon-card p {
    margin-bottom: 28px;
}

@media (max-width: 480px) {
    .coming-soon-card {
        padding: 40px 24px;
    }
}

/* --- Layout --------------------------------------------------------------- */

.container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
}

.site-header .brand-mark {
    margin: 0;
    font-size: 1.2rem;
    text-decoration: none;
}

.header-link {
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 64px;
    padding: 24px 0;
}

.site-footer p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--ink-400);
}

/* --- Landing hero + finder ------------------------------------------------ */

.hero {
    padding: 56px 0 24px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(1.9rem, 5vw, 2.8rem);
}

.hero-sub {
    max-width: 560px;
    margin: 0 auto 32px;
}

.finder-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 24px;
    text-align: left;
}

.finder-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.finder-row select,
.finder-row input,
.field-block select {
    font: inherit;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--ink-900);
}

.finder-row select {
    flex: 0 0 200px;
}

.finder-row input {
    flex: 1;
}

.facility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.facility-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--ink-900);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.facility-card:hover {
    border-color: var(--brand-600);
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}

.facility-card-name {
    font-weight: 700;
}

.facility-card-tagline {
    color: var(--ink-600);
    font-size: 0.9rem;
}

.facility-card-state {
    color: var(--brand-600);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.finder-empty {
    color: var(--ink-400);
    text-align: center;
    margin: 12px 0 0;
}

/* --- How it works ---------------------------------------------------------- */

.how-it-works {
    padding-top: 56px;
    text-align: center;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px 20px;
}

.step-card h3 {
    font-size: 1.05rem;
}

.step-card p {
    margin: 0;
    font-size: 0.92rem;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--brand-50);
    color: var(--brand-700);
    font-weight: 700;
    margin-bottom: 12px;
}

/* --- Facility page ---------------------------------------------------------- */

.facility-page {
    padding-top: 40px;
}

.facility-hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.3rem);
}

.facility-tagline {
    font-size: 1.05rem;
}

.facility-meta {
    color: var(--ink-400);
    font-size: 0.9rem;
}

.facility-about summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--brand-600);
    margin-bottom: 8px;
}

.deposit-note {
    background: var(--brand-50);
    border: 1px solid #ccfbf1;
    border-radius: var(--radius-md);
    color: var(--brand-700);
    padding: 12px 16px;
    font-size: 0.92rem;
    margin: 16px 0 8px;
}

.booking-browser {
    margin-top: 40px;
}

.field-block {
    margin-bottom: 20px;
}

.field-block label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.field-block select {
    min-width: 280px;
    max-width: 100%;
}

.browser-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
    align-items: start;
}

.calendar-card,
.slots-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 20px;
}

.calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.calendar-head button {
    font: inherit;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 4px 12px;
    cursor: pointer;
}

.calendar-weekdays,
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.calendar-weekdays span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-400);
    text-transform: uppercase;
    padding-bottom: 6px;
}

.cal-day {
    font: inherit;
    font-size: 0.9rem;
    border: 0;
    background: transparent;
    color: var(--ink-400);
    border-radius: 999px;
    aspect-ratio: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cal-day--open {
    background: var(--brand-50);
    color: var(--brand-700);
    font-weight: 600;
    cursor: pointer;
}

.cal-day--open:hover {
    background: var(--brand-600);
    color: #fff;
}

.cal-day--selected,
.cal-day--selected:hover {
    background: var(--brand-600);
    color: #fff;
}

.slots-card h3 {
    font-size: 1rem;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
    margin: 12px 0 20px;
}

.slot-chip {
    font: inherit;
    font-weight: 600;
    padding: 10px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--brand-700);
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease;
}

.slot-chip:hover:not(:disabled) {
    border-color: var(--brand-600);
}

.slot-chip--selected,
.slot-chip--selected:hover {
    background: var(--brand-600);
    border-color: var(--brand-600);
    color: #fff;
}

.slot-chip--full {
    color: var(--ink-400);
    text-decoration: line-through;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.btn-primary:disabled {
    background: var(--ink-400);
    cursor: not-allowed;
    transform: none;
}

.continue-hint {
    font-size: 0.85rem;
    color: var(--ink-400);
    margin: 10px 0 0;
    text-align: center;
}

@media (max-width: 760px) {
    .browser-grid {
        grid-template-columns: 1fr;
    }

    .finder-row {
        flex-direction: column;
    }

    .finder-row select {
        flex: 1;
    }
}

/* --- Booking wizard ------------------------------------------------------ */

.wizard {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 28px;
    margin-bottom: 64px;
}

.wizard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.wizard-back {
    background: none;
    border: 0;
    color: var(--brand-600);
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
}

.wizard-steps {
    display: flex;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-400);
}

.wizard-steps li.is-active {
    color: var(--brand-700);
}

.wizard-steps li.is-active::before {
    content: "● ";
    font-size: 0.7em;
    vertical-align: 2px;
}

.wizard-slot-summary {
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: 20px;
}

.wizard-intro,
.wizard-hint {
    background: var(--brand-50);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 0.95rem;
    color: var(--ink-600);
    margin-bottom: 20px;
}

/* people */

.person-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    gap: 10px;
}

.person-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
}

.person-item-text {
    display: grid;
}

.person-item-services {
    color: var(--ink-600);
    font-size: 0.9rem;
}

.person-remove {
    background: none;
    border: 0;
    color: var(--ink-400);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}

.person-form {
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 20px;
}

.person-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.person-tab {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink-600);
    cursor: pointer;
}

.person-tab.is-active {
    background: var(--brand-50);
    border-color: var(--brand-600);
    color: var(--brand-700);
}

.field-row {
    display: flex;
    gap: 10px;
}

.field-row input {
    flex: 1;
}

.wizard input[type="text"],
.wizard input[type="tel"],
.wizard input[type="email"],
.wizard input[type="date"],
.wizard input[type="search"],
.wizard select,
.wizard textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font: inherit;
    color: var(--ink-900);
    background: var(--surface);
}

.wizard input:focus-visible,
.wizard select:focus-visible,
.wizard textarea:focus-visible {
    outline: 2px solid var(--brand-600);
    outline-offset: 1px;
}

.btn-secondary {
    background: var(--surface);
    color: var(--brand-700);
    border: 1px solid var(--brand-600);
    font-weight: 600;
    padding: 11px 22px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 160ms ease;
}

.btn-secondary:hover {
    background: var(--brand-50);
}

.field-feedback {
    margin: 10px 0 0;
    font-size: 0.9rem;
}

.field-feedback--error {
    color: #b91c1c;
}

.field-feedback--ok {
    color: var(--brand-700);
}

.reg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.reg-grid label {
    display: grid;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-600);
}

@media (max-width: 560px) {
    .reg-grid {
        grid-template-columns: 1fr;
    }
}

/* services */

.services-block {
    border-top: 1px solid var(--border);
    margin-top: 18px;
    padding-top: 18px;
}

.services-for {
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.vaccine-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px;
    margin: 10px 0 14px;
    display: grid;
    gap: 2px;
}

.vaccine-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
}

.vaccine-option:hover {
    background: var(--brand-50);
}

.service-note-label {
    display: grid;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-600);
    margin-bottom: 14px;
}

/* review + done */

.review-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.review-people {
    margin: 0 0 16px;
    padding-left: 20px;
    color: var(--ink-600);
}

.done-card {
    text-align: center;
    padding: 24px 8px;
}

.done-card h2 {
    color: var(--brand-700);
}

/* --- Manage page ---------------------------------------------------------- */

.manage-page {
    padding: 48px 24px 80px;
    max-width: 640px;
}

.manage-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 32px;
}

.manage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.status-pill {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--page-bg);
    color: var(--ink-600);
    text-transform: capitalize;
}

.status-pill--confirmed,
.status-pill--completed {
    background: var(--brand-50);
    color: var(--brand-700);
}

.status-pill--pending_payment {
    background: #fef9c3;
    color: #854d0e;
}

.status-pill--cancelled,
.status-pill--expired,
.status-pill--no_show {
    background: #fee2e2;
    color: #b91c1c;
}

.manage-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 14px;
    margin: 0 0 20px;
}

.manage-details dt {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-400);
}

.manage-details dd {
    margin: 0;
    font-weight: 600;
}

.manage-people {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    gap: 10px;
}

.manage-people li {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: grid;
}

.manage-services {
    color: var(--ink-600);
    font-size: 0.9rem;
}

.manage-warning {
    background: #fee2e2;
    color: #b91c1c;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.manage-footnote {
    font-size: 0.9rem;
    color: var(--ink-400);
    margin: 0;
}

/* --- Payment callback + manage actions ----------------------------------- */

.spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 20px;
    border: 4px solid var(--brand-50);
    border-top-color: var(--brand-600);
    border-radius: 50%;
    animation: bk-spin 0.9s linear infinite;
}

@keyframes bk-spin {
    to { transform: rotate(360deg); }
}

.btn-danger {
    background: var(--surface);
    color: #b91c1c;
    border: 1px solid #fca5a5;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 160ms ease;
}

.btn-danger:hover {
    background: #fef2f2;
}

.manage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.reschedule-panel {
    border-top: 1px solid var(--border);
    margin: 4px 0 20px;
    padding-top: 18px;
}

.reschedule-panel input[type="date"] {
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font: inherit;
}

.reschedule-panel .slot-grid {
    margin: 14px 0;
}

.reschedule-panel .btn-primary {
    margin-bottom: 10px;
}

/* --- Accessibility ------------------------------------------------------- */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--brand-600);
    color: #fff;
    padding: 10px 18px;
    border-radius: 0 0 var(--radius-md) 0;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    left: 0;
}

/* A visible focus ring on every interactive element for keyboard users. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.cal-day:focus-visible,
.slot-chip:focus-visible {
    outline: 3px solid var(--brand-600);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
