/* ipad_safe.css — iPad-safe layout layer on top of the verbatim desktop style.css (no wording/order changes). */
:root{--sat:env(safe-area-inset-top,0px);--sar:env(safe-area-inset-right,0px);--sab:env(safe-area-inset-bottom,0px);--sal:env(safe-area-inset-left,0px)}
html.dfi-touch,html.dfi-touch body{-webkit-text-size-adjust:100%;overscroll-behavior:none}
html.dfi-touch .shell{min-height:100dvh;padding-left:var(--sal);padding-right:var(--sar)}
html.dfi-touch aside{height:100dvh;padding-top:calc(var(--sat) + 14px);padding-bottom:calc(var(--sab) + 12px);display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden}
html.dfi-touch aside .brand{flex:0 0 auto}
html.dfi-touch aside .side-bottom{position:static;margin-top:auto;padding:12px 8px 0}
html.dfi-touch main{padding-bottom:calc(var(--sab) + 20px)}
html.dfi-touch main>header{position:sticky;top:0;z-index:50;background:var(--bg);height:auto;min-height:72px;padding-top:calc(var(--sat) + 8px);padding-bottom:8px;gap:12px}
html.dfi-touch main>header>div:first-child{flex:0 1 auto;min-width:150px;max-width:34%}
html.dfi-touch #pageTitle,html.dfi-touch #projectCrumb{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.dfi-touch main>header .actions{flex:1 1 auto;min-width:0;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;justify-content:flex-start;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:4px 0;mask-image:linear-gradient(90deg,#000 calc(100% - 18px),transparent)}
html.dfi-touch main>header .actions::-webkit-scrollbar{display:none}
html.dfi-touch main>header .actions>*,html.dfi-touch main>header .headerTertiary>*{flex:0 0 auto;white-space:nowrap}
html.dfi-touch main>header .headerTertiary{display:flex;gap:8px;flex:0 0 auto;flex-wrap:nowrap}
html.dfi-touch button,html.dfi-touch select,html.dfi-touch input:not([type=checkbox]):not([type=radio]):not([type=range]){min-height:44px}
html.dfi-touch .nav{min-height:44px}
html.dfi-touch input,html.dfi-touch select,html.dfi-touch textarea{font-size:16px}
html.dfi-touch dialog{max-height:calc(100dvh - var(--sat) - var(--sab) - 24px);max-width:calc(100vw - var(--sal) - var(--sar) - 24px);overflow:auto}
#__ipadLogin{position:fixed;inset:0;z-index:2147483000;display:none;align-items:center;justify-content:center;background:#0b0f13;padding:calc(var(--sat) + 16px) calc(var(--sar) + 16px) calc(var(--sab) + 16px) calc(var(--sal) + 16px)}
#__ipadLogin form{width:min(420px,100%);background:#11161c;border:1px solid #27313b;border-radius:12px;padding:26px;display:grid;gap:12px;color:#e5eaf0}
#__ipadLogin img{width:100%;max-height:120px;object-fit:contain}
#__ipadLogin label{display:grid;gap:6px;font-size:12px;color:#9aa5b2}
#__ipadLogin input{min-height:44px;font-size:16px;background:#0d1116;color:#fff;border:1px solid #303a45;border-radius:7px;padding:8px 10px}
#__ipadLogin button{min-height:44px}
#__ipadLoginMsg{min-height:18px;font-size:12px;color:#ffb35c}
#__ipadSignOut{margin-top:10px;background:transparent;border:1px solid #303a45;color:#9aa5b2;font-weight:650;font-size:11px;padding:6px 10px;min-height:44px;width:100%}
/* logo: same artwork, cropped to the mark so it fills the brand box instead of floating small inside black padding */
html.dfi-touch aside .brandLogo{content:url(/static/assets/drone_force_logo_ipad.jpg);height:auto;aspect-ratio:1075/242;padding:6px;object-fit:contain;object-position:center}
/* header: title on its own line (never squashed or truncated), all actions on ONE horizontally scrollable row in desktop order */
html.dfi-touch main>header{flex-wrap:wrap;align-items:flex-end;row-gap:6px}
html.dfi-touch main>header>div:first-child{flex:1 0 100%;max-width:100%;min-width:0}
html.dfi-touch #pageTitle{font-size:20px;line-height:1.2;margin:0 0 2px}
html.dfi-touch main>header .actions{flex:1 0 100%;max-width:100%}
/* Safari/WebKit form-control normalisation so controls render like the desktop (Chromium/Edge) build */
html.dfi-touch button{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:13.333px;line-height:1.2}
html.dfi-touch select{-webkit-appearance:none;appearance:none;color:#eef2f6;background-color:#0d1116;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239aa5b2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;padding:0 26px 0 10px;border:1px solid #303a45;border-radius:7px;text-overflow:ellipsis}
html.dfi-touch input[type=checkbox]{-webkit-appearance:checkbox;appearance:auto;width:18px!important;height:18px!important;min-width:18px;flex:0 0 auto}
html.dfi-touch dialog .modalHead button,html.dfi-touch dialog button[value=cancel]:only-child{min-width:44px}
