/* Shared VODILA account controls. Eye buttons belong to the input, not the grid. */
#profile .auth-password,.pass-field>div{position:relative;display:block;min-width:0}
#profile .auth-password input,#setupProfile .pass-field input{padding-right:52px;width:100%}
#profile .auth-password button,.pass-field .eye{position:absolute;inset:0 0 0 auto;width:44px;min-width:44px;height:100%;min-height:44px;margin:0;padding:10px;display:grid;place-items:center;border:0;border-radius:10px;background:transparent;color:#bad1c6;cursor:pointer}
.auth-password button svg,.pass-field .eye svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7}
.auth-password button:focus-visible,.pass-field .eye:focus-visible{outline:2px solid #52d6ae;outline-offset:-3px}
#memberForm,#accountLoginForm,#emailRecoveryForm,#setupProfile{min-width:0}
#profile :is(#accountLoginForm,#emailRecoveryForm) .vehicle-fields{grid-template-columns:minmax(0,1fr)}
#profile :is(.member-password,#accountLoginForm,#emailRecoveryForm) input,#setupProfile input{box-sizing:border-box;min-width:0;max-width:100%;font:16px/1.4 system-ui,-apple-system,sans-serif;color:#f3faf6;background:#102021;border:1px solid #4c675d;border-radius:10px;padding:10px 12px;min-height:44px}
#profile :is(#accountLoginForm,#emailRecoveryForm) label{font-size:13px;color:#bfd2c7;display:grid;gap:4px}
#profile :is(#accountLoginForm,#emailRecoveryForm) button[type=submit],#profile #openAccountLogin,#profile #cancelAccountLogin,#setupProfile>button,#setupProfile #sendRecovery{font:700 16px/1.4 system-ui,-apple-system,sans-serif;min-height:46px;border:0;border-radius:12px;padding:12px;background:#3dbd9a;color:#08251e;cursor:pointer;white-space:normal;overflow-wrap:anywhere}
#profile #cancelAccountLogin,#setupProfile #existingLogin,#setupProfile #forgotPassword{background:#263d39;color:#f1faf3}
#profile .vehicle-actions{flex-wrap:wrap}
#profile .vehicle-actions>button{flex:1 1 140px}
#profile{top:var(--auth-top,0px);bottom:auto;height:var(--auth-height,100dvh);padding:calc(20px + env(safe-area-inset-top,0px)) 16px calc(24px + env(safe-area-inset-bottom,0px));scroll-padding-block:24px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
/* The outer dialog owns the viewport; its iframe must not retain a 100vh layout
   behind the iPhone keyboard. The inner sheet owns all scrolling, header included. */
#onboarding{top:var(--auth-top,0px);bottom:auto;height:var(--auth-height,100dvh);padding:0;overflow:hidden;align-items:stretch}
#firstDriveLesson{display:block;min-width:0;min-height:0;flex:1}
/* WebKit does not propagate ancestor CSS zoom into an iframe viewport.
   Neutralize it on this host and scale the iframe explicitly in both engines. */
body.a11y-zoomed #onboarding{zoom:calc(1 / 1.5);top:calc(var(--auth-top,0px) * 1.5);height:calc(var(--auth-height,calc(100dvh / 1.5)) * 1.5);justify-content:flex-start}
body.a11y-zoomed #firstDriveLesson{flex:none;width:66.666667%!important;height:66.666667%!important;transform:scale(1.5);transform-origin:top left}
#settings{top:var(--auth-top,0px);height:var(--auth-height,100dvh);padding:calc(12px + env(safe-area-inset-top,0px)) 12px calc(20px + env(safe-area-inset-bottom,0px));scroll-padding-block:20px}
#settings .sheet{margin-block-start:auto;flex-shrink:0;max-height:none;overflow:visible;min-width:0}
#settings .settings-head{position:relative;flex-wrap:wrap;min-height:40px}
#settings h1{position:relative;margin:16px 0 12px;overflow-wrap:anywhere}
#profile [hidden],#settings [hidden]{display:none!important}
#profile input,#settings input{scroll-margin-block:24px}
#profile :is(.member-password,#accountLoginForm) .auth-password input{padding-right:52px}
/* The full-screen host must not paint over the approved map between steps. */
#settings{background:linear-gradient(transparent 20%,#09251b4d)}
#settings .sheet{background:#102322}
/* Account dialogs take precedence over passive game notices. Keep the notice
   mounted so closing the profile restores it without changing consent state. */
body:has(#profile:not([hidden])) :is(.sync-note,.vodila-trip-notice),body:has(#onboarding:not([hidden])) :is(.sync-note,.vodila-trip-notice){visibility:hidden}
#profile .panel-nav{position:relative;top:auto}
body:has(#profile:not([hidden])) .leaflet-control-container,body:has(#onboarding:not([hidden])) .leaflet-control-container{visibility:hidden}

#recoveryPanel{display:grid;gap:10px;min-width:0}
#recoveryPanel label{font-size:13px;color:#bfd2c7}
#recoveryPanel input{box-sizing:border-box;width:100%;min-width:0;min-height:44px;font:16px/1.4 system-ui;padding:10px 12px;border:1px solid #4c675d;border-radius:10px;background:#102021;color:#f3faf6}
#recoveryPanel button{min-height:46px;font:700 16px/1.4 system-ui;border:0;border-radius:12px;padding:12px;background:#3dbd9a;color:#08251e;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
#recoveryPanel #backFromRecovery{background:#263d39;color:#f1faf3}
#recoveryPanel small{font-size:13px;color:#adc5ba;line-height:1.5}
#profile .vehicle-heading{flex-wrap:wrap;gap:8px}
#profile .vehicle-heading h3{min-width:0;overflow-wrap:anywhere}
#profile .vehicle-heading button{max-width:100%;white-space:normal}
#profile .member-photo-preview{flex-wrap:wrap}
#profile .member-photo-actions{flex:1 1 160px}
#profile .member-photo-actions button{overflow-wrap:anywhere}

/* Error remains visible when focused; changing that field clears its error. */
#settings input[data-state="error"],#profile input[data-state="error"]{
 border-color:#ff625e;box-shadow:0 0 0 1px #ff625e,0 0 12px #ff625e80;outline-color:#ff625e;
}
