/* Lanakila Gutscheine – Gutschein-Seite [lanakila_gutschein]
 *
 * Spalten + Button-Farben kommen als CSS-Variablen aus den Einstellungen
 * (Inline-Style am <form>): --lgs-cols, --lgs-cols-md, --lgs-btn-*.
 * Theme-Buttons sind global gestylt → eigene Buttons mit erhöhter
 * Spezifität (.lgs-form …) und gezieltem !important.
 */
.lgs-form {
    --lgs-ink: #111;
    --lgs-muted: #767676;
    --lgs-line: #e4e4e4;
    --lgs-soft: #f6f5f3;
    --lgs-head: "Bebas Neue", "Oswald", Impact, sans-serif;
    width: 100%;
    color: var(--lgs-ink);
}

/* ---------- Schritte ---------- */
.lgs-form .lgs-step { padding: 8px 0 44px; }
.lgs-form .lgs-step + .lgs-step { border-top: 1px solid var(--lgs-line); padding-top: 40px; }
.lgs-form .lgs-step__head { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; }
.lgs-form .lgs-step__no {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 34px; height: 34px; border: 1px solid var(--lgs-ink); border-radius: 50%;
    font-family: var(--lgs-head); font-size: 18px; line-height: 1; padding-top: 2px;
}
.lgs-form .lgs-step__title {
    margin: 0; padding: 0; font-family: var(--lgs-head); font-weight: 400;
    font-size: 30px; line-height: 1; letter-spacing: .02em; text-transform: uppercase;
}
.lgs-form .lgs-hint { margin: 12px 0 0; font-size: 13px; color: var(--lgs-muted); }

/* ---------- Betrag ---------- */
.lgs-form .lgs-amount-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.lgs-form .lgs-quick { display: flex; flex-wrap: wrap; gap: 10px; }
.lgs-form .lgs-quick__btn {
    min-width: 88px; height: 58px; padding: 0 18px; margin: 0;
    background: #fff !important; color: var(--lgs-ink) !important;
    border: 1px solid #d6d6d6 !important; border-radius: 0; box-shadow: none;
    font-family: var(--lgs-head); font-size: 26px; font-weight: 400; line-height: 1; letter-spacing: .02em;
    cursor: pointer; transition: border-color .15s, background-color .15s, color .15s;
}
.lgs-form .lgs-quick__btn small { font-size: .7em; }
.lgs-form .lgs-quick__btn:hover { border-color: var(--lgs-ink) !important; }
.lgs-form .lgs-quick__btn.is-active { background: var(--lgs-ink) !important; color: #fff !important; border-color: var(--lgs-ink) !important; }
.lgs-form .lgs-amount-or { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--lgs-muted); }

.lgs-form .lgs-amount { position: relative; display: inline-flex; align-items: center; margin: 0; }
.lgs-form .lgs-amount input[type="number"] {
    width: 220px; height: 58px; margin: 0; padding: 0 44px 0 18px;
    border: 1px solid #d6d6d6; border-radius: 0; background: #fff; box-shadow: none;
    font-family: var(--lgs-head); font-size: 28px; letter-spacing: .02em; color: var(--lgs-ink);
    -moz-appearance: textfield; transition: border-color .15s;
}
.lgs-form .lgs-amount input::placeholder { font-size: 22px; color: #b3b3b3; }
.lgs-form .lgs-amount input:focus { border-color: var(--lgs-ink); outline: none; }
.lgs-form .lgs-amount input.is-filled { border-color: var(--lgs-ink); }
.lgs-form .lgs-amount input::-webkit-outer-spin-button,
.lgs-form .lgs-amount input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lgs-form .lgs-amount__cur { position: absolute; right: 18px; font-family: var(--lgs-head); font-size: 26px; color: var(--lgs-muted); pointer-events: none; }

/* ---------- Designs ---------- */
.lgs-form .lgs-designs {
    display: grid;
    grid-template-columns: repeat(var(--lgs-cols, 4), minmax(0, 1fr));
    gap: 28px 24px;
}
.lgs-form .lgs-design { position: relative; display: block; margin: 0; cursor: pointer; }
.lgs-form .lgs-design input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.lgs-form .lgs-design__card { display: block; }
.lgs-form .lgs-design__img {
    position: relative; display: block; aspect-ratio: 8 / 5; overflow: hidden;
    background: var(--lgs-soft); border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 6px 18px rgba(0, 0, 0, .06);
    outline: 2px solid transparent; outline-offset: 5px;
    transition: transform .25s ease, box-shadow .25s ease, outline-color .2s;
}
.lgs-form .lgs-design__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.lgs-form .lgs-design:hover .lgs-design__img { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0, 0, 0, .10), 0 16px 34px rgba(0, 0, 0, .10); }
.lgs-form .lgs-design:hover .lgs-design__img img { transform: scale(1.015); }
.lgs-form .lgs-design input:checked + .lgs-design__card .lgs-design__img { outline-color: var(--lgs-ink); }
.lgs-form .lgs-design input:focus-visible + .lgs-design__card .lgs-design__img { outline-color: var(--lgs-ink); outline-style: dashed; }
.lgs-form .lgs-design__check {
    position: absolute; top: 12px; right: 12px; display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%; background: var(--lgs-ink); color: #fff;
    opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s;
}
.lgs-form .lgs-design input:checked + .lgs-design__card .lgs-design__check { opacity: 1; transform: scale(1); }
.lgs-form .lgs-design__name {
    display: block; margin-top: 16px; text-align: center;
    font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--lgs-muted);
    transition: color .15s;
}
.lgs-form .lgs-design input:checked + .lgs-design__card .lgs-design__name { color: var(--lgs-ink); font-weight: 600; }

