/*
 * Shared frontend-form presentation.
 * Feature modules provide field definitions and may add only feature-specific
 * extensions after this stylesheet.
 */
.bv-form-shell {
    width: min(100% - 2rem, 760px);
    margin: 4rem auto;
    padding: 2rem;
    border-radius: var(--bv-card-radius, 14px);
    background: var(--bv-card-bg, #222);
    box-shadow: var(--bv-card-shadow, 0 12px 30px rgba(0, 0, 0, .22));
    color: var(--bv-text-primary, var(--bv-text-color, #f2f2f2));
    box-sizing: border-box;
}

.bv-form-shell > h1 {
    display: table;
    margin: 0 auto 2rem;
    padding-bottom: .5rem;
    border-bottom: 3px solid var(--bv-heading-border-color, var(--bv-accent, #8fc766));
    color: var(--bv-heading-color, #fff);
    font-size: clamp(2rem, 5vw, 2.5rem);
    line-height: 1.15;
    text-align: center;
}

.bv-form {
    display: grid;
    gap: 2rem;
}

.bv-form-section {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.bv-form-section legend {
    width: 100%;
    margin: 0 0 1rem;
    padding: 0 0 .65rem;
    border-bottom: 1px solid var(--bv-border-color, #555);
    color: var(--bv-legend-color, var(--bv-heading-color, #fff));
    font-size: 1rem;
    font-weight: 600;
}

.bv-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.bv-form-field {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: .4rem;
}

.bv-form-field--wide {
    grid-column: 1 / -1;
}

.bv-form-field label {
    color: var(--bv-label-color, var(--bv-text-primary, #f2f2f2));
    font-weight: 600;
}

/* Keep native controls consistent with the enter-bonsai form. */
.bv-form-field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.bv-form-field select,
.bv-form-field textarea {
    width: 100%;
    min-height: 44px;
    padding: .6rem .8rem;
    border: 1px solid var(--bv-input-border, var(--bv-border-color, #666)) !important;
    border-radius: var(--bv-input-radius, 8px);
    background-color: var(--bv-input-bg, #151515) !important;
    color: var(--bv-input-text, #e0e0e0) !important;
    caret-color: var(--bv-input-text, #e0e0e0) !important;
    box-sizing: border-box;
    font: inherit;
    font-size: var(--bv-input-font-size, 1rem);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.bv-form-field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
.bv-form-field select:focus,
.bv-form-field textarea:focus {
    outline: none;
    background-color: var(--bv-input-bg-focus, #333) !important;
    box-shadow: 0 0 0 2px var(--bv-input-focus-ring, var(--bv-accent, #8fc766));
}

.bv-form-field textarea {
    min-height: 9rem;
    resize: vertical;
    line-height: 1.55;
}

.bv-form-field select option {
    background-color: var(--bv-input-bg, #2a2a2a);
    color: var(--bv-input-text, #e0e0e0) !important;
}

.bv-form-field input[type="checkbox"],
.bv-form-field input[type="radio"] {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    accent-color: var(--bv-accent, #8fc766);
    cursor: pointer;
}

.bv-form-help {
    margin: 0;
    color: var(--bv-text-soft, #ccc);
    font-size: .925rem;
    line-height: 1.5;
}

.bv-form-error {
    margin: 0;
    color: #ff9c9c;
}

.bv-form-notice {
    margin-bottom: 1.25rem;
    padding: 1rem;
    border-radius: .4rem;
}

.bv-form-notice--error {
    background: #5b2020;
}

.bv-form-notice--success {
    background: #1c593e;
}

.bv-form-field [aria-invalid="true"] {
    border-color: #ff9c9c !important;
}

.bv-form-media__preview {
    display: block;
    width: 112px;
    height: 112px;
    margin-top: .25rem;
    border-radius: 10px;
    object-fit: cover;
}

.bv-form-media__actions,
.bv-form-actions,
.bv-form-choices {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.bv-form-media__actions {
    margin-top: .75rem;
}

.bv-form-choice {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 44px;
    padding: .45rem .65rem;
    border: 1px solid transparent;
    border-radius: var(--bv-input-radius, 8px);
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.bv-form-choice:hover {
    border-color: var(--bv-input-border-hover, var(--bv-accent, #8fc766));
    background: var(--bv-input-bg-focus, rgba(143, 199, 102, .1));
}

.bv-form-choice:active {
    transform: scale(.98);
}

.bv-form-choice:has(input:checked) {
    border-color: var(--bv-accent, #8fc766);
    background: var(--bv-input-bg-focus, rgba(143, 199, 102, .14));
    color: var(--bv-heading-color, #fff);
}

.bv-form [hidden] {
    display: none !important;
}

.bv-form .bonsai-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .7rem 1.2rem;
    border: 1px solid var(--bv-accent, #8fc766);
    border-radius: var(--bv-btn-radius, 8px);
    background: var(--bv-btn-bg, #303030);
    color: var(--bv-heading-color, #fff);
    font: inherit;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.bv-form .bonsai-btn:hover,
.bv-form .bonsai-btn:focus-visible,
.bv-form .bonsai-btn:active {
    border-color: var(--bv-btn-border-hover, var(--bv-accent, #8fc766));
    background: var(--bv-btn-bg, #303030);
    color: var(--bv-btn-text, var(--bv-heading-color, #fff));
}

.bv-form .bonsai-btn:active {
    transform: scale(.98);
}

.bv-form .bonsai-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.bv-form-actions {
    margin-top: .25rem;
}

.bv-form-actions .bonsai-btn {
    width: 100%;
    min-height: 52px;
    padding: 1rem;
    border-color: var(--bv-submit-border, var(--bv-accent, #8fc766));
    background: var(--bv-submit-bg, #8fc766);
    color: var(--bv-submit-text, #111);
    font-size: 1.1rem;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease;
}

.bv-form-actions .bonsai-btn:hover,
.bv-form-actions .bonsai-btn:focus-visible {
    border-color: var(--bv-submit-border-hover, var(--bv-submit-border, var(--bv-accent, #8fc766)));
    background: var(--bv-submit-bg, #8fc766);
    color: var(--bv-submit-text, #111);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
}

.bv-form-actions .bonsai-btn:active {
    border-color: var(--bv-submit-border-hover, var(--bv-submit-border, var(--bv-accent, #8fc766)));
    background: var(--bv-submit-bg, #8fc766);
    color: var(--bv-submit-text, #111);
    transform: scale(.98);
    box-shadow: var(--bv-submit-shadow-active, none);
}

@media (max-width: 700px) {
    .bv-form-shell {
        width: min(100% - 1.5rem, 760px);
        margin: 2rem auto;
        padding: 1.5rem;
    }

    .bv-form-shell > h1 {
        margin-bottom: 1.5rem;
        font-size: 2rem;
    }

    .bv-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .bv-form-field--wide {
        grid-column: auto;
    }
}

/* Shared form introduction and flow selection. */
.bv-form-intro {
    margin: -.25rem 0 2rem;
    padding: 1rem 1.2rem;
    border-radius: .4rem;
    background: var(--bv-note-bg, rgba(143, 199, 102, .12));
    color: var(--bv-note-text, var(--bv-text-soft, #ccc));
    line-height: 1.6;
}

.bv-form-flow-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.bv-form-choice-page {
    min-height: 80vh;
    padding: clamp(40px, 6vw, 72px) 0;
    background: var(--bv-wrapper-bg);
    color: var(--bv-text-primary);
    font-family: var(--bv-font-family);
}

.bv-form-choice-page,
.bv-form-choice-page * {
    box-sizing: border-box;
}

.bv-form-choice-hero {
    margin: var(--mobile-margin);
}

.bv-form-choice-shell {
    width: min(var(--bv-page-max-width), calc(100vw - 32px));
    margin: 0 auto;
    display: grid;
    gap: 28px;
}

.bv-form-choice-intro {
    position: relative;
    padding: clamp(24px, 4vw, 40px);
    overflow: hidden;
    border-radius: var(--bv-btn-radius);
    background: var(--bv-card-bg);
    text-align: center;
}

.bv-form-choice-logo-watermark::before {
    position: absolute;
    inset: 0;
    background: url("https://baumvolk.com/wp-content/uploads/2025/08/cropped-logo-weiss-transparent.png") center / contain no-repeat;
    content: "";
    opacity: .03;
    pointer-events: none;
}

.bv-form-choice-intro h1 {
    position: relative;
    margin: 0;
    color: var(--bv-heading-color);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.05;
}

.bv-form-flow-choice {
    position: relative;
    min-width: 0;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--bv-border-subtle);
    border-radius: var(--bv-card-radius);
    background: var(--bv-card-bg);
    box-shadow: var(--bv-card-shadow);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.bv-form-flow-choice:hover {
    transform: translateY(-2px);
    border-color: var(--bv-border-contrast-soft);
    box-shadow: var(--bv-shadow-elevated);
}

.bv-form-flow-choice:focus-within {
    border-color: var(--bv-accent);
    box-shadow: var(--bv-shadow-elevated);
}

.bv-form-flow-choice__link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.bv-form-flow-choice__link:focus-visible {
    outline: 2px solid var(--bv-accent);
    outline-offset: -3px;
}

.bv-form-flow-choice__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bv-surface-soft);
}

.bv-form-flow-choice__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .35s ease;
}

.bv-form-flow-choice:hover .bv-form-flow-choice__image {
    transform: scale(1.03);
}

.bv-form-flow-choice__icon {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--bv-accent);
    font-size: clamp(2.5rem, 5vw, 4rem);
}

.bv-form-flow-choice__content {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: clamp(22px, 3vw, 32px) clamp(22px, 3vw, 32px) 0;
    margin-bottom: 22px;
}

.bv-form-flow-choice h2 {
    margin: 0;
    color: var(--bv-heading-color);
    font-size: var(--bv-font-size-2xl);
    line-height: var(--bv-line-height-tight);
}

.bv-form-flow-choice p {
    margin: 0;
    color: var(--bv-text-secondary);
    font-size: var(--bv-font-size-md);
    line-height: var(--bv-line-height-relaxed);
}

.bv-form-flow-choice__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    color: var(--bv-accent);
    font-size: var(--bv-font-size-sm);
    font-weight: var(--bv-font-weight-semibold);
    line-height: var(--bv-line-height-tight);
}

.bv-form-flow-choice__cta i {
    font-size: .9em;
}

@media (max-width: 760px) {
    .bv-form-flow-choices {
        grid-template-columns: minmax(0, 1fr);
    }

    .bv-form-flow-choice {
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .bv-form-choice-shell {
        width: min(100%, calc(100vw - 24px));
    }

    .bv-form-choice-intro {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bv-form-choice-page *,
    .bv-form-choice-page *::before,
    .bv-form-choice-page *::after {
        transition-duration: .01ms !important;
    }
}

::selection {
    background: #d9d9d9;
    color: #111;
}

::-moz-selection {
    background: #d9d9d9;
    color: #111;
}