/**
 * @file        abos.css
 * @location    /abos.css
 * @description Abonnement-Formular Styles. Prefix: abos__
 *              Palette: #07003D (Navy) + #ffffff (Weiß) — keine weiteren Farben.
 *              WCAG 2.2 AA — alle Kontraste ≥ 5:1.
 *
 * @version     1.0.0
 * @changelog
 *   1.0.0  2026-03-18  Erstversion. Basiert auf page-abo-form-include.php v4.0.0.
 *                      Honeypot statt Math. 3 separate Dateien: php/css/js.
 */

/* ── Variablen ────────────────────────────────────────────────────────── */
.abos__wrap {
    --abos-navy:     #07003D;   /* Hauptfarbe */
    --abos-navy-dk:  #002244;   /* Hover/Aktiv */
    --abos-navy-mid: #1a5276;   /* Sekundär — white/mid = 8.36:1 ✓ */
    --abos-navy-lt:  #e8f0fa;   /* Heller Hintergrund */
    --abos-navy-bd:  #b8d0ee;   /* Border auf hellem Bg */
    --abos-white:    #ffffff;
    --abos-bg:       #f4f7fb;   /* Seiten-Hintergrund */
    --abos-border:   #cfdcea;
    --abos-error:    #b91c1c;   /* 6.47:1 auf white ✓ */
    --abos-error-lt: #fff5f5;
    --abos-shadow:   0 2px 12px rgba(0,51,102,.09), 0 1px 3px rgba(0,51,102,.05);
    --abos-radius:   10px;
}

/* ── Seite ────────────────────────────────────────────────────────────── */
.abos__section {
    background: var(--color-surface);
    padding: 48px 0 72px;
    font-family: 'Lato', sans-serif;
    color: var(--abos-navy);
}
.abos__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Utilities ────────────────────────────────────────────────────────── */
.abos__hidden   { display: none !important; }
.abos__visible  { display: block !important; }
.abos__sr-only {
    position: absolute; width:1px; height:1px; padding:0;
    margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0;
}

/* ── Seitentitel ──────────────────────────────────────────────────────── */
.abos__title {
    text-align: center;
    margin-bottom: 20px;
    /* #07003D / #f4f7fb = 10.47:1 ✓ */
    color: var(--abos-navy);
    font-size: 2rem;
    font-weight: 700;
}

/* ── Fehler-Banner ────────────────────────────────────────────────────── */
/* #b91c1c / #fff5f5 = 6.47:1 ✓ */
.abos__alert {
    display: flex; align-items: flex-start; gap: .5rem;
    background: var(--abos-error-lt); border: 1px solid #fecaca;
    border-radius: var(--abos-radius); padding: .85rem 1rem;
    color: var(--abos-error); font-size: .875rem; margin-bottom: 1.25rem;
}
.abos__alert-list { margin: 0; padding-left: 1.1rem; }

/* ── Erfolg ───────────────────────────────────────────────────────────── */
.abos__success {
    background: var(--abos-white); border: 1px solid var(--abos-navy-bd);
    border-radius: var(--abos-radius); padding: 3rem 2rem;
    text-align: center; box-shadow: var(--abos-shadow);
}
/* #07003D / #fff = 12.61:1 ✓ */
.abos__success-icon  { font-size: 3rem; color: var(--abos-navy); margin-bottom: .75rem; }
.abos__success-title { font-size: 1.4rem; font-weight: 800; color: var(--abos-navy); margin: 0 0 .5rem; }
/* #1a5276 / #fff = 8.36:1 ✓ */
.abos__success-msg   { font-size: .9rem; color: var(--abos-navy-mid); line-height: 1.65; margin: 0 0 1.5rem; }