/* ---------- Zusammenfassung + Button ---------- */
.lgs-form .lgs-summary {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    margin-top: 8px; padding: 26px 30px; background: var(--lgs-soft);
}
.lgs-form .lgs-summary__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lgs-form .lgs-summary__label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--lgs-muted); }
.lgs-form .lgs-summary__value { font-family: var(--lgs-head); font-size: 30px; line-height: 1.1; letter-spacing: .02em; }
.lgs-form .lgs-summary__design { color: var(--lgs-muted); }
.lgs-form .lgs-summary__amount.is-empty { color: #b3b3b3; }
.lgs-form .lgs-summary__design:not(:empty)::before { content: "· "; }
.lgs-form .lgs-summary__note { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; color: var(--lgs-muted); }
.lgs-form .lgs-summary__note svg { flex: none; }

.lgs-form .lgs-submit {
    flex: none; margin: 0; padding: 20px 46px;
    background: var(--lgs-btn-bg, #000) !important; color: var(--lgs-btn-color, #fff) !important;
    border: 0 !important; border-radius: 0; box-shadow: none; text-shadow: none;
    font-size: 14px; font-weight: 600; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase;
    cursor: pointer; transition: background-color .2s, transform .1s;
}
.lgs-form .lgs-submit:hover, .lgs-form .lgs-submit:focus-visible { background: var(--lgs-btn-bg-hover, #333) !important; color: var(--lgs-btn-color, #fff) !important; }
.lgs-form .lgs-submit:active { transform: translateY(1px); }
.lgs-form .lgs-submit:focus-visible { outline: 2px solid var(--lgs-btn-bg, #000); outline-offset: 3px; }

/* ---------- Fehler ---------- */
.lgs-form .lgs-errors { margin: 0 0 32px; padding: 14px 18px; border-left: 3px solid #c0392b; background: #fdf1f0; color: #7d231a; }
.lgs-form .lgs-errors p { margin: 0; }
.lgs-form .lgs-errors p + p { margin-top: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .lgs-form .lgs-designs { grid-template-columns: repeat(var(--lgs-cols-md, 2), minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .lgs-form .lgs-step { padding-bottom: 32px; }
    .lgs-form .lgs-step + .lgs-step { padding-top: 30px; }
    .lgs-form .lgs-step__title { font-size: 26px; }
    .lgs-form .lgs-quick { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; gap: 8px; }
    .lgs-form .lgs-quick__btn { min-width: 0; padding: 0 6px; font-size: 22px; }
    .lgs-form .lgs-amount-or { width: 100%; text-align: center; }
    .lgs-form .lgs-amount, .lgs-form .lgs-amount input[type="number"] { width: 100%; }
    .lgs-form .lgs-designs { grid-template-columns: 1fr; gap: 26px; }
    .lgs-form .lgs-design__img { outline-offset: 3px; }
    .lgs-form .lgs-summary { flex-direction: column; align-items: stretch; padding: 22px 20px; }
    .lgs-form .lgs-submit { width: 100%; }
}
