/**
 * Hain Terminbuchung
 * Matches the claudia-hain.com design system (Naturgrün variant).
 */

/* ── Variables ── */
.htb-form {
    --htb-deep: #1c3d5a;
    --htb-accent: #7a9a6e;
    --htb-accent-hover: #6b8c5e;
    --htb-cream: #f4f7f2;
    --htb-sand: #e4ecdf;
    --htb-warm: #dae5d5;
    --htb-text: #2c3e50;
    --htb-text-light: #5a6b7a;
    --htb-white: #fff;
    --htb-border: rgba(28, 61, 90, 0.08);
    --htb-radius: 12px;
    --htb-radius-lg: 20px;
    --htb-focus: #7a9a6e;
    --htb-error: #c0392b;
    --htb-notice-bg: #edf5ea;
    --htb-notice-border: #7a9a6e;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    max-width: 680px;
}

/* ── Screen reader only ── */
.htb-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;
}

/* ── Error messages ── */
.htb-errors {
    background: #fdf0ee;
    border: 1px solid rgba(192, 57, 43, 0.2);
    border-left: 3px solid var(--htb-error);
    border-radius: var(--htb-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.htb-error {
    color: var(--htb-error);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* ── Fieldset & Legend ── */
.htb-fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.htb-legend {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(20px, 2.5vw, 26px);
    color: var(--htb-deep);
    margin-bottom: 8px;
    display: block;
}

.htb-legend-hint {
    font-size: 14px;
    color: var(--htb-text-light);
    line-height: 1.65;
    margin-bottom: 20px;
}

/* ── Country radio cards ── */
.htb-countries {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.htb-country {
    cursor: pointer;
    display: block;
}

.htb-country input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.htb-country__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px 16px;
    background: var(--htb-white);
    border: 2px solid var(--htb-border);
    border-radius: var(--htb-radius-lg);
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: center;
    min-height: 88px;
    justify-content: center;
}

.htb-country__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--htb-deep);
}

.htb-country__price {
    font-size: 13px;
    color: var(--htb-text-light);
}

/* Hover */
.htb-country:hover .htb-country__card {
    border-color: rgba(122, 154, 110, 0.3);
}

/* Focus */
.htb-country input[type="radio"]:focus-visible + .htb-country__card {
    outline: 2px solid var(--htb-focus);
    outline-offset: 2px;
    border-color: var(--htb-accent);
}

/* Selected */
.htb-country input[type="radio"]:checked + .htb-country__card {
    border-color: var(--htb-accent);
    background: var(--htb-cream);
    box-shadow: 0 0 0 1px var(--htb-accent);
}

/* ── Details block ── */
.htb-details {
    margin-top: 28px;
}

/* ── Price card ── */
.htb-price-card {
    background: var(--htb-white);
    border: 1px solid var(--htb-border);
    border-radius: var(--htb-radius-lg);
    padding: 24px 28px;
    margin-bottom: 16px;
}

.htb-price-card__service {
    font-size: 14px;
    color: var(--htb-text-light);
    margin: 0 0 8px;
}

.htb-price-card__amount {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 0 0 8px;
}

.htb-price-card__currency {
    font-size: 14px;
    font-weight: 600;
    color: var(--htb-text-light);
}

.htb-price-card__value {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(28px, 3vw, 36px);
    color: var(--htb-deep);
}

.htb-price-card__billing {
    font-size: 13px;
    color: var(--htb-text-light);
    line-height: 1.65;
    margin: 0;
}

/* ── Notice (green) ── */
.htb-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--htb-notice-bg);
    border: 1px solid rgba(122, 154, 110, 0.2);
    border-radius: var(--htb-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.htb-notice__icon {
    flex-shrink: 0;
    color: var(--htb-accent);
    margin-top: 1px;
}

.htb-notice__text {
    font-size: 13px;
    color: var(--htb-text);
    line-height: 1.7;
    margin: 0;
}

/* ── Consent checkbox ── */
.htb-consent {
    margin-bottom: 20px;
}

.htb-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 16px 20px;
    background: var(--htb-sand);
    border-radius: var(--htb-radius);
    transition: background 0.2s;
}

.htb-checkbox:hover {
    background: var(--htb-warm);
}

.htb-checkbox input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--htb-accent);
    cursor: pointer;
}

.htb-checkbox input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--htb-focus);
    outline-offset: 2px;
}

.htb-checkbox__mark {
    display: none; /* Using native checkbox for accessibility */
}

.htb-checkbox__text {
    font-size: 13px;
    color: var(--htb-text);
    line-height: 1.65;
}

/* ── Buttons ── */
.htb-submit {
    margin-top: 8px;
}

.htb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 30px;
    border-radius: 50px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
}

.htb-btn:focus-visible {
    outline: 2px solid var(--htb-focus);
    outline-offset: 2px;
}

.htb-btn--book {
    background: var(--htb-accent);
    color: var(--htb-white);
    width: 100%;
    padding: 17px 30px;
    font-size: 16px;
}

.htb-btn--book:hover:not(.htb-btn--disabled):not(.htb-btn--loading) {
    background: var(--htb-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(122, 154, 110, 0.25);
}

.htb-btn--book:active:not(.htb-btn--disabled) {
    transform: translateY(0);
}

/* Disabled state */
.htb-btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading state */
.htb-btn--loading {
    opacity: 0.7;
    cursor: wait;
}

.htb-btn--next {
    background: var(--htb-accent);
    color: var(--htb-white);
    margin-top: 16px;
}

.htb-btn--next:hover {
    background: var(--htb-accent-hover);
}

/* ── Back link ── */
.htb-back {
    margin-bottom: 20px;
}

.htb-back__link {
    font-size: 14px;
    color: var(--htb-accent);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.htb-back__link:hover {
    color: var(--htb-accent-hover);
}

.htb-back__link:focus-visible {
    outline: 2px solid var(--htb-focus);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .htb-countries {
        grid-template-columns: 1fr;
    }

    .htb-country__card {
        flex-direction: row;
        justify-content: space-between;
        padding: 16px 20px;
        min-height: auto;
    }

    .htb-price-card {
        padding: 20px;
    }

    .htb-btn--book {
        font-size: 15px;
        padding: 15px 24px;
    }
}

/* ── Embed container ── */
.htb-embed {
    max-width: 680px;
}

.htb-embed__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.htb-embed__title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(18px, 2vw, 22px);
    color: var(--htb-deep);
    margin: 0;
}

.htb-embed__widget {
    background: var(--htb-white);
    border: 1px solid var(--htb-border);
    border-radius: var(--htb-radius-lg);
    overflow: hidden;
    min-height: 600px;
}

.htb-embed__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--htb-text-light);
    font-size: 14px;
}

.htb-embed__widget .zeeg-inline-widget,
.htb-embed__widget iframe {
    display: block;
    width: 100%;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .htb-btn,
    .htb-country__card,
    .htb-checkbox {
        transition: none;
    }

    .htb-btn--book:hover:not(.htb-btn--disabled) {
        transform: none;
    }
}