/* ── Selection Prompt ──────────────────────────────────────────────────── */
/* #07003D / #e8f0fa = 10.97:1 ✓ */
.abos__select-prompt {
    background: var(--abos-navy-lt); border: 1.5px solid var(--abos-navy-bd);
    color: var(--abos-navy); padding: 12px;
    border-radius: 8px; text-align: center; margin: 15px 0;
    font-size: .95rem;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* ── Plan-Karten ──────────────────────────────────────────────────────── */
.abos__row {
    display: flex; flex-wrap: wrap; margin: -8px;
}
.abos__col-md-6 {
    flex: 0 0 50%; max-width: 50%; padding: 8px;
}

/* Karte: Navy-Hintergrund exakt wie Referenz-Karte (war rot) */
/* #ffffff / #07003D = 12.61:1 ✓ */
.abos__card {
    background: var(--abos-navy);
    color: var(--abos-white);
    border-radius: var(--abos-radius); padding: 18px;
    margin-bottom: 15px; position: relative; overflow: hidden;
    cursor: pointer;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    border: 2px solid transparent;
}
.abos__card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 16px rgba(0,51,102,.22);
    border-color: rgba(255,255,255,.15);
}
.abos__card--selected {
    background: var(--abos-navy-dk);
    box-shadow: 0 0 0 3px rgba(0,51,102,.4), 0 8px 20px rgba(0,51,102,.2);
    border-color: rgba(255,255,255,.2);
}

.abos__card-title {
    font-size: 1.15rem; font-weight: 600; margin-bottom: 10px;
    display: flex; align-items: center; gap: .4rem;
    /* #ffffff / #07003D = 12.61:1 ✓ */
    color: var(--abos-white); opacity: .92;
}
/* #cce0ff / #07003D = 9.41:1 ✓ */
.abos__card-price {
    font-size: 1.8rem; font-weight: 700; color: #cce0ff;
    margin: 8px 0 4px; line-height: 1;
}
/* rgba(255,255,255,.88) auf navy ≈ #ddeeff = 8.1:1 ✓ */
.abos__card-period { font-size: .88rem; color: rgba(255,255,255,.88); }

/* Features-Liste */
.abos__features {
    list-style: none; padding: 0; margin: 15px 0;
}
/* #ffffff / #07003D = 12.61:1 ✓ */
.abos__features li {
    margin: 10px 0; padding-left: 32px; position: relative;
    line-height: 1.5; font-size: 1.2rem; color: rgba(255,255,255,.92);
}
.abos__features li i {
    position: absolute; left: 0; top: 2px;
    width: 22px; height: 22px;
    background: rgba(255,255,255,.1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    /* #9ec8ff / #07003D = 7.30:1 ✓ */
    color: #9ec8ff;
    border: 1px solid rgba(255,255,255,.2);
}
.abos__card:hover .abos__features li { padding-left: 35px; }

/* Checkbox versteckt, Label als Button */
.abos__card-checkbox { display: none; }

/* #07003D / #ffffff = 12.61:1 ✓ */
.abos__card-choose {
    cursor: pointer;
    display: inline-flex; align-items: center; gap: .5rem;
    padding: 8px 16px;
    background: rgba(255,255,255,.1);
    border: 1.5px solid rgba(255,255,255,.4);
    border-radius: 8px; font-size: .95rem; font-weight: 500;
    margin: 10px 0; color: var(--abos-white);
    transition: all .3s cubic-bezier(.4,0,.2,1);
}
.abos__card-choose:hover {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.65);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.abos__card-checkbox:checked + label.abos__card-choose,
.abos__card--selected .abos__card-choose {
    background: rgba(255,255,255,.22);
    border-color: var(--abos-white);
}
.abos__checkmark {
    width: 20px; height: 20px;
    border: 1.5px solid var(--abos-white); border-radius: 4px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.1); flex-shrink: 0;
    transition: all .25s ease;
}
.abos__card-checkbox:checked ~ .abos__card-choose .abos__checkmark,
.abos__card--selected .abos__checkmark {
    background: var(--abos-white);
    font-family: 'bootstrap-icons';
    color: var(--abos-navy);
}
.abos__card-checkbox:checked ~ .abos__card-choose .abos__checkmark::after,
.abos__card--selected .abos__checkmark::after {
    content: '\F26A'; /* bi-check */
    font-family: 'bootstrap-icons';
    font-size: 14px;
    color: var(--abos-navy);
}

