/* ==========================================================================
   Bestell-Dialog Ganztagsplaner 2.1 (eigenständig, unabhängig von .modal-Styles)
   Aufbau wie flixplaner.de; Logik in order-modal.js, Kontaktbereich in contact-form.js
   ========================================================================== */
.fxo {
    --fxo-brand: var(--primary-color, #2563eb);
    --fxo-brand-dark: var(--primary-dark, #1d4ed8);
    --fxo-ink: #101828;
    --fxo-text: #344054;
    --fxo-muted: #667085;
    --fxo-line: #e4e7ec;
    --fxo-soft: #f8fafc;
    --fxo-error: #d92d20;
    --fxo-ok: #079455;
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(16, 24, 40, .55);
    backdrop-filter: blur(3px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--fxo-text);
}
.fxo.is-open { display: flex; animation: fxo-fade .18s ease-out; }
@keyframes fxo-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fxo-rise { from { transform: translateY(12px); opacity: .6; } to { transform: none; opacity: 1; } }

.fxo-dialog {
    width: 100%;
    max-width: 1040px;
    margin: auto 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 48px -12px rgba(16, 24, 40, .25);
    animation: fxo-rise .22s ease-out;
    overflow: hidden;
}
.fxo-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--fxo-line);
}
.fxo-head h2 { margin: 0; font-size: 1.375rem; line-height: 1.3; font-weight: 700; color: var(--fxo-ink); }
.fxo-head p { margin: 4px 0 0; font-size: .9375rem; color: var(--fxo-muted); }
.fxo-close {
    flex: none;
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--fxo-line); border-radius: 10px;
    background: #fff; color: var(--fxo-muted); cursor: pointer;
    transition: background .15s, color .15s;
}
.fxo-close:hover { background: var(--fxo-soft); color: var(--fxo-ink); }
.fxo-close:focus-visible, .fxo button:focus-visible, .fxo a:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; }

.fxo-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.fxo-form { padding: 24px 28px 28px; }
.fxo-aside { background: var(--fxo-soft); border-left: 1px solid var(--fxo-line); padding: 24px; }
.fxo-aside-inner { position: sticky; top: 24px; }

