/* Better AI product UI: shared type, tokens and components for the Contact page. */

.vm-ui {
  --head: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --brand: #E2B857;
  --brand-hover: #F0CD78;
  --on-brand: #15120C;
  --sidebar: #0F0F10;
  --card: #161513;
  --soft: #221E16;
  --sm-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --md-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  --r: 14px;
  font-size: 1rem;
}
:root[data-theme="light"] .vm-ui {
  --bg: #FAF7F0;
  --bg-2: #FFFFFF;
  --violet: #EFE5CF;
  --purple: #A57B1F;
  --lavender: #8A6416;
  --ivory: #17140E;
  --muted: #5C5446;
  --glass: #F4EEE2;
  --glass-line: #E6DDCB;
  --fg-rgb: 23, 20, 14;
  --bg-rgb: 255, 255, 255;
  --accent-rgb: 165, 123, 31;
  --shadow: 0 18px 50px rgba(90, 66, 18, .14);
  --brand: #8A6416;
  --brand-hover: #6E4F10;
  --on-brand: #FFFFFF;
  --sidebar: #F4EEE2;
  --card: #FFFFFF;
  --soft: #EFE5CF;
  --sm-shadow: 0 1px 2px rgba(90, 66, 18, .06);
  --md-shadow: 0 8px 24px rgba(90, 66, 18, .08);
}

.ic { flex: none; width: 18px; height: 18px; }
.ui-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 1px solid var(--glass-line); border-radius: 12px; background: var(--card); color: var(--ivory); font: 600 .9rem/1.2 var(--body); text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.ui-btn:hover:not(:disabled) { border-color: var(--lavender); }
.ui-btn:active:not(:disabled) { transform: translateY(1px); }
.ui-btn:disabled { opacity: .55; cursor: default; }
.ui-btn.primary { border-color: transparent; background: var(--brand); color: var(--on-brand); }
.ui-btn.primary:hover:not(:disabled) { background: var(--brand-hover); }
.ui-btn.danger { color: var(--error); }
.ui-btn.danger:hover:not(:disabled) { border-color: var(--error); }
.soon { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--glass); color: var(--muted); font-size: .7rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--soft); color: var(--lavender); font-size: .82rem; font-weight: 700; text-transform: uppercase; }

/* Menus */
.menu { position: absolute; z-index: 70; top: calc(100% + 6px); inset-inline-end: 0; width: 256px; max-width: calc(100vw - 24px); max-height: calc(100vh - 80px); padding: 6px; border: 1px solid var(--glass-line); border-radius: 14px; background: var(--bg-2); box-shadow: var(--shadow); overflow-y: auto; text-align: start; }
.menu.is-up { top: auto; bottom: calc(100% + 6px); }
.motion .menu:not([hidden]) { animation: menu-in .14s ease-out; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--ivory); font: 500 .875rem/1.2 var(--body); text-align: start; text-decoration: none; cursor: pointer; }
.menu a:hover, .menu button:hover:not(:disabled), .menu a:focus-visible, .menu button:focus-visible { background: var(--glass); outline: none; }
.menu button:disabled { color: var(--muted); cursor: default; }
.menu .ic { color: var(--muted); }
.menu .is-danger, .menu .is-danger .ic { color: var(--error); }
.menu hr { height: 1px; margin: 6px; border: 0; background: var(--glass-line); }
.menu .soon { margin-inline-start: auto; }
.acct { position: relative; flex: none; }
.acct-btn { display: block; padding: 4px; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.acct-btn:hover .avatar { background: var(--violet); }
.acct-id { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.acct-id div { min-width: 0; }
.acct-id strong { display: block; overflow: hidden; color: var(--ivory); font-size: .9rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.acct-id span[data-account-email] { display: block; overflow: hidden; color: var(--muted); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.ui-dialog { width: min(420px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--glass-line); border-radius: 16px; background: var(--bg-2); color: var(--ivory); box-shadow: var(--shadow); }
.ui-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.ui-dialog p { margin-bottom: 12px; font-weight: 500; }
.ui-dialog input { width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--glass-line); border-radius: 10px; background: var(--card); color: var(--ivory); font: 400 16px var(--body); }
.ui-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.switch { position: relative; flex: none; width: 40px; height: 24px; border: 0; border-radius: 999px; background: var(--glass-line); cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.switch[aria-checked="true"] { background: var(--brand); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
[dir="rtl"] .switch[aria-checked="true"]::after { transform: translateX(-16px); }
.switch:disabled { opacity: .55; cursor: default; }
input[type="range"] { width: 100%; accent-color: var(--brand); }
input[type="range"]:disabled { opacity: .45; }

@media (prefers-reduced-motion: reduce) {
  .ui-btn, .switch::after { transition: none; }
}
