/*
 * Öffentliche Seiten (Checkout, Upsell, Warteliste, Statusseiten).
 * Werte gemessen an den alten Seiten (Bootstrap-Theme in public/css/app.css), damit der Look gleich bleibt.
 */
:root {
    --shop-bg: #f7fafb;
    --shop-text: #7c8798;
    --shop-muted: #b8c3d5;
    --shop-ink: #4f5467;          /* Text in Eingabefeldern */
    --shop-dark: #212529;
    --shop-primary: #752441;
    --shop-primary-light: #9a4463;
    --shop-secondary: #f2c230;    /* Button, Auswahl */
    --shop-success: #20ca7f;
    --shop-warning: #f29400;
    --shop-danger: #d00000;
    --shop-border: #e9ecef;
    --shop-gray-300: #dee2e6;
    --shop-card: #fbfbfb;
    --shop-shadow: 0 4px 16px 0 rgba(169, 184, 200, .18);
    --shop-radius: 14px;          /* Karten, Kacheln */
    --shop-radius-sm: 8px;        /* Felder, Hinweise */
    --shop-font: Rubik, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }
body.shop {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--shop-bg); color: var(--shop-text);
    font: 400 16px/24px var(--shop-font);
}
body.shop--white { background: #fff; }
img { max-width: 100%; }
a { color: var(--shop-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 16px; }
b, strong { font-weight: 500; }
[x-cloak] { display: none !important; }

h1, h2, h3, h4, h5, h6, .h6 { margin: 0 0 8px; font-weight: 400; color: inherit; }
h2 { font-size: 30px; line-height: 36px; }
h3 { font-size: 21px; line-height: 25.2px; }
h4 { font-size: 18px; line-height: 21.6px; }
h6, .h6 { font-size: 14px; line-height: 16.8px; }
hr { border: 0; border-top: 1px solid rgba(0, 0, 0, .1); margin: 16px 0; }

.muted { color: var(--shop-muted); }
.small { font-size: 14px; line-height: 21px; }
.tiny { font-size: 12px; line-height: 18px; }
.italic { font-style: italic; }
.text-right { text-align: right; }
.text-success { color: var(--shop-success); }
.text-danger { color: var(--shop-danger); }
.text-primary { color: var(--shop-primary); }

/* Kopf: Welle + Logo */
.shop-header__lines { height: 120px; overflow: hidden; }
.shop-header__lines svg { display: block; }
.shop-header__logo { display: flex; justify-content: center; align-items: center; padding: 5px 0; margin-bottom: 48px; }
.shop-header__logo img { display: block; }

/* Inhalt */
.shop-main { width: 100%; max-width: 1140px; margin: 0 auto 48px; padding: 0 15px; }
body.shop--embedded .shop-main, body.shop--embedded main { margin: 0; padding: 0; max-width: none; }

/* Fußzeile */
.shop-footer { margin-top: auto; background: var(--shop-card); box-shadow: 0 8px 16px 0 rgba(0, 0, 0, .15); padding: 24px 20px 15px; }
.shop-footer__inner { max-width: 1110px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 0 8px; }
.shop-footer__text { font-size: 12px; line-height: 18px; text-align: right; }
.shop-footer__text p { margin: 0; }
.shop-footer__text p + p { margin-top: 0; margin-bottom: 16px; }
@media (max-width: 767px) {
    .shop-footer__inner { flex-direction: column; align-items: center; text-align: center; }
    .shop-footer__text { text-align: center; }
}

/* Seitentitel: Name links, Hinweis rechts, Linie, Produktcode */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 30px; margin-bottom: 48px; }
.page-head h2, .page-head h3 { margin-bottom: 8px; }
.page-head h3 b { font-weight: 500; }
.page-head hr { flex-basis: 100%; margin: 4px 0; }
.page-head .meta { font-size: 14px; line-height: 21px; color: var(--shop-muted); }
.page-head--compact { margin-bottom: 16px; }
/* Frist rechts – auch wenn sie auf dem Handy in eine eigene Zeile rutscht (wie bisher) */
.page-head__aside { margin-left: auto; text-align: right; }

/* Karten */
.card { background: var(--shop-card); border-radius: var(--shop-radius); box-shadow: var(--shop-shadow); padding: 16px; margin-bottom: 16px; }
.card__head { padding: 24px 25px 8px; color: var(--shop-muted); }
.card__head h4 { text-transform: uppercase; }
.card__head .h6 { display: block; }
.card__body { padding: 25px; }
.card__body > :last-child { margin-bottom: 0; }
.card__body--flush { padding-top: 0; }
.card--plain { padding: 0; }
.card--success, .card--warning { color: #fff; text-align: center; padding: 48px; margin: 16px; }
.card--success { background: var(--shop-success); }
.card--warning { background: var(--shop-warning); }
.card--success h3, .card--warning h3 { color: #fff; }
.card__head--primary, .card__head--primary h3 { color: var(--shop-primary); }
.card__half { max-width: 50%; padding: 0 15px; }
@media (max-width: 991px) { .card__half { max-width: none; } }
@media (max-width: 767px) {
    .card { padding: 0; }
    .card--success, .card--warning { padding: 24px; margin: 16px 0; }
}

/* Zweispaltig 7/5 wie der alte Checkout; Handy: eigene Reihenfolge über Grid-Bereiche */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 48px; align-items: start; }
.checkout-grid > .col-left { grid-column: 1; }
.checkout-grid > .col-right { grid-column: 2; }
.checkout-grid > .col-left, .checkout-grid > .col-right { display: flex; flex-direction: column; }
@media (max-width: 991px) {
    .checkout-grid { display: flex; flex-direction: column; align-items: stretch; }
    .checkout-grid > .col-left, .checkout-grid > .col-right { display: contents; }
    .order-1 { order: 1; } .order-2 { order: 2; } .order-3 { order: 3; } .order-4 { order: 4; } .order-5 { order: 5; } .order-6 { order: 6; }
}

.course-image { display: block; width: 100%; border-radius: var(--shop-radius); margin-bottom: 16px; }
.course-intro { margin-bottom: 16px; }
.course-intro__text { margin-bottom: 48px; }

/* Formular */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.form-row--zip { grid-template-columns: 1fr 3fr; }
.form-row--auto { display: flex; flex-wrap: wrap; gap: 0 8px; }
@media (max-width: 767px) { .form-row, .form-row--zip { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; position: relative; }
.input {
    display: block; width: 100%; height: 42px; padding: 8px 14px;
    font: 400 16px/24px var(--shop-font); color: var(--shop-ink);
    background: #fff; border: 1px solid var(--shop-border); border-radius: var(--shop-radius-sm);
    transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--shop-muted); opacity: 1; }
.input:focus { outline: 0; border-color: var(--shop-muted); box-shadow: 0 0 0 .2rem rgba(117, 36, 65, .1); }
select.input { height: 42px; line-height: normal; padding-right: 32px; appearance: none; -webkit-appearance: none;
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%237c8798' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") no-repeat right 12px center / 10px 10px; }
select.input:invalid { color: var(--shop-muted); }
select.input--auto { width: auto; }
.input--email { font-weight: 600; font-style: italic; }
.input.is-invalid, .field.is-invalid .input { border-color: var(--shop-danger); }
.field__error { position: absolute; z-index: 5; top: 100%; left: 0; margin-top: 2px; padding: 4px 8px; font-size: 14px; line-height: 20px; color: #fff; background: rgba(208, 0, 0, .9); border-radius: 6px; }
.field-label { display: block; font-size: 12px; line-height: 18px; color: var(--shop-muted); padding-left: 4px; }
.section-label { font-size: 14px; line-height: 16.8px; text-transform: uppercase; margin-bottom: 8px; }

/* Radios und Häkchen wie Bootstrap-Standard */
.choice { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; }
.choice input { margin: 0; width: 13px; height: 13px; }
.choice-sep { color: var(--shop-muted); padding: 0 12px; }
.choices { display: flex; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 16.8px; margin-bottom: 8px; word-wrap: break-word; cursor: pointer; }
.check input { margin: 2px 0 0; flex: 0 0 auto; }

/* Zahlungsoptionen */
.price-option + .price-option { border-top: 1px solid rgba(0, 0, 0, .1); margin-top: 16px; padding-top: 16px; }
.price-option__row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.price-option__amount { text-align: right; white-space: nowrap; }
.price-option__note { margin: 4px 0 0 21px; font-size: 14px; line-height: 16.8px; }
.price-option__note.muted { color: var(--shop-muted); }
del { color: var(--shop-muted); }
.coupon-line { border-bottom: 1px solid #dee2e6; color: var(--shop-secondary); }

/* Zahlungsart-Kacheln: alle gleich aufgebaut – Auswahlknopf, Name, Logos rechts (partials/payment-tiles.blade.php) */
.pay-tile { position: relative; background: #fff; border: 2px solid transparent; border-radius: var(--shop-radius); box-shadow: var(--shop-shadow); margin-bottom: 12px; transition: border-color .15s, box-shadow .15s; }
.pay-tile:hover { border-color: var(--shop-gray-300); }
.pay-tile.is-selected { border-color: var(--shop-secondary); }
.pay-tile__head { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 14px 20px; background: none; border: 0; text-align: left; cursor: pointer; font: 400 17px/24px var(--shop-font); color: var(--shop-text); }
.pay-tile__head:focus-visible { outline: 2px solid var(--shop-primary); outline-offset: -2px; border-radius: var(--shop-radius); }
.pay-tile__head[disabled] { cursor: default; }
.pay-tile__radio { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #9aa4b4; background: #fff; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.pay-tile:hover .pay-tile__radio { border-color: var(--shop-text); }
.pay-tile.is-selected .pay-tile__radio { border-color: var(--shop-primary); background: var(--shop-primary); box-shadow: inset 0 0 0 3.5px #fff; }
.pay-tile__label { flex: 1 1 auto; }
.pay-tile.is-selected .pay-tile__label { color: var(--shop-ink); }
.pay-tile__logos { display: flex; gap: 6px; flex: 0 0 auto; }
.pay-tile__logos img { width: 38px; height: 24px; object-fit: contain; }
.pay-tile__body { padding: 0 20px 20px; }
.pay-tile__info { display: block; background: var(--shop-card); padding: 14px 20px 16px 52px; font-size: 14px; line-height: 20px; border-radius: 0 0 var(--shop-radius) var(--shop-radius); }
@media (max-width: 400px) { .pay-tile__logos img { width: 30px; height: 20px; } .pay-tile__head { gap: 10px; padding: 12px 14px; } }
/* Apple-/Google-Pay-Knopf (Stripe Express Checkout): angelegt, bis zur Auswahl unsichtbar (sonst meldet Stripe keine Verfügbarkeit) */
.wallet-button { margin-bottom: 12px; }
.wallet-button.is-hidden { position: absolute; left: -9999px; width: 320px; height: 1px; overflow: hidden; visibility: hidden; }
.message--info { background: #eef4ff; color: #1d4ed8; }
.pay-tile input { position: absolute; opacity: 0; pointer-events: none; }
.stripe-box { min-height: 60px; margin-bottom: 16px; }
.stripe-box__loading { display: flex; align-items: center; gap: 8px; padding: 16px; color: var(--shop-muted); font-size: 14px; }

.notice { display: flex; gap: 6px; align-items: flex-start; font-size: 14px; line-height: 16.8px; font-style: italic; margin-top: 16px; }
.notice svg { flex: 0 0 auto; margin-top: 1px; }

/* Buttons */
.btn {
    display: inline-flex; justify-content: center; align-items: center; gap: 8px;
    padding: 16px; border: 1px solid transparent; border-radius: 800px;
    font: 400 16px/24px var(--shop-font); color: var(--shop-dark); text-align: center; cursor: pointer;
    transition: background-color .15s, border-color .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { text-decoration: none; }
.btn--block { display: flex; width: 100%; }
.btn--primary { background: var(--shop-secondary); border-color: var(--shop-secondary); }
.btn--primary:hover { background: #e9b40f; border-color: #e0ad0e; }
.btn--plain { background: #fff; border-color: var(--shop-border); }
.btn--outline { background: transparent; border-color: var(--shop-primary); color: var(--shop-primary); }
.btn--small { padding: 8px 32px; }
.btn[disabled], .btn.is-disabled { opacity: .65; cursor: default; pointer-events: none; }
.btn-row { margin: 16px 0 48px; }

.message { border-radius: var(--shop-radius-sm); padding: 12px 16px; font-size: 14px; line-height: 20px; margin-bottom: 16px; }
.message--error { background: #fdeaea; color: var(--shop-danger); }
.message--warning { background: #fff6dc; color: #8a6100; }

/* Ladeanzeige */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: shop-spin .75s linear infinite; vertical-align: middle; }
.spinner--large { width: 32px; height: 32px; border-width: 4px; }
@keyframes shop-spin { to { transform: rotate(360deg); } }
.processing { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 0 48px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* Upsell / Verlängerung */
.offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 30px; }
.offer__img { border-radius: var(--shop-radius); width: 100%; }
.offer__title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.offer__title h3 { color: var(--shop-dark); }
.offer__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; margin-top: 16px; }
.offer__prices { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 30px; margin-top: 16px; }
.price-card { background: #fff; border-radius: var(--shop-radius); box-shadow: var(--shop-shadow); padding: 25px; text-align: right; min-width: 230px; }
.price-card h4 { color: var(--shop-primary); margin-bottom: 8px; }
.price-card .price { font-size: 40px; line-height: 48px; color: var(--shop-dark); margin-bottom: 16px; }
.price-card ul { list-style: none; padding: 0; margin: 16px 0 24px; text-align: left; }
.offer__link { text-align: right; font-size: 14px; margin-top: 8px; }
.offer__footnote { font-size: 12px; line-height: 18px; margin-top: 16px; }
.card--white { background: #fff; color: var(--shop-dark); }
@media (max-width: 767px) {
    .offer { grid-template-columns: 1fr; }
    .offer__prices { justify-content: stretch; }
    .price-card { flex: 1 1 100%; }
}

/* Warteliste (iframe) */
.waitlist { padding-top: 16px; }
.waitlist .btn { padding: 8px 16px; }

/* Bestätigung der E-Mail-Adresse vor dem Kauf */
.dialog { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(33, 37, 41, .45); }
.dialog__box { width: 100%; max-width: 460px; background: #fff; border-radius: var(--shop-radius); box-shadow: 0 16px 48px rgba(33, 37, 41, .25); padding: 28px; color: var(--shop-ink); }
.dialog__box h4 { color: var(--shop-dark); font-weight: 500; margin-bottom: 12px; }
.dialog__hint { font-size: 14px; line-height: 20px; color: var(--shop-text); }
.dialog__label { display: block; font-size: 14px; margin: 16px 0 6px; color: var(--shop-text); }
.dialog .message { margin: 16px 0 0; }
.dialog__actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 24px; }
.dialog__actions .btn--primary { padding: 12px 24px; }
.btn--link { background: none; border: 0; padding: 12px 8px; color: var(--shop-text); }
.btn--link:hover { color: var(--shop-ink); }
