/* Mobius -- overlays: search, the create sheets, settings, notifications.
   One host, one scrim, one Escape. Every panel is an opaque neutral with a
   hairline and the one shadow floating things are allowed. Pure ASCII. */

#ov{position:absolute;inset:0;z-index:96;}
#ov[hidden]{display:none;}
.oscrim{
  position:absolute;inset:0;border:0;padding:0;cursor:default;
  background:var(--scrim);
  animation:ovfade 180ms var(--ease-out);
}
@keyframes ovfade{from{opacity:0}}
@keyframes ovpop{from{opacity:0;transform:translate(-50%,-48%) scale(.97)}}
@keyframes ovrise{from{opacity:0;transform:translateY(14px)}}

/* ---------- the sheet (quick create, new space, settings) -------------------- */
.osheet{
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  width:min(440px,calc(100% - 32px));max-height:min(620px,calc(100% - 32px));
  display:flex;flex-direction:column;overflow:hidden;
  border-radius:20px;background:var(--bg-1);border:1px solid var(--border-1);
  box-shadow:var(--shadow-3);animation:ovpop 220ms var(--ease-out);
}
/* a 3px rule in the sheet's hue is all that is left of the old hero band */
.osheet-rule{display:block;height:3px;flex-shrink:0;background:var(--sc,var(--awol-marketing));}
.oclose{
  position:absolute;top:14px;right:14px;width:30px;height:30px;border-radius:999px;
  border:0;display:grid;place-items:center;color:var(--text-2);cursor:pointer;
  background:var(--surface-2);
}
.oclose:hover{color:var(--text-1);background:var(--surface-3);}
.osheet-id{display:flex;align-items:center;gap:12px;padding:16px 56px 6px 20px;}
.otile{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;flex-shrink:0;}
.osheet-id strong{display:block;font-size:16px;font-weight:500;}
.osheet-id small{display:block;font-size:13px;color:var(--text-3);margin-top:1px;}

.osheet-body{flex:1;min-height:0;overflow-y:auto;padding:10px 20px 18px;overscroll-behavior:contain;}
.ofield{display:block;margin-top:14px;}
.ofield > span{
  display:block;font-size:12.5px;color:var(--text-3);margin-bottom:6px;
}
.ofield input,.ofield textarea{
  width:100%;box-sizing:border-box;padding:10px 12px;border-radius:11px;
  border:1px solid var(--border-1);background:var(--surface-1);
  color:var(--text-1);font-size:16px;   /* 16px or iOS Safari zooms on focus */
  resize:vertical;
}
.ofield input:focus,.ofield textarea:focus{outline:none;border-color:var(--border-focus);}

.ochips{display:flex;flex-wrap:wrap;gap:6px;}
.ochip{
  padding:6px 12px;border-radius:999px;font-size:13px;cursor:pointer;
  border:1px solid var(--border-1);background:none;color:var(--text-2);
}
.ochip.on{
  background:color-mix(in srgb, var(--awol-marketing) 16%, transparent);
  border-color:color-mix(in srgb, var(--awol-marketing) 40%, var(--border-1));
  color:var(--text-1);
}
.oswatches{display:flex;gap:8px;flex-wrap:wrap;}
.oswatch{
  width:26px;height:26px;border-radius:999px;border:2px solid transparent;
  cursor:pointer;padding:0;
}
.oswatch.on{box-shadow:0 0 0 2px var(--bg-1),0 0 0 4px currentColor;}

.osheet-foot{
  display:flex;align-items:center;gap:8px;flex-shrink:0;
  padding:12px 20px;border-top:1px solid var(--border-1);
}
.ohint{
  flex:1;min-width:0;font-family:var(--font-mono);font-size:10px;
  letter-spacing:.1em;color:var(--text-3);overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap;
}
.obtn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  height:34px;padding:0 14px;border-radius:11px;border:0;cursor:pointer;
  font-size:13.5px;color:#fff;
}
.obtn svg{width:14px;height:14px;}
.obtn.ghost{background:none;color:var(--text-2);border:1px solid var(--border-1);}
.obtn[disabled]{opacity:.45;cursor:not-allowed;}

