/* modal.css - shared native <dialog>-based modal/confirm component for redesigned pages.
   Fully self-contained (its own --vm-* tokens, not redesign-core.css's or a specific page's),
   so it can be dropped into ANY redesigned page - marketing family or app-shell family (like
   /search/advanced) - without depending on that page's variable names. Only shared expectation:
   the page toggles [data-theme] on <html>, same as everywhere else in the redesign. */

.vip-modal {
    --vm-bg: #ffffff;
    --vm-ink: #16161a;
    --vm-muted: #6b6e76;
    --vm-line: #e9eaee;
    --vm-orange: #ff6600;
    --vm-orange-2: #ff8534;
    border: none;
    border-radius: 20px;
    padding: 0;
    width: min(400px, calc(100vw - 40px));
    background: var(--vm-bg);
    color: var(--vm-ink);
    box-shadow: 0 30px 80px rgba(20,22,30,.24);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
:root[data-theme="dark"] .vip-modal {
    --vm-bg: #14161c;
    --vm-ink: #f4f5f7;
    --vm-muted: #9aa0aa;
    --vm-line: #363b46;
    box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.vip-modal::backdrop { background: rgba(10,10,14,.55); }
.vip-modal[open] { animation: vmIn .22s cubic-bezier(.22,.61,.36,1); }
@keyframes vmIn { from { opacity:0; transform: scale(.96) translateY(6px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) { .vip-modal[open] { animation: none; } }

.vip-modal .vm-body { padding: 30px 28px 26px; position: relative; margin: 0; }
.vip-modal .vm-close {
    position: absolute; top: 14px; right: 14px;
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: transparent; color: var(--vm-muted);
    font-size: 20px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-family: inherit; transition: background .2s, color .2s;
}
.vip-modal .vm-close:hover { background: var(--vm-line); color: var(--vm-ink); }
.vip-modal .vm-icon { width:48px; height:48px; border-radius:14px; background: rgba(255,102,0,.14); color: var(--vm-orange); display:flex; align-items:center; justify-content:center; margin-bottom:16px; }
.vip-modal .vm-icon .material-icons { font-size:24px; }
.vip-modal .vm-title { margin:0 0 8px; font-size:1.2rem; font-weight:800; letter-spacing:-.01em; color: var(--vm-ink); line-height:1.25; }
.vip-modal .vm-text { margin:0 0 22px; font-size:.95rem; line-height:1.55; color: var(--vm-muted); }
.vip-modal .vm-custom-body:empty { display: none; }
.vip-modal .vm-custom-body { margin: 0 0 22px; display: flex; flex-direction: column; gap: 12px; }
.vip-modal .vm-custom-body label { font-size: .82rem; font-weight: 700; color: var(--vm-ink); display: flex; flex-direction: column; gap: 6px; }
.vip-modal .vm-custom-body input[type="text"],
.vip-modal .vm-custom-body select {
    font-family: inherit; font-size: .92rem; font-weight: 600; color: var(--vm-ink);
    background: var(--vm-bg); border: 1px solid var(--vm-line); border-radius: 10px;
    padding: 10px 12px; outline: none; transition: border-color .18s;
}
.vip-modal .vm-custom-body input[type="text"]:focus,
.vip-modal .vm-custom-body select:focus { border-color: var(--vm-orange); }
.vip-modal .vm-tabs { display: flex; gap: 6px; margin-bottom: 4px; }
.vip-modal .vm-tab {
    flex: 1; text-align: center; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--vm-line);
    background: transparent; color: var(--vm-muted); font-family: inherit; font-weight: 700; font-size: .82rem;
    cursor: pointer; transition: .16s;
}
.vip-modal .vm-tab.on { background: var(--vm-orange); border-color: var(--vm-orange); color: #fff; }
.vip-modal .vm-tab-panel[hidden] { display: none; }
.vip-modal .vm-actions { display:flex; gap:10px; justify-content:flex-end; }
.vip-modal .vm-btn {
    font-family: inherit; font-weight:700; font-size:.92rem; border-radius:11px;
    padding: 11px 20px; cursor:pointer; border:none; transition: background .2s, transform .15s, border-color .2s, color .2s;
}
.vip-modal .vm-btn:active { transform: translateY(1px); }
.vip-modal .vm-btn-primary { background: var(--vm-orange); color:#fff; }
.vip-modal .vm-btn-primary:hover { background: var(--vm-orange-2); }
.vip-modal .vm-btn-ghost { background: transparent; border: 1px solid var(--vm-line); color: var(--vm-ink); }
.vip-modal .vm-btn-ghost:hover { border-color: var(--vm-orange); color: var(--vm-orange); }
@media (max-width: 480px) {
    .vip-modal .vm-actions { flex-direction: column-reverse; }
    .vip-modal .vm-actions .vm-btn { width:100%; }
}
