/*
  Experience uplift: the shared surfaces (handover R17, B57 step U1).
  Source of truth: this file. tools/design/sync.sh copies it beside tokens.css into
  src/Iwaatech.Api/wwwroot and web/public. Never edit the copies.

  One recipe for glass, in both themes, copied from the working page
  (docs/uplift/working page source: index.template.html and shell.css). Every value comes from a token
  in design/tokens.css, so a theme change never touches this file.

  The classes carry the prefix "up-" so they sit beside the present kit. A screen moves over when it is
  rebuilt to the uplift standard: it is wrapped in .up and built only from these and the uplift components.
*/

/* The scope of an uplift screen: type, ink and the focus ring. */
.up{font-family:var(--font-latin);font-size:14px;line-height:1.5;color:var(--ink);-webkit-font-smoothing:antialiased}
:root[lang="ar"] .up{font-family:var(--font-arabic)}
/* Kept at no weight, so a component that draws its own focus (a cyan edge and a ring) always wins. */
:where(.up :focus-visible){outline:2px solid var(--cyan);outline-offset:3px;border-radius:8px}

/* The backdrop glass sits on: page color, three drifting lights, stars in Galaxy Glass, the campus in Light.
   Markup: <div class="up-bg" aria-hidden="true"><span class="stars"></span><span class="photo"></span><i class="a"></i><i class="b"></i><i class="c"></i></div> */
.up-bg{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;background:var(--bg)}
.up-bg .stars{position:absolute;inset:0;background:url("../img/backgrounds/galaxy-stars.svg") center/1440px auto;opacity:var(--stars-on)}
.up-bg .photo{position:absolute;inset:0;background:url("../img/backgrounds/smart-campus-light.webp") center bottom/cover no-repeat;opacity:var(--photo-on)}
.up-bg i{position:absolute;border-radius:50%;filter:blur(90px);will-change:transform}
.up-bg .a{width:620px;height:620px;right:-140px;top:-180px;background:var(--blob-a);opacity:var(--blob-a-on);animation:up-drift 26s ease-in-out infinite alternate}
.up-bg .b{width:560px;height:560px;left:-200px;bottom:-220px;background:var(--blob-b);opacity:var(--blob-b-on);animation:up-drift 32s ease-in-out infinite alternate-reverse}
.up-bg .c{width:460px;height:460px;left:34%;top:38%;background:var(--blob-c);opacity:var(--blob-c-on);animation:up-drift 38s ease-in-out infinite alternate}
@keyframes up-drift{to{transform:translate3d(-70px,60px,0) scale(1.12)}}

/* Glass: fill with a diagonal sheen, a soft edge, a top highlight, a deep shadow, blur behind, and a 1 px
   gradient rim drawn over the edge. Panel is 24, card is 18. */
.up-panel,.up-card{position:relative;border:1px solid var(--edge);background:var(--glass);box-shadow:inset 0 1px 0 var(--hi),var(--glass-shadow);backdrop-filter:var(--blur);-webkit-backdrop-filter:var(--blur);color:var(--ink)}
.up-panel{border-radius:var(--r-panel)}
.up-card{border-radius:var(--r-card)}
.up-panel::after,.up-card::after{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;background:var(--rim);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}

/* The wash and the iWaa pattern, for heroes, page heads, badges and the side menu foot (rule 9). Never inside a
   dense working area. Markup: the panel takes up-wash, and its first child is <span class="up-pat" aria-hidden="true">. */
.up-wash::before{content:"";position:absolute;inset:0;border-radius:inherit;background:var(--wash);pointer-events:none}
.up-wash>*{position:relative}
.up-pat{position:absolute!important;inset:0;border-radius:inherit;background:var(--pat) right -30px center/640px auto no-repeat;opacity:.55;-webkit-mask-image:linear-gradient(90deg,transparent 28%,#000 78%);mask-image:linear-gradient(90deg,transparent 28%,#000 78%);pointer-events:none}
:root[dir="rtl"] .up-pat{transform:scaleX(-1)}
:root[dir="rtl"] .up-wash::before{transform:scaleX(-1)}

/* The surface of a control (search, quiet button, icon button, field): radius 12. */
.up-ctl{border:1px solid var(--edge);border-radius:var(--r-ctl);background:var(--ctl2);box-shadow:inset 0 1px 0 var(--hi);backdrop-filter:var(--blur-ctl);-webkit-backdrop-filter:var(--blur-ctl);color:var(--ink)}

/* The solid surface, for what opens over glass and must stay readable: menus and toasts. */
.up-solid{border:1px solid var(--edge);border-radius:14px;background:var(--solid);box-shadow:var(--glass-shadow);color:var(--ink)}

/* The side menu surface: a taller wash and a stronger blur. */
.up-side{background:var(--side-bg);backdrop-filter:var(--blur-side);-webkit-backdrop-filter:var(--blur-side);border-inline-end:1px solid var(--edge);box-shadow:inset -1px 0 0 var(--hi),12px 0 40px rgba(4,10,40,.18);color:var(--ink)}
:root[dir="rtl"] .up-side{box-shadow:inset 1px 0 0 var(--hi),-12px 0 40px rgba(4,10,40,.18)}

/* The primary fill: the one gradient, 115 degrees. */
.up-primary{color:var(--on-primary);background:var(--primary);box-shadow:0 10px 26px rgba(76,92,214,.38)}

@media (prefers-reduced-motion:reduce){
  .up-bg i{animation:none}
  .up,.up *,.up *::before,.up *::after{animation:none!important;transition:none!important}
}

/* Icons (step U2). An icon never shrinks in a row; an awaited illustration shows the meaning's name in its place. */
.up-icon{flex:none;display:inline-block;vertical-align:middle}
.up-icon-name{display:inline-grid;place-items:center;padding:2px 6px;border:1px dashed var(--line);border-radius:8px;color:var(--muted);font-size:10.5px;line-height:1.15;text-align:center}
