:root {
    --hpb-primary: #2f5f3f;
    --hpb-primary-dark: #244b31;
    --hpb-primary-soft: #eef6ef;
    --hpb-border: #dde4dd;
    --hpb-border-strong: #cbd7cb;
    --hpb-text: #1f2933;
    --hpb-muted: #667085;
    --hpb-bg: #f8faf7;
    --hpb-card: #ffffff;
    --hpb-danger: #b42318;
    --hpb-danger-bg: #fff1f0;
    --hpb-success: #1f7a3f;
    --hpb-success-bg: #edf8ef;
    --hpb-warning-bg: #fff7e0;
    --hpb-warning-border: #e2bd55;
    --hpb-radius: 18px;
    --hpb-radius-sm: 12px;
    --hpb-shadow: 0 18px 45px rgba(31, 41, 51, 0.10);
}

.hpb-booking-form-wrap {
    max-width: 980px;
    margin: 36px auto;
    color: var(--hpb-text);
}

.hpb-booking-form-wrap * {
    box-sizing: border-box;
}

/* WordPress themes can override the browser default for the hidden attribute.
   Keep conditional sections such as Hund 2 truly hidden until JavaScript opens them. */
.hpb-booking-form-wrap [hidden],
.hpb-booking-form [hidden] {
    display: none !important;
}

.hpb-booking-form {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
    border: 1px solid var(--hpb-border);
    border-radius: 24px;
    padding: clamp(20px, 3vw, 34px);
    box-shadow: var(--hpb-shadow);
}

.hpb-booking-form::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 7px;
    background: linear-gradient(90deg, var(--hpb-primary), #83a875);
}

.hpb-booking-form h2 {
    margin: 6px 0 8px;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.15;
    color: var(--hpb-primary-dark);
}

.hpb-booking-form h3 {
    margin: 0 0 10px;
    color: var(--hpb-primary-dark);
    font-size: 1.1rem;
}

.hpb-required-note,
.hpb-privacy-note {
    margin: 0 0 22px;
    font-size: 0.98rem;
    color: var(--hpb-muted);
}

.hpb-form-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin: 0 0 16px;
    flex-wrap: wrap;
}

.hpb-top-terms-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid #f1b44c;
    border-radius: 999px;
    background: #fff7e6;
    color: #8a5200;
    font-weight: 900;
    text-decoration: none !important;
    box-shadow: 0 8px 20px rgba(138, 82, 0, 0.10);
}

.hpb-top-terms-link:hover,
.hpb-top-terms-link:focus {
    background: #ffefc2;
    border-color: #e89b16;
    color: #6f4100;
    outline: none;
}

.hpb-top-terms-link strong {
    color: #b42318;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
}

.hpb-paw-icon {
    font-size: 1.18rem;
    line-height: 1;
}

.hpb-language-switcher {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.hpb-language-title {
    color: var(--hpb-muted);
    font-size: 0.92rem;
    font-weight: 800;
}

.hpb-language-buttons {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px;
    border: 1px solid var(--hpb-border);
    border-radius: 999px;
    background: var(--hpb-card);
    box-shadow: 0 8px 22px rgba(31, 41, 51, 0.06);
}

.hpb-language-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--hpb-primary-dark);
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none !important;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.hpb-language-button:hover,
.hpb-language-button:focus {
    background: var(--hpb-primary-soft);
    border-color: var(--hpb-border-strong);
    outline: none;
}

.hpb-language-button.is-active {
    background: var(--hpb-primary);
    border-color: var(--hpb-primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(47, 95, 63, 0.22);
}

.hpb-flag-icon {
    display: inline-flex;
    width: 22px;
    height: 15px;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.16);
    flex: 0 0 auto;
}

.hpb-flag-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.hpb-booking-form fieldset,
.hpb-customer-mode,
.hpb-availability-box,
.hpb-price-box {
    border: 1px solid var(--hpb-border);
    border-radius: var(--hpb-radius);
    background: var(--hpb-card);
    box-shadow: 0 10px 28px rgba(31, 41, 51, 0.055);
}

.hpb-booking-form fieldset {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
    padding: 26px 22px 22px;
    margin: 0 0 24px;
}

.hpb-booking-form legend {
    padding: 0 12px;
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--hpb-primary-dark);
}

.hpb-booking-form label {
    display: block;
    margin: 0;
    font-size: 0.94rem;
    font-weight: 750;
    color: #344054;
}

.hpb-booking-form label:has(textarea),
.hpb-dog-block,
.hpb-availability-box,
.hpb-price-box {
    grid-column: 1 / -1;
}

