.demo-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    visibility: hidden;
    place-items: center;
    padding: 22px;
    opacity: 0;
    transition: opacity .25s ease, visibility .25s ease;
}

.demo-modal.is-open { visibility: visible; opacity: 1; }
.demo-modal__backdrop { position: absolute; inset: 0; background: rgba(24,35,42, .72); backdrop-filter: blur(12px); }
.demo-modal__dialog {
    position: relative;
    display: grid;
    width: min(940px, 100%);
    max-height: min(760px, calc(100vh - 44px));
    grid-template-columns: .78fr 1.22fr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 30px;
    opacity: 0;
    background: #fff;
    box-shadow: 0 42px 120px rgba(24,35,42, .38);
    transform: translateY(24px) scale(.98);
    transition: opacity .28s ease, transform .28s cubic-bezier(.2, .8, .2, 1);
}
.demo-modal.is-open .demo-modal__dialog { opacity: 1; transform: none; }
.demo-modal__close { position: absolute; top: 18px; left: 18px; z-index: 3; display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #e1e6e7; border-radius: 13px; color: #626e77; background: rgba(255,255,255,.9); cursor: pointer; transition: color .2s ease, transform .2s ease, background .2s ease; }
.demo-modal__close:hover { color: var(--brand-primary); background: var(--brand-soft); }
.demo-modal__close svg { width: 20px; height: 20px; }
.demo-modal__visual { position: relative; min-width: 0; min-height: 0; overflow: hidden; padding: 42px 36px; color: var(--ui-ink); background: var(--ui-surface-muted); }
.demo-modal__brand { display: block; width: 64px; height: 64px; margin-bottom: 28px; }
.demo-modal__eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; color: var(--ui-muted); font-size: 11px; font-weight: 700; }
.demo-modal__eyebrow::before { content: ""; width: 23px; height: 2px; background: currentColor; }
.demo-modal__visual h3 { position: relative; z-index: 1; margin-bottom: 18px; color: var(--ui-ink); font-size: 1.75rem; line-height: 1.7; }
.demo-modal__visual p { position: relative; z-index: 1; color: var(--ui-muted); font-size: 12px; }
.demo-modal__steps { display: grid; gap: 16px; margin-top: 30px; padding-top: 26px; border-top: 1px solid #d9e0dd; }
.demo-modal__steps span { display: flex; align-items: center; gap: 11px; color: var(--ui-muted); font-size: 11px; }
.demo-modal__steps i { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid #d5ddd9; border-radius: 10px; color: var(--ui-teal); background: #fff; font-style: normal; }
.demo-modal__content { min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 58px 58px 44px; }
.demo-modal__content h2 { margin-bottom: 8px; color: var(--ui-ink); font-size: 1.7rem; }
.demo-modal__content > div > p { margin-bottom: 28px; font-size: 12px; }
.demo-honeypot { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; }
.demo-form__grid { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 13px; }
.demo-field { min-width: 0; margin-bottom: 17px; }
.demo-field label { display: block; margin-bottom: 7px; color: var(--ui-ink); font-size: 11px; font-weight: 700; }
.demo-field label span { color: #d94a62; }
.demo-field input { width: 100%; max-width: 100%; min-width: 0; height: 52px; padding: 10px 15px; border: 1px solid var(--ui-line); border-radius: 13px; outline: none; color: var(--ui-ink); background: #fff; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.demo-field input::placeholder { color: var(--ui-muted); }
.demo-field input:focus { border-color: var(--brand-primary); background: #fff; box-shadow: 0 0 0 4px var(--brand-focus); }
.demo-field.has-error input, .demo-field.has-error .demo-mobile-input { border-color: #e05c70; box-shadow: 0 0 0 4px rgba(224,92,112,.08); }
.demo-field small { display: block; min-height: 18px; margin-top: 4px; color: #d44059; font-size: 9px; }
.demo-mobile-input { display: flex; width: 100%; min-width: 0; height: 52px; align-items: center; overflow: hidden; border: 1px solid var(--ui-line); border-radius: 13px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease; }
.demo-mobile-input:focus-within { border-color: var(--brand-primary); box-shadow: 0 0 0 4px var(--brand-focus); }
.demo-mobile-input b { align-self: stretch; display: flex; align-items: center; padding: 0 14px; border-left: 1px solid var(--ui-line); color: var(--ui-muted); background: var(--ui-surface); font-size: 11px; font-weight: 500; }
.demo-mobile-input input { min-width: 0; height: 50px; flex: 1 1 auto; border: 0; border-radius: 0; box-shadow: none !important; background: transparent; text-align: left; }
.demo-form__privacy { display: flex; align-items: flex-start; gap: 9px; margin: 2px 0 17px; padding: 11px 12px; border-radius: 11px; color: var(--ui-muted); background: var(--ui-surface); font-size: 9px; line-height: 1.8; }
.demo-form__privacy svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; color: var(--ui-teal); }
.demo-form__general-error { display: none; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #f1c7cf; border-radius: 10px; color: #b93349; background: #fff3f5; font-size: 10px; }
.demo-form__general-error.is-visible { display: block; }
.demo-submit { width: 100%; border: 0; }
.demo-submit__loader { display: none; width: 19px; height: 19px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: demo-spin .7s linear infinite; }
.demo-submit.is-loading { pointer-events: none; opacity: .84; }
.demo-submit.is-loading .demo-submit__loader { display: block; }
.demo-success { display: flex; min-height: 470px; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.demo-success[hidden] { display: none; }
.demo-success__icon { display: grid; width: 86px; height: 86px; margin-bottom: 28px; place-items: center; border-radius: 27px; color: var(--ui-teal); background: var(--ui-teal-soft); box-shadow: none; }
.demo-success__icon svg { width: 42px; height: 42px; }
.demo-success p { max-width: 390px; margin-bottom: 28px; }
.demo-toast { position: fixed; right: 24px; bottom: 24px; z-index: 1100; display: flex; visibility: hidden; max-width: min(430px, calc(100vw - 32px)); align-items: center; gap: 12px; padding: 15px 17px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; opacity: 0; color: #fff; background: var(--ui-dark); box-shadow: 0 22px 60px rgba(24,35,42,.28); transform: translateY(20px); transition: opacity .25s ease, transform .25s ease, visibility .25s ease; }
.demo-toast.is-visible { visibility: visible; opacity: 1; transform: none; }
.demo-toast__icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--ui-teal); background: var(--ui-teal-soft); font-weight: 700; }
.demo-toast [data-demo-toast-message] { font-size: 11px; line-height: 1.8; }
body.demo-modal-is-open { overflow: hidden; }
@keyframes demo-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
    .demo-modal { padding: 10px; }
    .demo-modal__dialog { max-height: calc(100vh - 20px); grid-template-columns: 1fr; border-radius: 23px; }
    .demo-modal__visual { display: none; }
    .demo-modal__content { min-height: auto; padding: 56px 24px 28px; }
    .demo-modal__content h2 { font-size: 1.45rem; }
    .demo-form__grid { grid-template-columns: 1fr; gap: 0; }
    .demo-modal__close { top: 13px; left: 13px; }
    .demo-success { min-height: 440px; }
    .demo-toast { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .demo-modal, .demo-modal__dialog, .demo-toast { transition: none; }
}
