/* Gutschein-Verwaltung – Frontend CSS (kompiliert aus style.scss)
   Highlight-Farbe wird per PHP als CSS Custom Property injiziert:
   :root { --highlight: ...; --highlight-dark: ...; }
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: Georgia, serif; color: #2c2c2c; background: #f7f5f3; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--highlight); text-decoration: none; }
a:hover { color: var(--highlight-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
code { font-family: 'Courier New', monospace; font-size: .9em; background: #f0ede9; padding: .15em .4em; border-radius: 3px; }

.container { max-width: 860px; margin: 0 auto; padding: 0 1.25rem; }

.site-header { background: #fff; border-bottom: 1px solid #e0e0e0; padding: 1rem 0; }
.site-header__logo img { max-height: 60px; width: auto; }
.site-footer { margin-top: 4rem; border-top: 1px solid #e0e0e0; padding: 1.5rem 0; font-family: system-ui,-apple-system,sans-serif; font-size: .8rem; color: #777; text-align: center; }
.site-main { padding: 2.5rem 0 4rem; }

/* Buttons */
.btn { display: inline-block; font-family: system-ui,-apple-system,sans-serif; font-size: .95rem; font-weight: 600; padding: .65em 1.4em; border-radius: 6px; border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s; white-space: nowrap; }
.btn--primary { background: var(--highlight); color: #fff; border-color: var(--highlight); }
.btn--primary:hover { background: var(--highlight-dark); border-color: var(--highlight-dark); color: #fff; text-decoration: none; }
.btn--outline { background: transparent; color: var(--highlight); border-color: var(--highlight); }
.btn--outline:hover { background: var(--highlight); color: #fff; text-decoration: none; }
.btn--large { font-size: 1.05rem; padding: .8em 2em; }
.btn--block { display: block; width: 100%; text-align: center; }

/* Alerts */
.alert { padding: .85rem 1.1rem; border-radius: 6px; font-family: system-ui,-apple-system,sans-serif; font-size: .9rem; margin-bottom: 1.25rem; }
.alert--error { background: #fdf0f0; border-left: 4px solid #d9534f; color: #8b1a1a; }
.alert--success { background: #f0fdf4; border-left: 4px solid #5cb85c; color: #1a5c1a; }
.alert--info { background: #f0f6fd; border-left: 4px solid #5b9bd5; color: #1a3d5c; }

/* Badges */
.badge { display: inline-block; font-family: system-ui,-apple-system,sans-serif; font-size: .75rem; font-weight: 700; padding: .25em .65em; border-radius: 20px; text-transform: uppercase; letter-spacing: .04em; }
.badge--pending { background: #fff3cd; color: #856404; }
.badge--paid { background: #d1e7dd; color: #0a5c32; }
.badge--redeemed { background: #d3d3ff; color: #3700b3; }
.badge--cancelled { background: #f8d7da; color: #842029; }

/* Cards */
.card { background: #fff; border-radius: 6px; box-shadow: 0 2px 12px rgba(0,0,0,.08); padding: 1.75rem 2rem; margin-bottom: 1.5rem; }
.card__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.1rem; padding-bottom: .6rem; border-bottom: 1px solid #e0e0e0; font-family: system-ui,-apple-system,sans-serif; }
.card--center { text-align: center; }
.card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; padding-bottom: .6rem; border-bottom: 1px solid #e0e0e0; }
.card__header .card__title { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

/* Detail list */
.detail-list { display: grid; grid-template-columns: 9rem 1fr; gap: .35rem .75rem; font-family: system-ui,-apple-system,sans-serif; font-size: .9rem; }
.detail-list dt { color: #777; font-weight: 500; }
.detail-list dd { font-weight: 500; word-break: break-word; }

/* Forms */
.form-section { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 1.5rem 1.75rem; margin-bottom: 1.25rem; }
.form-section__legend { font-family: system-ui,-apple-system,sans-serif; font-size: 1rem; font-weight: 700; padding: 0 .5rem; display: flex; align-items: center; gap: .6rem; color: #2c2c2c; }
.form-section__number { display: inline-flex; align-items: center; justify-content: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--highlight); color: #fff; font-size: .85rem; font-weight: 700; flex-shrink: 0; }
.form-section__optional { font-weight: 400; color: #777; font-size: .85rem; }
.form-group { margin-bottom: 1rem; }
.form-group--full { width: 100%; }
.form-group--grow { flex: 1; }
.form-row { display: flex; gap: 1rem; }
.form-row--cols { flex-wrap: wrap; }
.form-row--cols .form-group { flex: 1; min-width: 140px; }
.form-label { display: block; font-family: system-ui,-apple-system,sans-serif; font-size: .875rem; font-weight: 600; margin-bottom: .35rem; color: #2c2c2c; }
.form-input { display: block; width: 100%; padding: .6rem .85rem; font-family: system-ui,-apple-system,sans-serif; font-size: .95rem; border: 1px solid #e0e0e0; border-radius: 6px; background: #fff; color: #2c2c2c; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; }
.form-input:focus { outline: none; border-color: var(--highlight); box-shadow: 0 0 0 3px rgba(200,149,108,.18); }
.form-input.is-invalid { border-color: #d9534f; }
select.form-input { cursor: pointer; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-error { font-family: system-ui,-apple-system,sans-serif; font-size: .8rem; color: #d9534f; margin-top: .3rem; }
.form-hint { font-family: system-ui,-apple-system,sans-serif; font-size: .8rem; color: #777; margin-top: .35rem; }
.input-group { display: flex; }
.input-group__addon { display: flex; align-items: center; padding: 0 .75rem; background: #f0ede9; border: 1px solid #e0e0e0; border-right: none; border-radius: 6px 0 0 6px; font-family: system-ui,-apple-system,sans-serif; color: #777; font-size: .9rem; }
.input-group .form-input { border-radius: 0 6px 6px 0; }

/* Value grid */
.value-grid { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.value-option { cursor: pointer; }
.value-option input { display: none; }
.value-option__label { display: block; padding: .55em 1.1em; border: 2px solid #e0e0e0; border-radius: 6px; font-family: system-ui,-apple-system,sans-serif; font-size: .95rem; font-weight: 600; transition: border-color .15s, background .15s, color .15s; user-select: none; }
.value-option:hover .value-option__label, .value-option.is-selected .value-option__label { border-color: var(--highlight); background: var(--highlight); color: #fff; }
.custom-value-wrapper { display: none; }
.custom-value-wrapper.is-visible { display: block; }

/* Delivery */
.delivery-options { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.delivery-option { cursor: pointer; display: flex; align-items: center; gap: .75rem; padding: .85rem 1.1rem; border: 2px solid #e0e0e0; border-radius: 6px; flex: 1; min-width: 180px; transition: border-color .15s, background .15s; }
.delivery-option input { display: none; }
.delivery-option__icon { font-size: 1.4rem; }
.delivery-option__text { display: flex; flex-direction: column; gap: .1rem; }
.delivery-option__text small { font-size: .78rem; color: #777; }
.delivery-option:hover, .delivery-option.is-selected { border-color: var(--highlight); background: rgba(200,149,108,.05); }
.post-address-fields { display: none; margin-top: .75rem; padding: 1rem; background: #faf9f8; border-radius: 6px; }
.post-address-fields.is-visible { display: block; }

/* Recipient toggle */
.recipient-toggle { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.toggle-option { cursor: pointer; padding: .5em 1.1em; border: 2px solid #e0e0e0; border-radius: 6px; font-family: system-ui,-apple-system,sans-serif; font-size: .9rem; transition: border-color .15s, background .15s; }
.toggle-option input { display: none; }
.toggle-option:hover, .toggle-option.is-selected { border-color: var(--highlight); background: rgba(200,149,108,.07); }
.recipient-fields { display: none; margin-top: .75rem; }
.recipient-fields.is-visible { display: block; }

/* Order summary */
.order-summary { background: #fff; border: 2px solid var(--highlight); border-radius: 6px; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.order-summary__title { font-family: system-ui,-apple-system,sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: .75rem; }
.order-summary__list { display: grid; grid-template-columns: 1fr auto; gap: .35rem .75rem; font-family: system-ui,-apple-system,sans-serif; font-size: .9rem; }
.order-summary__list dt { color: #777; }
.order-summary__list dd { font-weight: 600; text-align: right; }
.order-summary__total { font-size: 1rem !important; font-weight: 700 !important; color: #2c2c2c !important; border-top: 1px solid #e0e0e0; padding-top: .4rem; margin-top: .25rem; }
.is-hidden { display: none !important; }
.form-submit { text-align: center; }
.form-submit .btn { min-width: 240px; }
.form-submit .form-hint { margin-top: .75rem; }

/* Confirm page */
.confirm-page__hero { text-align: center; padding: 2rem 0 1.5rem; }
.confirm-page__hero h1 { font-size: 1.7rem; margin: .75rem 0 .5rem; }
.confirm-page__hero p { color: #777; font-family: system-ui,-apple-system,sans-serif; font-size: .95rem; }
.confirm-page__check { display: inline-flex; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--highlight); color: #fff; font-size: 1.8rem; font-weight: 700; }
.confirm-page__back { text-align: center; margin-top: 1rem; }
.bank-table { width: 100%; border-collapse: collapse; font-family: system-ui,-apple-system,sans-serif; font-size: .9rem; margin-top: .75rem; }
.bank-table th, .bank-table td { padding: .55rem .5rem; border-bottom: 1px solid #e0e0e0; text-align: left; }
.bank-table th { color: #777; width: 140px; font-weight: 500; }
.iban, .payment-ref { letter-spacing: .03em; font-size: 1rem; }

/* Redeem page */
.redeem-page { max-width: 600px; margin: 0 auto; }
.voucher-display { text-align: center; padding: 1rem 0 1.5rem; border-bottom: 1px solid #e0e0e0; margin-bottom: 1.25rem; }
.voucher-display__label { font-family: system-ui,-apple-system,sans-serif; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #777; }
.voucher-display__value { font-size: 3rem; font-weight: 700; color: var(--highlight); line-height: 1.1; }
.voucher-display__code { font-family: monospace; font-size: .9rem; color: #777; margin-top: .35rem; }
.redeem-icon { font-size: 3rem; margin-bottom: .75rem; }
.redeem-icon--done { color: #5cb85c; }
.redeem-icon--error { color: #d9534f; }
.redeem-icon--pending { color: #f0ad4e; }

.order-page__intro { margin-bottom: 1.5rem; }
.order-page__title { font-size: 1.8rem; margin-bottom: .4rem; }
.order-page__lead { font-family: system-ui,-apple-system,sans-serif; color: #777; }

.char-counter { transition: color .15s; }
.char-counter--warning { color: #f0ad4e !important; }
.char-counter--error { color: #d9534f !important; }

@media (max-width: 640px) {
  .form-row--cols { flex-direction: column; }
  .delivery-options { flex-direction: column; }
  .order-page__title { font-size: 1.4rem; }
  .bank-table th { width: 110px; }
}
