.cms-form { display: grid; gap: 16px; max-width: 680px; color: inherit; font: inherit; }
.cms-form * { box-sizing: border-box; }
.cms-form :is(h2,h3,p) { margin: 0; text-wrap: pretty; }
.cms-form h2 { font-size: 24px; line-height: 32px; }
.cms-form h3 { font-size: 18px; line-height: 28px; }
.cms-form-field { display: grid; gap: 8px; min-width: 0; border: 0; padding: 0; margin: 0; }
.cms-form-field > :is(label,legend) { font-size: 14px; line-height: 20px; font-weight: 600; }
.cms-form-field :is(input:not([type=checkbox],[type=radio]),textarea,select) { width: 100%; border: 1px solid #94a3b8; border-radius: 6px; background: #fff; padding: 12px; color: #0f172a; font: inherit; }
.cms-form-field textarea { resize: vertical; }
.cms-form-choice { display: flex; align-items: baseline; gap: 8px; font-size: 14px; line-height: 20px; }
.cms-form-choice input { flex: none; accent-color: #1d4ed8; }
.cms-form small { font-size: 12px; line-height: 16px; }
.cms-form .cms-form-error, .cms-form [data-state=error] { color: #b91c1c; font-size: 14px; line-height: 20px; }
.cms-form [data-state=success] { color: #047857; }
.cms-form [aria-invalid=true] { border-color: #b91c1c !important; }
.cms-form button { justify-self: start; border: 0; border-radius: 6px; padding: 8px 12px; background: #1d4ed8; color: white; cursor: pointer; font: inherit; font-weight: 600; }
.cms-form button:hover { background: #1e40af; }
.cms-form button:active { transform: translateY(1px); }
.cms-form button:disabled { opacity: .6; cursor: wait; }
.cms-form :is(input,textarea,select,button,a):focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.cms-form-trap, .cms-form-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cms-form-error:empty, .cms-form small:empty, .cms-form [data-form-status]:empty { display: none; }
.cms-form-popup { box-sizing: border-box; width: min(720px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; color: #0f172a; box-shadow: 0 24px 64px #0f172a33; font: inherit; overflow: auto; }
.cms-form-popup::backdrop { background: #0f172a80; }
.cms-form-popup-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 24px; background: white; }
.cms-form-popup-header h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; text-wrap: balance; }
.cms-form-popup-close, .cms-form-popup-retry { flex: none; min-height: 40px; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; background: white; color: #334155; font: inherit; font-size: 14px; line-height: 20px; font-weight: 600; cursor: pointer; }
.cms-form-popup-close:hover, .cms-form-popup-retry:hover { background: #f1f5f9; }
.cms-form-popup-close:active, .cms-form-popup-retry:active { transform: translateY(1px); }
.cms-form-popup-close:focus-visible, .cms-form-popup-retry:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.cms-form-popup-body { padding: 0 24px 24px; }
.cms-form-popup-body .cms-form { width: 100%; max-width: none; }
.cms-form-popup-body .cms-form > h2 { display: none; }
.cms-form-popup-error { margin: 0 0 16px; color: #b91c1c; font-size: 14px; line-height: 20px; }
.cms-form-popup-loading { display: grid; gap: 16px; margin: 0; color: #64748b; font-size: 14px; line-height: 20px; }
.cms-form-popup-loading::after { display: block; height: 176px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; content: ''; }
@media (max-width: 639px) { .cms-form-popup-header { padding: 16px; } .cms-form-popup-body { padding: 0 16px 16px; } }