.hpb-booking-form input,
.hpb-booking-form select,
.hpb-booking-form textarea {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    margin-top: 7px;
    padding: 11px 13px;
    border: 1px solid var(--hpb-border-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--hpb-text);
    font: inherit;
    line-height: 1.35;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.hpb-booking-form textarea {
    min-height: 96px;
    resize: vertical;
}

.hpb-booking-form input:focus,
.hpb-booking-form select:focus,
.hpb-booking-form textarea:focus {
    outline: none;
    border-color: var(--hpb-primary);
    box-shadow: 0 0 0 4px rgba(47, 95, 63, 0.13);
}

.hpb-customer-mode {
    padding: 22px;
    margin: 0 0 24px;
    background: linear-gradient(135deg, var(--hpb-primary-soft), #ffffff 72%);
}

.hpb-customer-mode p,
.hpb-existing-customer-box p {
    margin: 0 0 14px;
    color: var(--hpb-muted);
}

.hpb-mode-buttons,
.hpb-code-box {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-top: 14px;
}

.hpb-existing-customer-box {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--hpb-border);
    border-radius: var(--hpb-radius-sm);
    background: rgba(255,255,255,0.82);
}

.hpb-existing-customer-box label,
.hpb-code-box label {
    flex: 1 1 260px;
}

.hpb-secondary-button,
.hpb-submit-button,
.hpb-cal-nav {
    min-height: 44px;
    border-radius: 999px;
    padding: 11px 19px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease;
}

.hpb-submit-button {
    width: 100%;
    margin-top: 12px;
    border: 0;
    background: var(--hpb-primary);
    color: #fff;
    box-shadow: 0 12px 24px rgba(47, 95, 63, 0.25);
    font-size: 1.04rem;
}

.hpb-submit-button:hover,
.hpb-secondary-button:hover,
.hpb-cal-nav:hover {
    transform: translateY(-1px);
}

.hpb-submit-button:hover {
    background: var(--hpb-primary-dark);
}

.hpb-secondary-button,
.hpb-cal-nav {
    border: 1px solid var(--hpb-primary);
    background: #fff;
    color: var(--hpb-primary);
}

.hpb-secondary-button:hover,
.hpb-cal-nav:hover {
    background: var(--hpb-primary-soft);
    box-shadow: 0 8px 18px rgba(47, 95, 63, 0.13);
}

.hpb-secondary-button:disabled,
.hpb-submit-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.hpb-message {
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-weight: 750;
}

.hpb-success {
    color: var(--hpb-success);
    background: var(--hpb-success-bg);
    border: 1px solid #aadbb8;
}

.hpb-error {
    color: var(--hpb-danger);
    background: var(--hpb-danger-bg);
    border: 1px solid #f2aaa3;
}

.hpb-dog-block {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
    border: 1px solid var(--hpb-border);
    padding: 18px;
    margin: 4px 0;
    border-radius: var(--hpb-radius-sm);
    background: var(--hpb-bg);
}

.hpb-dog-block h3 {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.hpb-dog-block h3::before {
    content: "🐾";
    font-size: 1rem;
}

.hpb-availability-box,
.hpb-price-box {
    padding: 18px;
    margin: 2px 0 0;
}

.hpb-availability-box {
    background: #fbfcf8;
}

.hpb-price-box {
    background: linear-gradient(135deg, #f7fbf7, #ffffff);
}

.hpb-price-box strong,
.hpb-availability-box strong {
    display: block;
    margin-bottom: 7px;
    color: var(--hpb-primary-dark);
    font-size: 1.03rem;
}

.hpb-price-box p {
    margin: 10px 0 0;
    font-size: 0.92rem;
    color: var(--hpb-muted);
}

.hpb-availability-message {
    margin: 8px 0 14px;
    font-weight: 800;
}

.hpb-availability-ok { color: var(--hpb-success); }
.hpb-availability-bad { color: var(--hpb-danger); }
.hpb-availability-wait { color: var(--hpb-muted); }

.hpb-lookup-message {
    margin-top: 12px;
    font-weight: 750;
}
.hpb-lookup-success { color: var(--hpb-success); }
.hpb-lookup-error { color: var(--hpb-danger); }

.hpb-main-form[hidden],
.hpb-existing-customer-box[hidden],
.hpb-code-box[hidden],
.hpb-waitlist-box[hidden] {
    display: none !important;
}

.hpb-calendar-toolbar-front {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin: 14px 0 12px;
}

.hpb-calendar-toolbar-front .hpb-calendar-title {
    margin: 0;
    text-align: center;
    font-weight: 850;
    color: var(--hpb-primary-dark);
}

.hpb-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(36px, 1fr));
    gap: 6px;
}

.hpb-calendar-head {
    margin-bottom: 4px;
    font-size: 0.82rem;
    font-weight: 850;
    color: var(--hpb-muted);
    text-align: center;
}

.hpb-cal-empty,
.hpb-cal-day {
    min-height: 50px;
    border-radius: 12px;
    padding: 7px 5px;
    text-align: center;
    border: 1px solid var(--hpb-border);
    background: #fff;
}

.hpb-cal-day strong,
.hpb-cal-day small {
    display: block;
    line-height: 1.15;
}

.hpb-cal-day strong {
    font-size: 0.95rem;
}

.hpb-cal-day small {
    font-size: 0.72rem;
    margin-top: 4px;
    color: #3f4b56;
}

.hpb-cal-free {
    background: var(--hpb-success-bg);
    border-color: #a3d9af;
}

.hpb-cal-low {
    background: var(--hpb-warning-bg);
    border-color: var(--hpb-warning-border);
}

.hpb-cal-full {
    background: var(--hpb-danger-bg);
    border-color: #ef9a9a;
}

.hpb-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 12px;
    font-size: 0.88rem;
    color: var(--hpb-muted);
}