/* Abschnitte */
.fxo-section { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
.fxo-section legend {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 14px; padding: 0;
    font-size: 1rem; font-weight: 600; color: var(--fxo-ink);
}
.fxo-step {
    width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #eff4ff; color: var(--fxo-brand);
    font-size: .8125rem; font-weight: 700;
}
.fxo-optional { font-weight: 400; color: var(--fxo-muted); font-size: .875rem; }
.fxo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.fxo-grid .fxo-span { grid-column: 1 / -1; }
.fxo-grid-zip { display: grid; grid-template-columns: 140px 1fr; gap: 14px 16px; }

/* Felder */
.fxo-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fxo-field label { font-size: .875rem; font-weight: 500; color: var(--fxo-ink); }
.fxo-field label .fxo-req { color: var(--fxo-error); margin-left: 2px; }
.fxo-field input, .fxo-field select, .fxo-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 13px;
    font: inherit; font-size: 1rem; line-height: 1.4;
    color: var(--fxo-ink);
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
.fxo-field select {
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23667085' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
.fxo-field textarea { resize: vertical; min-height: 84px; }
.fxo-field input::placeholder, .fxo-field textarea::placeholder { color: #98a2b3; }
.fxo-field input:focus, .fxo-field select:focus, .fxo-field textarea:focus {
    outline: none; border-color: var(--fxo-brand);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.fxo-field.has-error input, .fxo-field.has-error select, .fxo-field.has-error textarea { border-color: var(--fxo-error); }
.fxo-field.has-error input:focus { box-shadow: 0 0 0 4px rgba(217, 45, 32, .12); }
.fxo-hint { font-size: .8125rem; color: var(--fxo-muted); }
.fxo-error-text { font-size: .8125rem; color: var(--fxo-error); display: none; }
.fxo-field.has-error .fxo-error-text { display: block; }

/* Zustimmung */
.fxo-consent {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border: 1px solid var(--fxo-line); border-radius: 10px;
    font-size: .875rem; line-height: 1.5; cursor: pointer;
}
.fxo-consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--fxo-brand); cursor: pointer; }
.fxo-consent a { color: var(--fxo-brand); }
.fxo-consent.has-error { border-color: var(--fxo-error); background: #fffbfa; }

/* Fehlermeldung oben */
.fxo-alert {
    display: none; gap: 10px; align-items: flex-start;
    margin: 0 0 20px; padding: 12px 14px;
    border: 1px solid #fecdca; background: #fef3f2; color: #b42318;
    border-radius: 10px; font-size: .9rem; line-height: 1.5;
}
.fxo-alert.is-visible { display: flex; }
.fxo-alert svg { flex: none; margin-top: 2px; }

/* Zusammenfassung */
.fxo-summary-title { margin: 0 0 16px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fxo-muted); }
.fxo-product { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.fxo-product img { width: 56px; height: auto; border-radius: 8px; background: #fff; border: 1px solid var(--fxo-line); padding: 6px; box-sizing: border-box; }
.fxo-product strong { display: block; color: var(--fxo-ink); font-size: 1rem; }
.fxo-product span { font-size: .8125rem; color: var(--fxo-muted); }

.fxo-lines { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--fxo-line); }
.fxo-line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: .875rem; color: var(--fxo-text); }
.fxo-line span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fxo-line.is-total { margin-top: 8px; padding-top: 12px; border-top: 1px solid #d0d5dd; font-size: 1.125rem; font-weight: 700; color: var(--fxo-ink); }
.fxo-tax-note { margin: 6px 0 0; font-size: .75rem; line-height: 1.5; color: var(--fxo-muted); }

.fxo-facts { list-style: none; margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid var(--fxo-line); display: grid; gap: 10px; }
.fxo-facts li { display: flex; gap: 10px; align-items: flex-start; font-size: .8125rem; line-height: 1.45; color: var(--fxo-text); }
.fxo-facts svg { flex: none; margin-top: 2px; color: var(--fxo-brand); }

/* Absenden */
.fxo-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.fxo-submit {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; min-height: 50px; padding: 12px 20px;
    border: 0; border-radius: 10px;
    background: var(--fxo-brand); color: #fff;
    font: inherit; font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: background .15s, transform .05s;
}
.fxo-submit:hover { background: var(--fxo-brand-dark); }
.fxo-submit:active { transform: translateY(1px); }
.fxo-submit[disabled] { opacity: .75; cursor: progress; }
.fxo-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: fxo-spin .7s linear infinite; display: none; }
.fxo-submit.is-busy .fxo-spinner { display: inline-block; }
@keyframes fxo-spin { to { transform: rotate(360deg); } }
.fxo-secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .75rem; color: var(--fxo-muted); text-align: center; }

/* Erfolg */
.fxo-success { display: none; padding: 40px 28px 36px; text-align: center; }
.fxo.is-done .fxo-body { display: none; }
.fxo.is-done .fxo-success { display: block; }
.fxo-success-icon { width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 50%; background: #dcfae6; color: var(--fxo-ok); display: flex; align-items: center; justify-content: center; }
.fxo-success h3 { margin: 0 0 8px; font-size: 1.5rem; color: var(--fxo-ink); }
.fxo-success > p { margin: 0 auto; max-width: 520px; color: var(--fxo-text); line-height: 1.6; }
.fxo-receipt { max-width: 440px; margin: 24px auto 0; border: 1px solid var(--fxo-line); border-radius: 12px; text-align: left; overflow: hidden; }
.fxo-receipt div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 16px; font-size: .9375rem; }
.fxo-receipt div + div { border-top: 1px solid var(--fxo-line); }
.fxo-receipt dt { color: var(--fxo-muted); margin: 0; }
.fxo-receipt dd { margin: 0; font-weight: 600; color: var(--fxo-ink); text-align: right; }
.fxo-next { max-width: 440px; margin: 24px auto 0; padding: 0; list-style: none; text-align: left; counter-reset: fxo; }
.fxo-next li { position: relative; padding: 0 0 12px 38px; font-size: .9rem; line-height: 1.5; counter-increment: fxo; }
.fxo-next li::before { content: counter(fxo); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; background: #eff4ff; color: var(--fxo-brand); font-size: .8125rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.fxo-success .fxo-submit { max-width: 440px; margin: 16px auto 0; }
.fxo-mail-warning { max-width: 520px; margin: 16px auto 0; padding: 12px 14px; border-radius: 10px; background: #fffaeb; border: 1px solid #fedf89; color: #93370d; font-size: .875rem; display: none; }

/* Responsiv */
@media (max-width: 900px) {
    .fxo { padding: 0; align-items: stretch; }
    .fxo-dialog { max-width: none; min-height: 100%; border-radius: 0; }
    .fxo-body { grid-template-columns: 1fr; }
    .fxo-aside { border-left: 0; border-top: 1px solid var(--fxo-line); }
    .fxo-aside-inner { position: static; }
    .fxo-head { position: sticky; top: 0; z-index: 2; background: #fff; padding: 16px 16px 14px; }
    .fxo-head h2 { font-size: 1.2rem; }
    .fxo-form { padding: 20px 16px 8px; }
    .fxo-aside { padding: 20px 16px 28px; }
}
@media (max-width: 560px) {
    .fxo-grid, .fxo-grid-zip { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .fxo.is-open, .fxo-dialog { animation: none; }
}
body.fxo-lock { overflow: hidden; }

/* ==========================================================================
   Kontaktbereich (#contact) – nutzt die Formular-Bausteine des Bestell-Dialogs
   ========================================================================== */
.fxc {
    --fxo-brand: var(--primary-color, #2563eb);
    --fxo-brand-dark: var(--primary-dark, #1d4ed8);
    --fxo-ink: #101828;
    --fxo-text: #344054;
    --fxo-muted: #667085;
    --fxo-line: #e4e7ec;
    --fxo-soft: #f8fafc;
    --fxo-error: #d92d20;
    --fxo-ok: #079455;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 28px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--fxo-text);
    text-align: left;
}
.fxc h3 { color: var(--fxo-ink); }
.fxc-info { padding: 8px 4px; }
.fxc-info > h3 { margin: 0 0 10px; font-size: 1.375rem; line-height: 1.3; }
.fxc-info > p { margin: 0 0 24px; line-height: 1.65; }
.fxc-label { margin: 0 0 10px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fxo-muted); }
.fxc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.fxc-chip {
    padding: 8px 14px; border: 1px solid #d0d5dd; border-radius: 999px; background: #fff;
    font: inherit; font-size: .875rem; font-weight: 500; color: var(--fxo-ink); cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.fxc-chip:hover, .fxc-chip.is-active { border-color: var(--fxo-brand); color: var(--fxo-brand); background: #eff4ff; }
.fxc-chip:focus-visible, .fxc-btn-secondary:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; }

.fxc-direct { display: flex; gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid var(--fxo-line); border-bottom: 1px solid var(--fxo-line); margin-bottom: 24px; }
.fxc-direct-icon { width: 40px; height: 40px; flex: none; border-radius: 10px; background: #eff4ff; color: var(--fxo-brand); display: flex; align-items: center; justify-content: center; }
.fxc-direct-label { display: block; font-size: .8125rem; color: var(--fxo-muted); }
.fxc-direct a { font-weight: 600; color: var(--fxo-ink); text-decoration: none; word-break: break-all; }
.fxc-direct a:hover { color: var(--fxo-brand); }

.fxc-cta { padding: 20px; border-radius: 14px; background: var(--fxo-soft); border: 1px solid var(--fxo-line); }
.fxc-cta-title { margin: 0 0 6px; font-weight: 600; color: var(--fxo-ink); }
.fxc-cta p:not(.fxc-cta-title) { margin: 0 0 16px; font-size: .9rem; line-height: 1.55; }
.fxc-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fxc-btn { width: auto; min-height: 44px; padding: 10px 18px; text-decoration: none; font-size: .9375rem; }
.fxc-btn:hover { color: #fff; }
.fxc-btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px;
    border: 1px solid #d0d5dd; border-radius: 10px; background: #fff; color: var(--fxo-ink);
    font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer; transition: background .15s;
}
.fxc-btn-secondary:hover { background: var(--fxo-soft); }

.fxc-card { background: #fff; border: 1px solid var(--fxo-line); border-radius: 16px; box-shadow: 0 12px 32px -12px rgba(16, 24, 40, .12); padding: 28px; }
.fxc-title { margin: 0 0 18px; font-size: 1.125rem; }
.fxc-form .fxo-grid { margin-bottom: 18px; }
.fxc-submit-row { margin-top: 18px; }
.fxc-success { text-align: center; padding: 32px 8px; }
.fxc-success h3 { margin: 0 0 8px; font-size: 1.375rem; }
.fxc-success p { margin: 0 auto 22px; max-width: 460px; line-height: 1.6; }
.fxc-highlight { animation: fxc-pulse 1.2s ease-out; }
@keyframes fxc-pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .35); } 100% { box-shadow: 0 0 0 14px rgba(37, 99, 235, 0); } }

@media (max-width: 900px) {
    .fxc { grid-template-columns: 1fr; gap: 20px; }
    .fxc-card { order: -1; padding: 20px 16px; }
}

/* Bestell-Dialog: Hinweis auf Angebot */
.fxo-quote { margin: 12px 0 0; font-size: .8125rem; line-height: 1.5; color: var(--fxo-muted); text-align: center; }
.fxo-quote button { padding: 0; border: 0; background: none; font: inherit; color: var(--fxo-brand); font-weight: 600; text-decoration: underline; cursor: pointer; }
