/* WEEM dialogs: opaque surfaces, one visual hierarchy, top-aligned on mobile. */
html body .weem-dialog {
  --dialog-bg:#164A52;--dialog-field:#0D3036;--dialog-text:#F6F0E6;
  --dialog-muted:#CDD9D7;--dialog-border:#86A5A7;--dialog-placeholder:#ADC2C1;
  box-sizing:border-box!important;background:var(--dialog-bg)!important;color:var(--dialog-text)!important;
  border:1px solid var(--dialog-border)!important;border-radius:18px!important;
  width:100%!important;max-width:560px;max-height:calc(100dvh - 48px)!important;
  padding:24px!important;overflow:auto!important;overscroll-behavior:contain;
  box-shadow:0 20px 64px #05181c66!important;position:relative;
}
html[data-theme="light"] body .weem-dialog {
  --dialog-bg:#FFFDF9;--dialog-field:#F6F0E6;--dialog-text:#123E45;
  --dialog-muted:#426267;--dialog-border:#708E91;--dialog-placeholder:#526D70;
}
html body .weem-dialog-overlay {z-index:10020!important;background:#05181ccc!important;backdrop-filter:none!important;padding:24px!important;overflow-y:auto!important;box-sizing:border-box}
html body .weem-dialog-overlay .vm-backdrop{background:transparent!important;backdrop-filter:none!important}
html body .weem-dialog-brand {display:flex;align-items:center;background:#123E45!important;border-radius:10px;padding:12px 16px;margin:0 48px 18px 0;min-height:48px;box-sizing:border-box}
html body .weem-dialog-brand img {display:block;width:144px!important;height:auto!important;max-height:36px;opacity:1!important;filter:none!important}
html body .weem-dialog :is(h2,h3,h4,label){color:var(--dialog-text)!important;opacity:1!important}
html body .weem-dialog :is(h2,h3){font-size:1.25rem!important;line-height:1.3;margin:0 0 8px!important;padding-right:24px}
html body .weem-dialog :is(p,.subtitle,.modal-sub,.vm-sub,.vm-note,.skip,.terms,.cc-name,.cc-code){color:var(--dialog-muted)!important;opacity:1!important;font-size:.875rem!important;line-height:1.5}
html body .weem-dialog label{font-size:.8125rem!important;line-height:1.4!important;letter-spacing:0!important;text-transform:none!important;display:block;margin-bottom:6px!important}
html body .weem-dialog :is(input,select,textarea){box-sizing:border-box!important;background:var(--dialog-field)!important;color:var(--dialog-text)!important;border:1px solid var(--dialog-border)!important;border-radius:9px!important;font-family:inherit!important;font-size:16px!important;line-height:1.4;min-width:0;max-width:100%;opacity:1!important;-webkit-text-fill-color:var(--dialog-text)}
html body .weem-dialog :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select){min-height:44px!important;height:auto!important;padding:10px 12px!important}
html body .weem-dialog textarea{padding:10px 12px!important;min-height:88px}
html body .weem-dialog :is(input,textarea)::placeholder{color:var(--dialog-placeholder)!important;-webkit-text-fill-color:var(--dialog-placeholder);opacity:1!important;font-size:16px!important}
html body .weem-dialog select option{background:var(--dialog-bg)!important;color:var(--dialog-text)!important}
html body .weem-dialog :is(input,select,textarea,button,a,summary):focus-visible{outline:3px solid #D4B483!important;outline-offset:2px!important}
html body .weem-dialog :is(.row,.vm-row,.form-grid){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px!important}
html body .weem-dialog .vm-row:has(> :only-child){grid-template-columns:1fr}
html body .weem-dialog :is(.field,.vm-field,.fg){min-width:0;overflow:visible;margin-bottom:12px!important}
html body .weem-dialog :is(.vm-head,.vm-form,.popup-form-scroll){padding:0!important;max-height:none!important;overflow:visible!important;flex:none!important}
html body .weem-dialog :is(.vm-phone-prefix,.cc-trigger){background:var(--dialog-field)!important;color:var(--dialog-text)!important;border-color:var(--dialog-border)!important;min-height:44px!important;box-sizing:border-box}
html body .weem-dialog :is(.vm-cc-dropdown,.cc-dropdown){background:var(--dialog-bg)!important;border-color:var(--dialog-border)!important;z-index:10!important}
html body .weem-dialog :is(.vm-cc-item,.cc-country){color:var(--dialog-text)!important;min-height:44px}
html body .weem-dialog :is(.vm-cc-item:hover,.cc-country:hover){background:var(--dialog-field)!important}
html body .weem-dialog :is(.btn-submit,.vm-cta,button[type="submit"]){background:#D4B483!important;color:#123E45!important;border:1px solid #D4B483!important;box-shadow:none!important;min-height:46px!important;padding:10px 16px!important;font-size:1rem!important;border-radius:10px!important;white-space:normal;line-height:1.4}
html body .weem-dialog button:disabled{cursor:wait;opacity:.65!important}
html body .weem-dialog .weem-dialog-close{position:absolute!important;right:16px!important;top:16px!important;min-width:44px!important;min-height:44px!important;display:grid!important;place-items:center!important;background:var(--dialog-field)!important;color:var(--dialog-text)!important;border:1px solid var(--dialog-border)!important;border-radius:10px!important;z-index:12!important}
html body .weem-dialog .popup-sticky-cta{position:static!important;margin-top:16px;padding:12px 0 0!important;background:var(--dialog-bg)!important;border-top:1px solid var(--dialog-border)!important}
html body .weem-dialog::before{display:none!important}
html body .weem-dialog .weem-optional{margin:8px 0 16px;border-top:1px solid var(--dialog-border);padding-top:12px}
html body .weem-dialog .weem-optional summary{cursor:pointer;color:var(--dialog-text);font-weight:600;min-height:44px;line-height:44px}
html body .weem-dialog .weem-optional[open] summary{margin-bottom:12px}
html body .weem-dialog :is(.vm-error p,.modal-error,.form-error){color:#FFB4AC!important}
html[data-theme="light"] body .weem-dialog :is(.vm-error p,.modal-error,.form-error){color:#A1252D!important}
/* Both public navigation surfaces use the light artwork on a solid petroleum bar. */
html body .topnav,html body .nav,html[data-theme="light"] body.weem-public-home #navbar,html body.weem-public-home #navbar{background:#123E45!important;backdrop-filter:none!important}
html body.weem-public-home #navbar :is(a,.v-theme-toggle,button){color:#F6F0E6!important}
html body.weem-public-home #navbar .mobile-menu{background:#123E45!important}
html body.weem-public-home #navbar .v-theme-toggle{border-color:#86A5A7!important}
@media(max-width:640px){
  html body .weem-dialog-overlay,html body .weem-dialog-overlay.active{align-items:flex-start!important;padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom))!important}
  html body .weem-dialog{margin:0 auto!important;max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;padding:18px!important;border-radius:14px!important;transform:none!important}
  html body .weem-dialog :is(.row,.vm-row,.form-grid){grid-template-columns:1fr!important}
}
@media(prefers-reduced-motion:reduce){html body .weem-dialog,html body .weem-dialog-overlay{transition:none!important;animation:none!important}}


/* Operaciones: los diálogos usan exactamente las superficies del panel en ambos temas. */
body.weem-operaciones .weem-dialog {
  --dialog-bg:var(--sf);
  --dialog-field:var(--sf-2);
  --dialog-text:var(--ink);
  --dialog-muted:var(--ink-2);
  --dialog-border:var(--bd-2);
  --dialog-placeholder:var(--ink-3);
  box-shadow:var(--shadow-float)!important;
}
body.weem-operaciones .weem-dialog-overlay {
  background:color-mix(in oklab,var(--bg-2) 78%,transparent)!important;
}
body.weem-operaciones .weem-dialog :is(input,select,textarea),
body.weem-operaciones .weem-dialog :is(.vm-phone-prefix,.cc-trigger) {
  background:var(--sf-2)!important; color:var(--ink)!important; border-color:var(--bd-2)!important;
}
body.weem-operaciones .weem-dialog :is(input,textarea)::placeholder { color:var(--ink-3)!important; }
body.weem-operaciones .weem-dialog :is(.vm-cc-dropdown,.cc-dropdown) { background:var(--sf)!important; border-color:var(--bd-2)!important; }
body.weem-operaciones .weem-dialog :is(.vm-cc-item,.cc-country) { color:var(--ink)!important; }
body.weem-operaciones .weem-dialog :is(.vm-cc-item:hover,.cc-country:hover),
body.weem-operaciones .weem-dialog .weem-dialog-close { background:var(--sf-2)!important; color:var(--ink)!important; }
body.weem-operaciones .weem-dialog .popup-sticky-cta { background:var(--sf)!important; border-top-color:var(--bd)!important; }
body.weem-operaciones .weem-dialog :is(input,select,textarea,button,a,summary):focus-visible { outline-color:var(--focus)!important; }