/* ---------- search ----------------------------------------------------------- */
.osearch{
  position:absolute;top:14%;left:50%;transform:translateX(-50%);
  width:min(660px,calc(100% - 32px));max-height:min(540px,72%);
  display:flex;flex-direction:column;overflow:hidden;border-radius:18px;
  background:var(--bg-1);border:1px solid var(--border-1);box-shadow:var(--shadow-3);
  animation:ovpop 200ms var(--ease-out);
}
.osearch-hd{
  display:flex;align-items:center;gap:10px;flex-shrink:0;
  padding:14px 16px;border-bottom:1px solid var(--border-1);color:var(--text-3);
}
.osearch-hd input{
  flex:1;min-width:0;background:none;border:0;color:var(--text-1);font-size:16px;
}
.osearch-hd input:focus{outline:none;}
.okbd{
  font-family:var(--font-mono);font-size:9.5px;letter-spacing:.08em;
  border:1px solid var(--border-1);border-radius:6px;padding:3px 6px;
  background:none;color:var(--text-3);cursor:pointer;
}
.osearch-body{flex:1;min-height:0;overflow-y:auto;padding:6px;}
.osearch-ft{
  flex-shrink:0;padding:9px 16px;border-top:1px solid var(--border-1);
  font-family:var(--font-mono);font-size:10px;letter-spacing:.1em;color:var(--text-3);
}
.osec{
  font-family:var(--font-mono);font-size:10px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--text-3);padding:12px 10px 6px;
}
.ohit{
  display:flex;align-items:center;gap:10px;width:100%;box-sizing:border-box;
  padding:9px 10px;border-radius:11px;border:0;background:none;
  color:var(--text-1);text-align:left;cursor:pointer;
}
.ohit:hover,.ohit:focus-visible{background:color-mix(in srgb, var(--text-1) 8%, transparent);}
.ohit-i{
  width:24px;height:24px;border-radius:7px;flex-shrink:0;display:grid;
  place-items:center;background:var(--surface-2);color:var(--text-3);
  font-family:var(--font-mono);font-size:11px;
}
.ohit-t{font-size:14px;flex-shrink:0;max-width:46%;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap;}
.ohit-s{font-size:12.5px;color:var(--text-3);flex:1;min-width:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ohit-k{
  margin-left:auto;font-family:var(--font-mono);font-size:9.5px;
  letter-spacing:.1em;color:var(--text-3);flex-shrink:0;
}
.oempty{padding:30px 12px;text-align:center;color:var(--text-3);font-size:14px;}

/* ---------- notifications ---------------------------------------------------- */
.onotif{
  position:absolute;left:16px;bottom:18px;
  width:min(340px,calc(100% - 32px));max-height:72%;
  display:flex;flex-direction:column;overflow:hidden;border-radius:18px;
  background:var(--bg-1);border:1px solid var(--border-1);box-shadow:var(--shadow-3);
  transform-origin:0 100%;animation:ovrise 220ms var(--ease-out);
}
.onotif-hd{
  display:flex;align-items:center;gap:10px;flex-shrink:0;
  padding:13px 15px;border-bottom:1px solid var(--border-1);
}
.onotif-hd strong{flex:1;font-size:14.5px;font-weight:500;}
.onote{
  display:flex;align-items:flex-start;gap:9px;width:100%;box-sizing:border-box;
  padding:11px 15px;border:0;background:none;color:var(--text-1);
  text-align:left;cursor:pointer;font-size:13.5px;line-height:1.4;
}
.onote:hover{background:color-mix(in srgb, var(--text-1) 7%, transparent);}
.onote i{width:7px;height:7px;border-radius:999px;flex-shrink:0;margin-top:5px;}
.onote span{flex:1;min-width:0;}
.onote em{
  font-style:normal;font-family:var(--font-mono);font-size:9.5px;
  letter-spacing:.08em;color:var(--text-3);flex-shrink:0;
}

/* ---------- mobile ----------------------------------------------------------- */
@media (max-width:767px){
  .osheet{
    top:auto;bottom:0;left:0;transform:none;
    width:100%;max-height:88dvh;border-radius:26px 26px 0 0;
    animation:ovrise 260ms var(--ease-out);
    padding-bottom:env(safe-area-inset-bottom,0px);   /* clears the home indicator (6.1) */
  }
  .osearch{top:0;left:0;transform:none;width:100%;max-height:100%;height:100%;border-radius:0;}
  .onotif{left:12px;right:12px;width:auto;bottom:92px;}
}
@media (prefers-reduced-motion:reduce){
  .oscrim,.osheet,.osearch,.onotif{animation:none;}
}
/* 44px targets on a coarse pointer (6.4): the close circle, the buttons, the
   chips (a 7px transparent border grows the hit box, background-clip keeps
   the visible pill at 30px) */
@media (pointer:coarse){
  .oclose{width:44px;height:44px;top:7px;right:7px;}
  .obtn{height:44px;}
  .ochip{border-top-width:7px;border-bottom-width:7px;border-color:transparent;background-clip:padding-box;
    box-shadow:inset 0 0 0 1px var(--border-1);}
  .ochip.on{border-color:transparent;box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--awol-marketing) 40%, var(--border-1));}
  .okbd{min-height:44px;}
}

/* ---------- toast -------------------------------------------------------
   The one piece of feedback that is not an overlay: a surface pill with a
   tone dot, bottom-centre. Carried here rather than shared from 2-base.css
   because v2 does not load that file, and every error path in the app ends
   at App.toast -- an unstyled or missing toast means a failure with no
   visible explanation. Above the dock on a phone for the same reason. */
.toast{
  position:fixed;left:50%;bottom:24px;
  transform:translate(-50%,10px);z-index:80;
  display:flex;align-items:center;gap:10px;
  background:var(--surface-2);border:1px solid var(--border-2);color:var(--text-1);
  padding:10px 18px 10px 14px;border-radius:var(--radius-pill);font-size:var(--text-mono);
  box-shadow:var(--shadow-3);opacity:0;
  transition:opacity var(--dur-med) var(--ease-out),transform var(--dur-med) var(--ease-out);
  pointer-events:none;max-width:86vw;
}
.toast i{width:8px;height:8px;border-radius:2.5px;flex:none;background:var(--text-3)}
.toast[data-tone="ok"] i{background:var(--ok)}
.toast[data-tone="warn"] i{background:var(--warn)}
.toast[data-tone="danger"] i{background:var(--danger)}
.toast span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.toast.on{opacity:1;transform:translateX(-50%)}
@media (max-width:767px){.toast{bottom:104px;}}
@media (prefers-reduced-motion:reduce){.toast{transition:none;}}