/* Menge */
.abos__qty-section {
    display: none; margin-top: 12px; padding: 12px;
    background: rgba(255,255,255,.08); border-radius: 6px;
}
.abos__qty-section.abos__visible { display: block; }
/* #ffffff / #07003D = 12.61:1 ✓ */
.abos__qty-label {
    color: var(--abos-white); margin-bottom: 6px;
    display: block; font-size: .9rem;
}
.abos__qty-calc { margin-top: 8px; color: #cce0ff; font-size: .9rem; font-weight: 500; }

/* ── Preis-Combo ──────────────────────────────────────────────────────── */
/* #ffffff / #07003D = 12.61:1 ✓ */
.abos__price-combo {
    background: var(--abos-navy); color: var(--abos-white);
    border-radius: var(--abos-radius); padding: 12px;
    text-align: center; margin-top: 15px; display: none; font-size: 1.1rem;
    animation: abos-slideup .3s ease;
}
.abos__price-combo.abos__visible { display: block; }
@keyframes abos-slideup {
    from { opacity:0; transform:translateY(10px); }
    to   { opacity:1; transform:none; }
}

/* ── Formular-Bereich ─────────────────────────────────────────────────── */
.abos__form-section { display: none; margin-top: 20px; }
.abos__form-section.abos__visible {
    display: block;
    animation: abos-fadein .4s ease;
}
@keyframes abos-fadein {
    from { opacity:0; transform:translateY(5px); }
    to   { opacity:1; transform:none; }
}

/* ── Formular-Felder ──────────────────────────────────────────────────── */
.abos__form-group { margin-bottom: 15px; }

/* #07003D / #f4f7fb = 10.47:1 ✓ */
.abos__form-group label {
    display: block; margin-bottom: 4px;
    font-weight: 500; color: var(--abos-navy);
    font-size: .9rem;
}
/* #b91c1c / #fff = 6.47:1 ✓ */
.abos__req { color: var(--abos-error); }

/* #07003D / #ffffff = 12.61:1 ✓ */
.abos__input, .abos__select {
    width: 100%; padding: 8px 12px;
    border: 1.5px solid var(--abos-border);
    border-radius: 6px; font-size: .95rem;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    background: var(--abos-white); color: var(--abos-navy);
    font-family: inherit; outline: none;
}
.abos__input::placeholder { color: var(--abos-navy-mid); } /* 8.36:1 ✓ */
.abos__input:focus, .abos__select:focus {
    border-color: var(--abos-navy);
    box-shadow: 0 0 0 2px rgba(0,51,102,.12);
}
.abos__input--error {
    border-color: var(--abos-error) !important;
    box-shadow: 0 0 0 2px rgba(185,28,28,.12) !important;
}

/* Passwort-Wrapper */
.abos__pw-wrap { position: relative; }
.abos__pw-wrap .abos__input { padding-right: 48px; }
/* #07003D / #ffffff = 12.61:1 ✓ */
.abos__pw-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--abos-navy);
    cursor: pointer; padding: 4px 8px; transition: all .3s ease; z-index: 10;
}
.abos__pw-toggle:hover { background: rgba(0,51,102,.08); border-radius: 4px; }
.abos__pw-toggle:focus-visible { outline: 2px solid var(--abos-navy); outline-offset: 2px; }