.hpb-calendar-legend span {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    margin: 0 5px 0 0;
    vertical-align: -1px;
}

.hpb-dot-free { background: #65b878; }
.hpb-dot-low { background: #d8aa24; }
.hpb-dot-full { background: #dc4a42; }

.hpb-waitlist-box {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #e0a4a0;
    border-radius: var(--hpb-radius-sm);
    background: var(--hpb-danger-bg);
}

.hpb-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 !important;
    padding: 14px;
    border: 1px solid var(--hpb-border);
    border-radius: var(--hpb-radius-sm);
    background: #fff;
    font-weight: 650 !important;
}

.hpb-checkbox-label input,
.hpb-waitlist-box input {
    width: auto;
    min-height: auto;
    margin: 3px 0 0;
    flex: 0 0 auto;
}

.hpb-checkbox-label a {
    color: var(--hpb-primary-dark);
    font-weight: 850;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 760px) {
    .hpb-booking-form fieldset,
    .hpb-dog-block {
        grid-template-columns: 1fr;
    }
    .hpb-language-switcher {
        justify-content: stretch;
    }
    .hpb-language-switcher label {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 560px) {
    .hpb-booking-form-wrap {
        margin: 18px auto;
    }
    .hpb-booking-form {
        border-radius: 18px;
        padding: 18px;
    }
    .hpb-calendar-toolbar-front {
        grid-template-columns: 1fr;
    }
    .hpb-calendar-grid {
        gap: 4px;
    }
    .hpb-cal-empty,
    .hpb-cal-day {
        min-height: 46px;
        border-radius: 10px;
        padding: 6px 3px;
    }
    .hpb-cal-day small {
        font-size: 0.66rem;
    }
    .hpb-mode-buttons,
    .hpb-code-box {
        flex-direction: column;
        align-items: stretch;
    }
    .hpb-existing-customer-box label,
    .hpb-code-box label {
        flex: 1 1 auto;
    }
}

@media (max-width: 640px) {
    .hpb-language-switcher {
        justify-content: flex-start;
        align-items: flex-start;
        flex-direction: column;
    }
    .hpb-language-buttons {
        width: 100%;
        justify-content: space-between;
        border-radius: 18px;
        flex-wrap: wrap;
    }
    .hpb-language-button {
        flex: 1 1 auto;
        justify-content: center;
    }
}

.hpb-vaccination-message {
    grid-column: 1 / -1;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--hpb-danger);
    background: var(--hpb-danger-bg);
    color: var(--hpb-danger);
    font-weight: 800;
}


@media (max-width: 640px) {
    .hpb-form-topbar {
        align-items: stretch;
    }
    .hpb-top-terms-link,
    .hpb-language-switcher {
        width: 100%;
        justify-content: center;
    }
}

.hpb-claim-preview-box,
.hpb-claim-email-box {
    margin-top: 14px;
    padding: 14px;
    border-radius: 12px;
    background: #fffaf1;
    border: 1px solid #efd7aa;
}
.hpb-claim-preview-box p {
    margin: 0 0 10px;
}
.hpb-claim-preview-box [data-hpb-claim-preview-text] {
    font-size: 0.95rem;
    line-height: 1.45;
    color: #2f2f2f;
}
