.eerm-form,
.eerm-card {
    box-sizing: border-box;
    max-width: 760px;
    padding: 24px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;
}

.eerm-admin .eerm-card {
    max-width: none;
}

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

.eerm-form h3 {
    margin: 0 0 10px;
    font-size: 1.5rem;
}

.eerm-price {
    margin: 14px 0 20px;
    font-weight: 700;
}

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

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

.eerm-form input:not([type="radio"]):not([type="checkbox"]),
.eerm-form select,
.eerm-form textarea {
    width: 100%;
    margin-top: 6px;
    padding: 11px 12px;
    border: 1px solid #b8c0cc;
    border-radius: 6px;
    background: #fff;
}

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

.eerm-inline-check {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    font-weight: 500;
}

.eerm-payment-methods {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #d8dde6;
    border-radius: 8px;
}

.eerm-payment-methods legend {
    padding: 0 8px;
    font-weight: 700;
}

.eerm-payment-methods label {
    margin: 8px 0;
}

.eerm-bank-details,
.eerm-stripe-box {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid #d8dde6;
    border-radius: 8px;
    background: #f8fafc;
}

.eerm-submit,
.eerm-card .button-primary {
    min-height: 42px;
}

.eerm-submit {
    width: 100%;
    border: 0;
    border-radius: 6px;
    background: #14532d;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

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

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

.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-admin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 18px 0 16px;
}

.eerm-admin-hero h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
}

.eerm-admin-hero p,
.eerm-card-head p {
    margin: 6px 0 0;
    color: #646970;
}

.eerm-admin-grid {
    display: grid;
    grid-template-columns: minmax(340px, 520px) minmax(480px, 1fr);
    gap: 24px;
    align-items: start;
}

.eerm-admin-grid-wide {
    grid-template-columns: minmax(520px, 680px) minmax(420px, 1fr);
}

.eerm-card-head,
.eerm-section-title,
.eerm-sticky-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.eerm-card-head {
    margin-bottom: 20px;
}

.eerm-card-head h2,
.eerm-editor-section h3 {
    margin: 0;
}

.eerm-card-head code {
    padding: 8px 10px;
    border-radius: 6px;
    background: #f1f5f9;
    white-space: nowrap;
}

.eerm-editor-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.eerm-admin-fields,
.eerm-field-builder-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.eerm-admin-fields label,
.eerm-field-builder-grid label,
.eerm-event-editor label {
    display: block;
    font-weight: 600;
}

.eerm-admin-fields input,
.eerm-admin-fields select,
.eerm-admin-fields textarea,
.eerm-event-editor > label textarea,
.eerm-field-builder-grid input,
.eerm-field-builder-grid select,
.eerm-field-builder-grid textarea {
    width: 100%;
    margin-top: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.eerm-field-full {
    grid-column: 1 / -1;
}

.eerm-switch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 12px 0 14px;
}

.eerm-switch-row label,
.eerm-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.eerm-field-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.eerm-field-builder-row {
    padding: 14px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #f8fafc;
}

.eerm-remove-field {
    margin-top: 8px;
}

.eerm-sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 22px -24px -24px;
    padding: 14px 24px;
    border-top: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, .96);
}

.eerm-save-state {
    color: #166534;
    font-weight: 700;
}

.eerm-events-list {
    display: grid;
    gap: 12px;
}

.eerm-event-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #f8fafc;
}

.eerm-event-item strong,
.eerm-event-item span,
.eerm-event-item code {
    display: block;
}

.eerm-event-item span {
    margin-top: 4px;
    color: #646970;
}

.eerm-event-item code {
    margin-top: 8px;
    white-space: normal;
}

.eerm-empty {
    padding: 24px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #646970;
    text-align: center;
}

.eerm-status {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}

.eerm-status-paid {
    background: #dcfce7;
    color: #166534;
}

.eerm-status-pending,
.eerm-status-pending_bank {
    background: #fef3c7;
    color: #92400e;
}

.eerm-status-failed {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 782px) {
    .eerm-row,
    .eerm-admin-grid,
    .eerm-admin-grid-wide,
    .eerm-admin-fields,
    .eerm-field-builder-grid {
        grid-template-columns: 1fr;
    }

    .eerm-admin-hero,
    .eerm-card-head,
    .eerm-event-item,
    .eerm-sticky-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .eerm-card-head code {
        white-space: normal;
    }
}