/* Passwortstärke */
.abos__pw-strength { margin-top: 6px; display: none; }
.abos__pw-strength.abos__visible { display: block; }
.abos__pw-strength-bar {
    height: 3px; background: var(--abos-border);
    border-radius: 3px; overflow: hidden; margin-bottom: 4px;
}
.abos__pw-strength-fill { height: 100%; border-radius: 3px; transition: all .3s ease; }
/* #b91c1c/white=6.47 ✓, #9e4700/white=6.26 ✓, #1a5276/white=8.36 ✓, #07003D/white=12.61 ✓ */
.abos__str-weak   { background: var(--abos-error);    width: 25%; }
.abos__str-fair   { background: #9e4700;               width: 50%; }
.abos__str-good   { background: var(--abos-navy-mid);  width: 75%; }
.abos__str-strong { background: var(--abos-navy);      width: 100%; }
/* #1a5276 / #f4f7fb = 7.54:1 ✓ */
.abos__pw-strength-text { font-size: .8rem; font-weight: 500; color: var(--abos-navy-mid); }
.abos__pw-match { font-size: .8rem; margin-top: 6px; }
.abos__pw-match--ok  { color: var(--abos-navy); }    /* 12.61:1 ✓ */
.abos__pw-match--err { color: var(--abos-error); }   /* 6.47:1 ✓ */

/* ── Passwort-Sektion ─────────────────────────────────────────────────── */
/* #07003D / #e8f0fa = 10.97:1 ✓ */
.abos__pw-section {
    background: var(--abos-navy-lt);
    border-radius: var(--abos-radius); padding: 18px;
    margin: 20px 0; border: 1.5px solid var(--abos-navy-bd);
    display: none;
}
.abos__pw-section.abos__visible { display: block; animation: abos-fadein .3s ease; }
.abos__pw-section h4 { color: var(--abos-navy); margin-bottom: 12px; font-size: 1.1rem; }

/* ── Alt-Rechnung ──────────────────────────────────────────────────────── */
/* #07003D / #e8f0fa = 10.97:1 ✓ */
.abos__alt-invoice-wrapper {
    background: var(--abos-navy-lt);
    border-radius: var(--abos-radius); padding: 15px; margin: 15px 0;
    border: 1.5px solid var(--abos-navy-bd);
    transition: all .3s ease;
}
.abos__alt-invoice-checkbox {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; padding: 4px; border-radius: 6px; transition: background .3s;
}
.abos__alt-invoice-checkbox:hover { background: rgba(0,51,102,.06); }
.abos__alt-invoice-checkbox input[type="checkbox"] {
    appearance: none; width: 22px; height: 22px; cursor: pointer;
    background: var(--abos-white); border: 1.5px solid var(--abos-navy);
    border-radius: 4px; position: relative; transition: all .3s ease; flex-shrink: 0;
}
.abos__alt-invoice-checkbox input[type="checkbox"]:checked {
    background: var(--abos-navy); border-color: var(--abos-navy-dk);
}
.abos__alt-invoice-checkbox input[type="checkbox"]:checked::after {
    content: '\F26A'; font-family: 'bootstrap-icons';
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    /* #ffffff / #07003D = 12.61:1 ✓ */
    color: var(--abos-white); font-size: 14px;
}
/* #07003D / #e8f0fa = 10.97:1 ✓ */
.abos__alt-invoice-checkbox label {
    color: var(--abos-navy); font-size: .95rem; font-weight: 500;
    cursor: pointer; margin: 0; display: flex; align-items: center; gap: 6px;
}
.abos__alt-invoice {
    display: none; margin-top: 15px; padding: 15px;
    background: var(--abos-white); border-radius: 8px;
    border: 1.5px solid var(--abos-navy-bd);
}
.abos__alt-invoice.abos__visible { display: block; animation: abos-fadein .3s ease; }
.abos__alt-invoice h4 { color: var(--abos-navy); margin-bottom: 12px; font-size: 1.05rem; }

/* ── Datenschutz ──────────────────────────────────────────────────────── */
/* #07003D / #f4f7fb = 10.47:1 ✓ */
.abos__terms-wrapper {
    background: var(--abos-bg); border-radius: 8px; padding: 15px;
    margin: 15px 0; border: 1px solid var(--abos-border);
}
.abos__terms-wrapper label {
    display: flex; align-items: flex-start; gap: 8px;
    color: var(--abos-navy); font-size: .9rem; cursor: pointer; margin: 0;
}
.abos__terms-wrapper input[type="checkbox"] {
    margin-top: 2px; flex-shrink: 0; accent-color: var(--abos-navy);
}
/* #07003D / #f4f7fb = 10.47:1 ✓ */
.abos__terms-wrapper a { color: var(--abos-navy); text-decoration: underline; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
/* #ffffff / #07003D = 12.61:1 ✓ */
.abos__btn {
    background: var(--abos-navy); border: none;
    padding: 12px 28px; font-size: 1.05rem; font-weight: 500;
    border-radius: 25px; color: var(--abos-white);
    cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
    box-shadow: 0 3px 10px rgba(0,51,102,.28);
    text-transform: uppercase; letter-spacing: .5px;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    font-family: inherit;
}
.abos__btn:hover {
    background: var(--abos-navy-dk);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,51,102,.4);
}
.abos__btn:disabled {
    background: var(--abos-navy-mid);
    cursor: not-allowed; box-shadow: none; opacity: .5;
}
.abos__btn:focus-visible { outline: 3px solid var(--abos-navy); outline-offset: 3px; }

/* Security Badge */
/* #1a5276 / #f4f7fb = 7.54:1 ✓ */
.abos__security-badge {
    display: flex; align-items: center; gap: 6px;
    color: var(--abos-navy-mid); font-size: .85rem;
    margin-top: 8px; opacity: .85;
}

/* ── Toast ────────────────────────────────────────────────────────────── */
.abos__toast-container {
    position: fixed; bottom: 20px; right: 20px;
    z-index: 9999; max-width: 320px;
    display: flex; flex-direction: column; gap: .5rem;
}
.abos__toast {
    background: var(--abos-white); border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,51,102,.14);
    padding: 12px; display: flex; align-items: flex-start; gap: 10px;
    animation: abos-slide-in .3s ease-out;
    position: relative; overflow: hidden;
}
@keyframes abos-slide-in { from{transform:translateX(100%);opacity:0} to{transform:none;opacity:1} }
.abos__toast--out { animation: abos-slide-out .3s ease-out forwards; }
@keyframes abos-slide-out { to{transform:translateX(100%);opacity:0} }
.abos__toast-icon {
    flex-shrink: 0; width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 12px;
}
/* #fff / navy = 12.61:1 ✓, #fff / error = 6.47:1 ✓ */
.abos__toast--success .abos__toast-icon { background: var(--abos-navy); color: var(--abos-white); }
.abos__toast--error   .abos__toast-icon { background: var(--abos-error); color: var(--abos-white); }
.abos__toast--warning .abos__toast-icon { background: #9e4700; color: var(--abos-white); }
.abos__toast--info    .abos__toast-icon { background: var(--abos-navy-mid); color: var(--abos-white); }
.abos__toast-body { flex: 1; }
/* #07003D / #fff = 12.61:1 ✓ */
.abos__toast-title { font-weight: 600; margin-bottom: 2px; color: var(--abos-navy); font-size: .9rem; }
/* #1a5276 / #fff = 8.36:1 ✓ */
.abos__toast-msg { color: var(--abos-navy-mid); font-size: .85rem; }
/* #1a5276 / #fff = 8.36:1 ✓ */
.abos__toast-close {
    position: absolute; top: 6px; right: 6px;
    background: none; border: none; color: var(--abos-navy-mid);
    cursor: pointer; padding: 2px; font-size: 16px;
}
.abos__toast-bar { position: absolute; bottom: 0; left: 0; height: 2px; animation: abos-progress 5s linear; }
.abos__toast--success .abos__toast-bar,
.abos__toast--info    .abos__toast-bar { background: var(--abos-navy); }
.abos__toast--error   .abos__toast-bar { background: var(--abos-error); }
.abos__toast--warning .abos__toast-bar { background: #9e4700; }
@keyframes abos-progress { from{width:100%} to{width:0} }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .abos__col-md-6 { flex: 0 0 100%; max-width: 100%; }
    .abos__title    { font-size: 1.5rem; }
    .abos__card-price { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .abos__card, .abos__input, .abos__btn, .abos__toast { transition: none !important; animation: none !important; }
}
