/**
 * BaumschulePflanzencenter-Gutscheine – Frontend (Shortcode) CSS
 *
 * Alle Selektoren sind unter .bpp-fe-wrap gescoped, damit keine
 * Theme- oder Admin-Styles kollidieren. Keine !important außer
 * für Inputs, wo Theme-CSS sonst reinspielt.
 *
 * @package BPP\Vouchers
 */

.bpp-fe-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #1d2327;
    box-sizing: border-box;
}

.bpp-fe-wrap *,
.bpp-fe-wrap *::before,
.bpp-fe-wrap *::after {
    box-sizing: border-box;
}

.bpp-fe-wrap .bpp-fe-title {
    margin: 0 0 20px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 600;
    color: #1d2327;
}

/* ─── Notices ─────────────────────────────────────────────────────────────── */
.bpp-fe-notice {
    padding: 12px 16px;
    margin: 0 0 20px;
    border-radius: 4px;
    border-left: 4px solid #72aee6;
    background: #f0f6fc;
    color: #1d2327;
}

.bpp-fe-notice--success {
    border-left-color: #2d8c2d;
    background: #edfaed;
}

.bpp-fe-notice--error {
    border-left-color: #cc0000;
    background: #fcf0f1;
}

.bpp-fe-notice--warning {
    border-left-color: #dba617;
    background: #fcf9e8;
}

.bpp-fe-notice--info {
    border-left-color: #72aee6;
    background: #f0f6fc;
}

/* ─── Suchformular ────────────────────────────────────────────────────────── */
.bpp-fe-search {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.bpp-fe-label {
    display: block;
    margin: 0 0 8px;
    font-weight: 600;
    font-size: 14px;
    color: #1d2327;
}

.bpp-fe-search-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
}

.bpp-fe-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px !important;
    border: 1px solid #8c8f94 !important;
    border-radius: 4px !important;
    background: #fff !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    color: #1d2327 !important;
    box-shadow: none !important;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.bpp-fe-input:focus {
    border-color: #2271b1 !important;
    box-shadow: 0 0 0 1px #2271b1 !important;
}

.bpp-fe-scan-input {
    font-size: 18px !important;
    font-variant-numeric: tabular-nums;
}

.bpp-fe-hint {
    margin: 12px 0 0;
    color: #646970;
    font-size: 13px;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.bpp-fe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: #f6f7f7;
    color: #1d2327;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
}

.bpp-fe-btn:hover {
    background: #e9eaea;
}

.bpp-fe-btn:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 1px;
}

.bpp-fe-btn--primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.bpp-fe-btn--primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

.bpp-fe-btn--redeem {
    background: #2d8c2d;
    border-color: #1a6a1a;
    color: #fff;
    font-size: 17px;
    padding: 12px 28px;
    font-weight: 600;
}

.bpp-fe-btn--redeem:hover {
    background: #1a6a1a;
    border-color: #155a15;
    color: #fff;
}

.bpp-fe-btn[disabled],
.bpp-fe-btn[disabled]:hover {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ─── Gutschein-Karte ─────────────────────────────────────────────────────── */
.bpp-fe-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-left-width: 6px;
    border-radius: 6px;
    overflow: hidden;
    margin: 0 0 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.bpp-fe-card--free      { border-left-color: #5b9bd5; }
.bpp-fe-card--assigned  { border-left-color: #2d8c2d; }
.bpp-fe-card--redeemed  { border-left-color: #9a9a9a; }
.bpp-fe-card--void      { border-left-color: #cc0000; }

.bpp-fe-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f1;
}

.bpp-fe-card__value {
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
}

.bpp-fe-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.bpp-fe-badge--free      { background: #ddeeff; color: #1155aa; }
.bpp-fe-badge--assigned  { background: #ddffdd; color: #1a7a1a; }
.bpp-fe-badge--redeemed  { background: #eeeeee; color: #555; }
.bpp-fe-badge--void      { background: #ffe0e0; color: #cc0000; }

/* ─── Details-Liste ───────────────────────────────────────────────────────── */
.bpp-fe-details {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 20px;
    row-gap: 10px;
    margin: 0;
    padding: 18px 20px;
}

.bpp-fe-details dt {
    font-weight: 600;
    color: #50575e;
    font-size: 14px;
}

.bpp-fe-details dd {
    margin: 0;
    color: #1d2327;
    font-size: 14px;
    word-break: break-word;
}

.bpp-fe-details code {
    display: inline-block;
    padding: 2px 6px;
    background: #f0f0f1;
    border-radius: 3px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    color: #1d2327;
}

.bpp-fe-status-text--free      { color: #1155aa; }
.bpp-fe-status-text--assigned  { color: #1a7a1a; }
.bpp-fe-status-text--redeemed  { color: #555; }
.bpp-fe-status-text--void      { color: #cc0000; }

/* ─── Einlöse-Action ──────────────────────────────────────────────────────── */
.bpp-fe-card__actions {
    padding: 16px 20px;
    background: #f9fff9;
    border-top: 1px solid #e0f0e0;
}

.bpp-fe-redeem-form {
    margin: 0;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .bpp-fe-wrap {
        padding: 16px;
    }

    .bpp-fe-search-row {
        flex-direction: column;
    }

    .bpp-fe-search-row .bpp-fe-input,
    .bpp-fe-search-row .bpp-fe-btn {
        width: 100%;
    }

    .bpp-fe-details {
        grid-template-columns: 1fr;
        row-gap: 4px;
    }

    .bpp-fe-details dd {
        margin-bottom: 8px;
    }

    .bpp-fe-card__value {
        font-size: 20px;
    }
}
