:root {
    --eerm-ink: #17202a;
    --eerm-muted: #64748b;
    --eerm-line: #d8e0ea;
    --eerm-soft: #f6f8fb;
    --eerm-panel: #ffffff;
    --eerm-accent: #0f766e;
    --eerm-accent-dark: #115e59;
    --eerm-danger: #b42318;
    --eerm-radius: 8px;
}

.eerm-form,
.eerm-card {
    box-sizing: border-box;
    color: var(--eerm-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.eerm-form *,
.eerm-card * {
    box-sizing: border-box;
}

/* Frontend form */
.eerm-form {
    width: min(100%, 780px);
    margin: 0 auto;
    padding: clamp(20px, 3vw, 34px);
    border: 1px solid var(--eerm-line);
    border-radius: 8px;
    background: var(--eerm-panel);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}

.eerm-form label,
.eerm-form input,
.eerm-form select,
.eerm-form textarea {
    font-family: var(--eerm-field-font, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.eerm-form .eerm-submit {
    font-family: var(--eerm-button-font, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.eerm-form h3 {
    margin: 0 0 8px;
    font-size: 32px;
    line-height: 1.1;
    font-weight: 750;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.eerm-description {
    max-width: 66ch;
    color: var(--eerm-muted);
    line-height: 1.65;
}

.eerm-price {
    display: inline-flex;
    margin: 12px 0 24px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #edf7f5;
    color: var(--eerm-accent-dark);
    font-weight: 750;
}

.eerm-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.eerm-form label {
    display: block;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 650;
}

.eerm-form input:not([type="radio"]):not([type="checkbox"]),
.eerm-form select,
.eerm-form textarea {
    width: 100%;
    min-height: 48px;
    margin-top: 7px;
    padding: 12px 13px;
    border: 1px solid #b9c4d2;
    border-radius: 8px;
    background: #fff;
    color: var(--eerm-ink);
    font-size: 15px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.eerm-form textarea {
    min-height: 104px;
    resize: vertical;
}

.eerm-form input:not([type="radio"]):not([type="checkbox"]):focus,
.eerm-form select:focus,
.eerm-form textarea:focus {
    outline: none;
    border-color: var(--eerm-accent);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
}

.eerm-payment-methods {
    display: grid;
    gap: 10px;
    margin: 20px 0;
    padding: 0;
    border: 0;
}

.eerm-payment-methods legend {
    margin-bottom: 8px;
    padding: 0;
    font-size: 20px;
    font-weight: 750;
}

.eerm-payment-choice {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    margin: 0 !important;
    padding: 14px;
    border: 1px solid var(--eerm-line);
    border-radius: 8px;
    background: var(--eerm-soft);
    cursor: pointer;
}

.eerm-payment-choice input {
    margin-top: 4px;
}

.eerm-payment-choice strong,
.eerm-payment-choice small {
    display: block;
}

.eerm-payment-choice small {
    margin-top: 3px;
    color: var(--eerm-muted);
    font-weight: 500;
}

.eerm-bank-details,
.eerm-stripe-box {
    margin: 16px 0 20px;
    padding: 18px;
    border: 1px solid var(--eerm-line);
    border-radius: 8px;
    background: #fbfcfe;
}

.eerm-stripe-box[hidden],
.eerm-bank-details[hidden],
.eerm-message[hidden] {
    display: none !important;
}

.eerm-inline-check,
.eerm-consent {
    display: inline-flex !important;
    align-items: center;
    gap: 9px;
    width: auto;
    margin: 6px 0 18px !important;
    font-weight: 650;
}

.eerm-submit {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 8px;
    background: var(--eerm-accent);
    color: var(--eerm-accent-text, #fff);
    font-weight: 750;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.eerm-submit:hover {
    filter: brightness(.9);
}

.eerm-submit:active {
    transform: translateY(1px);
}

.eerm-submit:disabled {
    cursor: wait;
    opacity: .72;
}

.eerm-message {
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 650;
}

.eerm-message-info {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e3a8a;
}

.eerm-message-success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.eerm-message-error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.eerm-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.eerm-form [hidden] { display: none !important; }
.eerm-bank-details h4 { margin: 0 0 8px; font-size: 19px; line-height: 1.3; }
.eerm-form .eerm-bank-details { padding: 20px 0 0; border: 0; border-top: 1px solid #d7e2e4; border-radius: 0; background: transparent; }
.eerm-bank-details > p { margin: 0 0 14px; color: #52636e; }
.eerm-bank-account { padding: 13px 15px; border: 1px solid #cfd9df; border-radius: 6px; background: #fff; color: #172b34; line-height: 1.6; overflow-wrap: anywhere; user-select: text; }
.eerm-bank-account p { margin: 0; }
.eerm-bank-account p + p { margin-top: 6px; }
.eerm-copy-public { min-height: 40px; margin-top: 10px; padding: 8px 14px; border: 1px solid #9eb7ba; border-radius: 5px; background: #fff; color: #164f53; font-family: inherit; font-size: 14px; font-weight: 650; line-height: 1.3; cursor: pointer; }
.eerm-copy-public:hover { border-color: #176b5e; background: #f1f8f6; }
.eerm-bank-reference { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #dae4e7; }
.eerm-bank-reference span { width: 100%; color: #52636e; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.eerm-bank-reference strong { padding: 8px 10px; border-radius: 4px; background: #e9f3ee; font-size: 18px; letter-spacing: 0; user-select: all; }
.eerm-bank-reference .eerm-copy-public { margin: 0; }
.eerm-bank-details .eerm-bank-note { margin: 17px 0 0; color: #74441e; font-size: 13px; }
.eerm-payment-choice:has(input:checked) { border-color: var(--eerm-accent); background: #edf7f4; box-shadow: inset 0 0 0 1px var(--eerm-accent); }

/* Tickets, slots, order summary */
.eerm-price-date { margin-left: 10px; padding-left: 10px; border-left: 1px solid rgba(15, 118, 110, .25); font-weight: 600; }

.eerm-tickets,
.eerm-slots {
    display: grid;
    gap: 10px;
    margin: 4px 0 20px;
    padding: 0;
    border: 0;
}

.eerm-tickets legend,
.eerm-slots legend {
    margin-bottom: 8px;
    padding: 0;
    font-size: 20px;
    font-weight: 750;
}

.eerm-ticket-choice {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    margin: 0 !important;
    padding: 14px;
    border: 1px solid var(--eerm-line);
    border-radius: 8px;
    background: var(--eerm-soft);
    cursor: pointer;
}

.eerm-ticket-choice input { margin-top: 4px; }
.eerm-ticket-main { flex: 1; min-width: 0; }
.eerm-ticket-main strong, .eerm-ticket-main small, .eerm-ticket-side b, .eerm-ticket-side small { display: block; }
.eerm-ticket-main small { margin-top: 3px; color: var(--eerm-muted); font-weight: 500; }
.eerm-ticket-side { text-align: right; white-space: nowrap; }
.eerm-ticket-side b { font-size: 16px; }
.eerm-ticket-side small { margin-top: 3px; color: var(--eerm-muted); font-weight: 600; font-size: 12px; }
.eerm-ticket-choice:has(input:checked) { border-color: var(--eerm-accent); background: #edf7f4; box-shadow: inset 0 0 0 1px var(--eerm-accent); }
.eerm-ticket-choice.is-soldout { opacity: .55; cursor: not-allowed; }
.eerm-ticket-choice.is-soldout .eerm-ticket-side small { color: var(--eerm-danger); }

.eerm-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}

.eerm-slot-choice {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin: 0 !important;
    padding: 12px 13px;
    border: 1px solid var(--eerm-line);
    border-radius: 8px;
    background: var(--eerm-soft);
    cursor: pointer;
}

.eerm-slot-choice input { margin-top: 3px; }
.eerm-slot-choice strong, .eerm-slot-choice small { display: block; }
.eerm-slot-choice small { margin-top: 2px; color: var(--eerm-muted); font-weight: 500; font-size: 13px; }
.eerm-slot-choice .eerm-slot-state { font-weight: 650; }
.eerm-slot-choice:has(input:checked) { border-color: var(--eerm-accent); background: #edf7f4; box-shadow: inset 0 0 0 1px var(--eerm-accent); }
.eerm-slot-choice.is-soldout { opacity: .55; cursor: not-allowed; }
.eerm-slot-choice.is-soldout .eerm-slot-state { color: var(--eerm-danger); }

.eerm-order-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin: 4px 0 18px;
    padding: 14px;
    border: 1px solid var(--eerm-line);
    border-radius: 8px;
    background: var(--eerm-soft);
}


.eerm-order-total { text-align: right; }
.eerm-order-total span { display: block; color: var(--eerm-muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.eerm-order-total strong { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; }

/* Confirmation panel */
.eerm-confirmation { display: grid; gap: 18px; }

.eerm-confirmation-head {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 16px;
    border: 1px solid #bfe0cd;
    border-radius: 10px;
    background: #effaf2;
}

.eerm-confirmation-head.is-pending { border-color: #ecd9ae; background: #fdf7e7; }

.eerm-confirmation-icon {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a7f37;
    color: #fff;
}

.eerm-confirmation-head.is-pending .eerm-confirmation-icon { background: #b07f12; }
.eerm-confirmation-head h3 { margin: 2px 0 0 !important; font-size: 19px !important; }
.eerm-confirmation-head p { margin: 4px 0 0; color: var(--eerm-muted); font-size: 14px; }

.eerm-confirmation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px 20px;
    margin: 0;
}

.eerm-confirmation-grid dt { margin: 0; color: var(--eerm-muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.eerm-confirmation-grid dd { margin: 3px 0 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }

.eerm-confirmation-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px dashed #b9c4d2;
    border-radius: 10px;
    background: var(--eerm-soft);
}

.eerm-confirmation-code span { color: var(--eerm-muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.eerm-confirmation-code strong { font: 650 22px/1.2 Consolas, Monaco, monospace; letter-spacing: .06em; user-select: all; }

.eerm-confirmation-bank { padding: 16px; border: 1px solid var(--eerm-line); border-radius: 10px; }
.eerm-confirmation-bank h4 { margin: 0 0 10px; font-size: 16px; }
.eerm-confirmation-reference { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 0; font-weight: 650; }
.eerm-confirmation-reference strong { padding: 6px 10px; border-radius: 6px; background: #e9f3ee; font-size: 17px; user-select: all; }

.eerm-confirmation-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.eerm-ticket-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 22px;
    border-radius: 8px;
    background: var(--eerm-accent);
    color: var(--eerm-accent-text, #fff) !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
}

.eerm-ticket-link:hover { background: var(--eerm-accent-dark); }

@media (max-width: 560px) {
    .eerm-ticket-choice { flex-wrap: wrap; }
    .eerm-ticket-side { width: 100%; display: flex; justify-content: space-between; text-align: left; }
    .eerm-order-row { align-items: stretch; flex-direction: column; }
    .eerm-order-total { display: flex; align-items: baseline; justify-content: space-between; text-align: left; }
}

/* Order summary breakdown, gratuity opt-in, slot price adjustments */
.eerm-order-row { flex-direction: column; align-items: stretch; gap: 12px; }
.eerm-order-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; }
.eerm-tip-opt { display: inline-flex !important; align-items: center; gap: 9px; margin: 0 !important; font-weight: 650; cursor: pointer; }
.eerm-order-summary { display: grid; gap: 7px; padding-top: 12px; border-top: 1px solid var(--eerm-line); }
.eerm-order-line { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; color: var(--eerm-muted); font-size: 14px; }
.eerm-order-line b { color: var(--eerm-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.eerm-order-line-total { margin-top: 3px; padding-top: 9px; border-top: 1px solid var(--eerm-line); color: var(--eerm-ink); font-weight: 700; }
.eerm-order-line-total strong { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; }
.eerm-slot-adjust { color: var(--eerm-accent-dark) !important; font-weight: 650 !important; }
.eerm-slot-choice.is-soldout .eerm-slot-adjust { color: var(--eerm-muted) !important; }

.eerm-confirmation-totals { display: grid; gap: 7px; padding: 14px 16px; border: 1px solid var(--eerm-line); border-radius: 10px; }
.eerm-confirmation-totals .eerm-order-line-total strong { font-size: 19px; }

/* Theme-proof form controls (1.12.1)
   Themes style bare input/select elements aggressively (fixed heights,
   padding, line-height, native radio sizing). These rules draw the
   controls ourselves so the form looks identical on every theme. */

.eerm-form input[type="radio"],
.eerm-form input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    display: inline-grid;
    place-content: center;
    flex: 0 0 20px;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 2px solid #9aa8b4 !important;
    background: #fff !important;
    box-shadow: none !important;
    vertical-align: middle;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.eerm-form input[type="radio"] { border-radius: 50% !important; }
.eerm-form input[type="checkbox"] { border-radius: 5px !important; }

.eerm-form input[type="radio"]::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--eerm-accent);
    transform: scale(0);
    transition: transform .15s ease;
}

.eerm-form input[type="checkbox"]::before {
    content: "";
    width: 11px;
    height: 6px;
    margin-top: -3px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) scale(0);
    transition: transform .15s ease;
}

.eerm-form input[type="radio"]:checked { border-color: var(--eerm-accent) !important; }
.eerm-form input[type="radio"]:checked::before { transform: scale(1); }
.eerm-form input[type="checkbox"]:checked { border-color: var(--eerm-accent) !important; background: var(--eerm-accent) !important; }
.eerm-form input[type="checkbox"]:checked::before { transform: rotate(-45deg) scale(1); }

.eerm-form input[type="radio"]:hover:not(:disabled),
.eerm-form input[type="checkbox"]:hover:not(:disabled) { border-color: var(--eerm-accent) !important; }

.eerm-form input[type="radio"]:focus,
.eerm-form input[type="checkbox"]:focus { outline: none; }

.eerm-form input[type="radio"]:focus-visible,
.eerm-form input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--eerm-accent) !important;
    outline-offset: 2px;
}

.eerm-form input[type="radio"]:disabled,
.eerm-form input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }

/* Choice cards: control aligned with the title line, not the card top */
.eerm-payment-choice input,
.eerm-ticket-choice input,
.eerm-slot-choice input { margin-top: 1px !important; }

/* Quantity: label stacked above a fixed-size select with our own arrow */
.eerm-order-row .eerm-qty {
    display: grid !important;
    gap: 6px;
    flex: 0 0 auto;
    margin: 0 !important;
    font-size: 14px;
    font-weight: 650;
}

/* Every dropdown in the form: our own box and arrow, so theme select
   styles (tall heights, top-heavy padding) cannot push the text down. */
.eerm-form select {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    width: 100%;
    height: 48px !important;
    min-height: 0 !important;
    margin: 7px 0 0 !important;
    padding: 0 42px 0 14px !important;
    border: 1px solid #b9c4d2;
    border-radius: 8px;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 12px 8px !important;
    color: var(--eerm-ink);
    font-size: 15px !important;
    line-height: 46px !important;
    text-align: left;
    text-overflow: ellipsis;
    cursor: pointer;
}

.eerm-form select::-ms-expand { display: none; }
.eerm-form select:invalid { color: #64748b; }
.eerm-form select option { color: var(--eerm-ink); }

/* Quantity keeps its compact width and stacks under its label */
.eerm-form .eerm-qty select {
    width: 120px !important;
    min-width: 120px;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 38px 0 14px !important;
    font-size: 16px !important;
    font-weight: 600;
    line-height: 44px !important;
    font-variant-numeric: tabular-nums;
}

/* Registration status lookup (1.13.0) */
.eerm-status-lookup .eerm-description { margin-bottom: 18px; }
.eerm-status-lookup input[name="lookup_code"] { font-family: Consolas, Monaco, monospace; letter-spacing: .04em; text-transform: uppercase; }
.eerm-status-lookup input[name="lookup_code"]::placeholder { text-transform: none; letter-spacing: 0; font-family: inherit; }
.eerm-status-result:empty { display: none; }
.eerm-status-result { margin-top: 22px; }

.eerm-status-card {
    display: grid;
    gap: 18px;
    padding: 20px;
    border: 1px solid var(--eerm-line);
    border-left: 4px solid #94a3b8;
    border-radius: 10px;
    background: #fff;
}

.eerm-status-card.is-paid { border-left-color: #1a7f37; }
.eerm-status-card.is-pending { border-left-color: #b07f12; }
.eerm-status-card.is-failed { border-left-color: #b42318; }

.eerm-status-head h4 { margin: 8px 0 0; font-size: 19px; font-weight: 750; line-height: 1.3; }
.eerm-status-head p { max-width: 62ch; margin: 5px 0 0; color: var(--eerm-muted); font-size: 14px; line-height: 1.55; }

.eerm-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    border-radius: 999px;
    background: #eef2f5;
    color: #4a6072;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .02em;
}

.eerm-status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.is-paid .eerm-status-pill { background: #e3f5ea; color: #10663c; }
.is-pending .eerm-status-pill { background: #fdf2dd; color: #7c5410; }
.is-failed .eerm-status-pill { background: #fdeceb; color: #9a2c20; }

.eerm-status-mono { font-family: Consolas, Monaco, monospace; letter-spacing: .04em; }

.eerm-status-link {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 10px 4px;
    color: var(--eerm-accent-dark) !important;
    font-size: 14px;
    font-weight: 650;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

/* Text inputs match the dropdown height regardless of theme input rules */
.eerm-form input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not(.eerm-hp) {
    box-sizing: border-box;
    height: 48px !important;
    min-height: 0 !important;
    padding: 0 14px !important;
    line-height: normal !important;
    font-size: 15px !important;
}

.eerm-form textarea { padding: 12px 14px !important; line-height: 1.5 !important; font-size: 15px !important; }

/* Required markers and inline validation (1.16.0) */
.eerm-req { margin-left: 2px; color: #c62828; font-weight: 700; text-decoration: none; }
.eerm-form legend .eerm-req { font-size: .8em; vertical-align: top; }

.eerm-form .eerm-has-error input:not([type="radio"]):not([type="checkbox"]),
.eerm-form .eerm-has-error select,
.eerm-form .eerm-has-error textarea {
    border-color: #d63638 !important;
    background-color: #fff8f8 !important;
    box-shadow: 0 0 0 3px rgba(214, 54, 56, .12) !important;
}

.eerm-form .eerm-has-error input[type="checkbox"] { border-color: #d63638 !important; }

.eerm-form fieldset.eerm-has-error .eerm-ticket-choice,
.eerm-form fieldset.eerm-has-error .eerm-slot-choice,
.eerm-form fieldset.eerm-has-error .eerm-payment-choice { border-color: #e8a29e; background: #fff8f8; }

.eerm-form fieldset.eerm-has-error input[type="radio"] { border-color: #d63638 !important; }

.eerm-field-error {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 7px;
    color: #b42318;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.eerm-field-error::before {
    content: "!";
    display: inline-grid;
    place-items: center;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d63638;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.eerm-consent.eerm-has-error { flex-wrap: wrap; }
.eerm-consent .eerm-field-error { flex-basis: 100%; margin-top: 2px; }
.eerm-inline-check + .eerm-field-error,
.eerm-custom-field > .eerm-field-error { margin-top: 7px; }

/* Confirmation popup (1.17.0) */
.eerm-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 30, .55);
    animation: eerm-popup-fade .18s ease-out;
}

.eerm-popup {
    box-sizing: border-box;
    width: min(460px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 30px 28px 24px;
    border-radius: 14px;
    background: #fff;
    color: #17202a;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .45);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: center;
    animation: eerm-popup-rise .22s cubic-bezier(.2, .8, .3, 1);
}

.eerm-popup * { box-sizing: border-box; }

.eerm-popup-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #fdf2dd;
    color: #8a5a00;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.eerm-popup.is-success .eerm-popup-icon { background: #e3f5ea; color: #1a7f37; font-size: 28px; }

.eerm-popup .eerm-popup-title {
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: #17202a !important;
    font-family: inherit !important;
    font-size: 22px !important;
    font-weight: 750 !important;
    line-height: 1.25 !important;
    letter-spacing: -.01em;
    text-transform: none !important;
}

.eerm-popup .eerm-popup-text {
    margin: 0 0 10px !important;
    color: #475569 !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
}

.eerm-popup-ref {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 10px;
    margin: 16px 0 4px;
    padding: 12px 14px;
    border: 1px dashed #c9d3d5;
    border-radius: 10px;
    background: #f7faf9;
}

.eerm-popup-ref span { color: #64748b; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.eerm-popup-ref strong { font: 700 18px/1.2 Consolas, Monaco, monospace; letter-spacing: .06em; color: #17202a; user-select: all; }

.eerm-popup .eerm-popup-copy {
    min-height: 30px !important;
    margin: 0 !important;
    padding: 4px 12px !important;
    border: 1px solid #c9d3d5 !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #17202a !important;
    font: 600 13px/1 inherit !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    cursor: pointer;
}

.eerm-popup-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.eerm-popup .eerm-popup-primary,
.eerm-popup .eerm-popup-close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 0 22px !important;
    border-radius: 8px !important;
    font-family: var(--eerm-button-font, inherit) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    text-transform: none !important;
    cursor: pointer;
}

.eerm-popup .eerm-popup-primary {
    flex: 1 1 200px;
    border: 1px solid var(--eerm-accent, #0f766e) !important;
    background: var(--eerm-accent, #0f766e) !important;
    color: var(--eerm-accent-text, #fff) !important;
}

.eerm-popup .eerm-popup-primary:hover { filter: brightness(.92); }

.eerm-popup .eerm-popup-close {
    flex: 0 1 auto;
    border: 1px solid #c9d3d5 !important;
    background: #fff !important;
    color: #17202a !important;
}

.eerm-popup .eerm-popup-close:hover { background: #f4f6f8 !important; }

.eerm-popup :focus-visible { outline: 2px solid var(--eerm-accent, #0f766e) !important; outline-offset: 2px; }

@keyframes eerm-popup-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes eerm-popup-rise { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .eerm-popup-backdrop, .eerm-popup { animation: none; }
}

@media (max-width: 480px) {
    .eerm-popup { padding: 26px 20px 20px; }
    .eerm-popup .eerm-popup-title { font-size: 20px !important; }
    .eerm-popup .eerm-popup-primary, .eerm-popup .eerm-popup-close { flex-basis: 100%; }
}

/* Bank-transfer validity notice: confirmation panel and status lookup */
.eerm-validity {
    display: grid;
    gap: 3px;
    padding: 13px 15px;
    border: 1px solid #f0d49b;
    border-left: 4px solid #b07f12;
    border-radius: 8px;
    background: #fff8e8;
    color: #6b4a0f;
    font-size: 14px;
    line-height: 1.5;
}

.eerm-validity strong { color: #5c3d07; font-size: 15px; font-weight: 750; }

/* Bank transfer: reference issued when the method is picked (1.18.0) */
.eerm-bank-details .eerm-copy-public { margin-top: 10px; }
.eerm-bank-details .eerm-bank-reference strong {
    padding: 9px 14px;
    border: 1px dashed var(--eerm-accent);
    border-radius: 8px;
    background: #fff;
    color: var(--eerm-ink);
    font: 700 20px/1.2 Consolas, Monaco, monospace;
    letter-spacing: .08em;
}
