/* hymeet-brand.css — STUB (owned by the meet-brand child agent).
 *
 * Expands into the shared iOS "liquid glass" brand layer that makes hyMeet and
 * hyMessage one product family: translucent frosted surfaces, depth/blur,
 * specular highlights, continuous rounded corners, the hyMeet wordmark/icon.
 * Consumed by meet.html, the in-call overlay, and the hymeet.app landing; the
 * hyMessage surfaces are aligned to the same tokens (theme-aware, no hardcoded
 * brand colors — use var(--accent)/var(--glass-*) from tokens.css).
 *
 * meet.html ships with self-contained fallback styling, so this stub is safe to
 * load empty until the child fills it in.
 */
/* ═══════════════════════════════════════════════════════════════════════
   §1  Brand tokens — all theme-aware (resolve from /css/tokens.css).
   NO hardcoded brand hex: the fallbacks only apply if tokens.css is absent.
   ═══════════════════════════════════════════════════════════════════════ */
:root{
  /* Accent ramp (hyMeet shares hyMessage's accent so they read as one family) */
  --hymeet-accent:   var(--accent,  #00ffa3);
  --hymeet-accent-2: var(--purple,  #a855f7);
  --hymeet-accent-3: var(--info,    #3ac9ff);

  /* Signature hyMeet gradients (used for wordmark, primary buttons, glows) */
  --hymeet-grad:       linear-gradient(135deg, var(--hymeet-accent), var(--hymeet-accent-2));
  --hymeet-grad-vivid: linear-gradient(120deg, var(--hymeet-accent-3) 0%, var(--hymeet-accent) 48%, var(--hymeet-accent-2) 100%);
  --hymeet-grad-soft:  linear-gradient(135deg,
                         color-mix(in srgb, var(--hymeet-accent) 20%, transparent),
                         color-mix(in srgb, var(--hymeet-accent-2) 20%, transparent));

  /* Glass surfaces — layer over ios-glass.css tokens, theme-aware */
  --hymeet-glass:        var(--glass-bg-heavy, rgba(0,14,8,.82));
  --hymeet-glass-light:  var(--glass-bg-light, rgba(255,255,255,.06));
  --hymeet-border:       var(--glass-border-light, rgba(255,255,255,.12));
  --hymeet-blur:         var(--glass-blur-heavy, 28px);
  --hymeet-saturate:     var(--glass-saturate, 180%);

  /* Continuous large corner radii (Apple "squircle" feel) */
  --hymeet-radius:     22px;
  --hymeet-radius-lg:  28px;
  --hymeet-radius-sm:  14px;
  --hymeet-radius-pill: 9999px;

  /* Specular highlight + edge lighting (the "liquid glass" sheen) */
  --hymeet-specular: linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 22%, rgba(255,255,255,0) 46%);
  --hymeet-edge:     inset 0 1px 0 rgba(255,255,255,.22), inset 0 0 0 .5px rgba(255,255,255,.05);
  --hymeet-edge-press: inset 0 1px 1px rgba(0,0,0,.28), inset 0 0 0 .5px rgba(255,255,255,.06);

  /* Depth shadows + accent glow */
  --hymeet-depth:    0 18px 60px rgba(0,0,0,.5), 0 4px 14px rgba(0,0,0,.34);
  --hymeet-depth-sm: 0 8px 26px rgba(0,0,0,.4);
  --hymeet-glow:     0 10px 32px color-mix(in srgb, var(--hymeet-accent) 36%, transparent);
  --hymeet-glow-sm:  0 6px 18px color-mix(in srgb, var(--hymeet-accent) 30%, transparent);

  /* Spring-y motion (matches ios-glass cadence) */
  --hymeet-spring:      var(--glass-spring, .5s cubic-bezier(.2,.9,.3,1));
  --hymeet-spring-fast: var(--glass-spring-fast, .22s cubic-bezier(.2,.9,.3,1));
}
[data-mode="light"]{
  --hymeet-specular: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.12) 24%, rgba(255,255,255,0) 48%);
  --hymeet-edge:     inset 0 1px 0 rgba(255,255,255,.7), inset 0 0 0 .5px rgba(0,0,0,.04);
  --hymeet-depth:    0 18px 60px rgba(0,0,0,.14), 0 4px 14px rgba(0,0,0,.08);
  --hymeet-depth-sm: 0 8px 26px rgba(0,0,0,.1);
}

/* ═══════════════════════════════════════════════════════════════════════
   §2  Glass surfaces — refine .glass (cards, host lobby, toast).
   `body`-scoped so this layer wins over meet.html's inline fallback
   without !important. Children lifted above the specular sheen.
   ═══════════════════════════════════════════════════════════════════════ */
body .glass{
  position: relative;
  background: var(--hymeet-glass);
  -webkit-backdrop-filter: saturate(var(--hymeet-saturate)) blur(var(--hymeet-blur));
  backdrop-filter: saturate(var(--hymeet-saturate)) blur(var(--hymeet-blur));
  border: 1px solid var(--hymeet-border);
  border-radius: var(--hymeet-radius-lg);
  box-shadow: var(--hymeet-depth), var(--hymeet-edge);
  isolation: isolate;
}
/* Specular top highlight — a soft sheen that fades out by ~46% height */
body .glass::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--hymeet-specular);
  opacity: .9;
  pointer-events: none;
  z-index: 0;
}
body .glass > *{ position: relative; z-index: 1; }
/* The host waiting-room popover reads as a lighter floating chip */
body #meet-host-lobby{
  background: var(--hymeet-glass);
  border-radius: var(--hymeet-radius);
  box-shadow: var(--hymeet-depth-sm), var(--hymeet-edge);
}
/* Toast — compact glass pill */
body #meet-toast{
  border-radius: var(--hymeet-radius-pill);
  border: 1px solid var(--hymeet-border);
  box-shadow: var(--hymeet-depth-sm), var(--hymeet-edge);
  -webkit-backdrop-filter: saturate(var(--hymeet-saturate)) blur(22px);
  backdrop-filter: saturate(var(--hymeet-saturate)) blur(22px);
}

/* ═══════════════════════════════════════════════════════════════════════
   §3  Wordmark / brand lockup — .mt-brand and a reusable .hymeet-wordmark
   ═══════════════════════════════════════════════════════════════════════ */
body .mt-brand b,
.hymeet-wordmark{
  background: var(--hymeet-grad-vivid);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  letter-spacing: .14em;
  font-weight: 800;
}
.hymeet-wordmark{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  text-transform: uppercase;
}
body .mt-brand iconify-icon,
.hymeet-wordmark iconify-icon{
  color: var(--hymeet-accent);
  -webkit-text-fill-color: var(--hymeet-accent); /* keep icon solid, not clipped */
  filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--hymeet-accent) 45%, transparent));
}

/* ═══════════════════════════════════════════════════════════════════════
   §4  Primary + ghost buttons — .mt-btn / .mt-btn.ghost
   Glossy gradient fill via layered inset shadows (no overlay over label).
   ═══════════════════════════════════════════════════════════════════════ */
body .mt-btn{
  min-height: var(--touch-target, 44px);
  border-radius: var(--hymeet-radius-sm);
  background: var(--hymeet-grad);
  box-shadow: var(--hymeet-glow),
              inset 0 1px 0 rgba(255,255,255,.38),
              inset 0 -10px 18px rgba(0,0,0,.12);
  transition: transform var(--hymeet-spring-fast), filter var(--hymeet-spring-fast), box-shadow var(--hymeet-spring-fast);
}
body .mt-btn:hover{ filter: brightness(1.06) saturate(1.05); }
body .mt-btn:active{
  transform: scale(.97);
  box-shadow: var(--hymeet-glow-sm), inset 0 2px 6px rgba(0,0,0,.28);
}
body .mt-btn:focus-visible{
  outline: none;
  box-shadow: var(--hymeet-glow), 0 0 0 3px color-mix(in srgb, var(--hymeet-accent) 45%, transparent);
}
body .mt-btn.ghost{
  background: var(--hymeet-glass-light);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--hymeet-border);
  box-shadow: var(--hymeet-edge);
  color: var(--text, #eaf0ff);
}
body .mt-btn.ghost:hover{ background: color-mix(in srgb, var(--hymeet-accent) 12%, var(--hymeet-glass-light)); filter: none; }
body .mt-btn.ghost:active{ transform: scale(.97); box-shadow: var(--hymeet-edge-press); }

/* ═══════════════════════════════════════════════════════════════════════
   §5  Inputs — .mt-field (>=16px to defeat iOS auto-zoom)
   ═══════════════════════════════════════════════════════════════════════ */
body .mt-field input{
  font-size: 16px;
  border-radius: var(--hymeet-radius-sm);
  border: 1px solid var(--hymeet-border);
  background: var(--hymeet-glass-light);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: border-color var(--hymeet-spring-fast), box-shadow var(--hymeet-spring-fast), background var(--hymeet-spring-fast);
}
body .mt-field input:focus{
  border-color: var(--hymeet-accent);
  background: var(--hymeet-glass);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hymeet-accent) 22%, transparent);
}
body .mt-field input::placeholder{ color: var(--muted, rgba(200,255,240,.58)); }

/* Camera preview gets the same continuous radius + inner edge lighting */
body .mt-preview{
  border-radius: var(--hymeet-radius);
  box-shadow: var(--hymeet-edge), var(--hymeet-depth-sm);
}

/* ═══════════════════════════════════════════════════════════════════════
   §6  In-call chrome — top bar + control dock (.hv-topbar / .hv-controls)
   Edge-anchored vibrant glass bars instead of flat gradient scrims.
   ═══════════════════════════════════════════════════════════════════════ */
body .hv-topbar{
  background: linear-gradient(180deg, rgba(0,0,0,.42), rgba(0,0,0,0));
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
          mask-image: linear-gradient(180deg, #000 55%, transparent);
}
body .hv-topbar .ttl{ letter-spacing: .01em; }
body .hv-controls{
  background: linear-gradient(0deg, rgba(0,0,0,.5), rgba(0,0,0,0));
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-mask-image: linear-gradient(0deg, #000 60%, transparent);
          mask-image: linear-gradient(0deg, #000 60%, transparent);
}

/* ═══════════════════════════════════════════════════════════════════════
   §7  Control buttons — .hv-cbtn (44px+ tactile glass circles)
   ═══════════════════════════════════════════════════════════════════════ */
body .hv-cbtn{
  min-width: var(--touch-target, 44px);
  min-height: var(--touch-target, 44px);
  background: var(--hymeet-glass-light);
  border: 1px solid var(--hymeet-border);
  box-shadow: var(--hymeet-edge), var(--hymeet-depth-sm);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  transition: transform var(--hymeet-spring-fast), background var(--hymeet-spring-fast), box-shadow var(--hymeet-spring-fast);
}
body .hv-cbtn:hover{ background: color-mix(in srgb, #fff 10%, var(--hymeet-glass-light)); }
body .hv-cbtn:active{ transform: scale(.9); box-shadow: var(--hymeet-edge-press); }
body .hv-cbtn:focus-visible{ outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--hymeet-accent) 50%, transparent); }
/* Active toggle (mic/cam on) glows with the accent */
body .hv-cbtn.on{
  background: var(--hymeet-grad);
  border-color: transparent;
  box-shadow: var(--hymeet-glow-sm), inset 0 1px 0 rgba(255,255,255,.35);
}
/* Destructive (leave / end) keeps the danger token but gains depth + gloss */
body .hv-cbtn.end,
body .hv-cbtn.danger-on{
  background: linear-gradient(135deg, color-mix(in srgb, var(--danger,#ff4d6d) 88%, #fff 0%), var(--danger,#ff4d6d));
  border-color: transparent;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--danger,#ff4d6d) 40%, transparent), inset 0 1px 0 rgba(255,255,255,.32);
}
body .meet-copy-btn,
body #meet-copy-btn{ box-shadow: var(--hymeet-edge); }

/* ═══════════════════════════════════════════════════════════════════════
   §8  Participant tiles — .hv-tile (continuous radius + speaking glow)
   ═══════════════════════════════════════════════════════════════════════ */
body .hv-tile{
  border-radius: var(--hymeet-radius);
  border: 1px solid var(--hymeet-border);
  box-shadow: var(--hymeet-depth-sm), var(--hymeet-edge);
  transition: box-shadow var(--hymeet-spring-fast), border-color var(--hymeet-spring-fast);
}
body .hv-tile.speaking{
  border-color: var(--hymeet-accent);
  box-shadow: 0 0 0 2px var(--hymeet-accent), var(--hymeet-glow-sm);
}
body .hv-tile-bar{ text-shadow: 0 1px 6px rgba(0,0,0,.7); }
/* Self picture-in-picture tile */
body #hv-pip{
  border-radius: var(--hymeet-radius-sm);
  border: 1px solid var(--hymeet-border);
  box-shadow: var(--hymeet-depth-sm), var(--hymeet-edge);
}
/* Solo-stage avatar ring picks up the brand glow */
body .hv-stage-avatar img{
  border: 2px solid var(--hymeet-border);
  box-shadow: var(--hymeet-glow);
}

/* ═══════════════════════════════════════════════════════════════════════
   §9  Host lobby rows + admit button
   ═══════════════════════════════════════════════════════════════════════ */
body .meet-admit{
  min-height: 32px;
  border-radius: var(--hymeet-radius-sm);
  background: var(--hymeet-grad);
  box-shadow: var(--hymeet-glow-sm), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform var(--hymeet-spring-fast), filter var(--hymeet-spring-fast);
}
body .meet-admit:hover{ filter: brightness(1.06); }
body .meet-admit:active{ transform: scale(.96); }

/* ═══════════════════════════════════════════════════════════════════════
   §10  Loading spinner uses the accent ramp
   ═══════════════════════════════════════════════════════════════════════ */
body .mt-spin iconify-icon{ color: var(--hymeet-accent); }

/* ═══════════════════════════════════════════════════════════════════════
   §11  Shared family primitives — opt-in classes hyMessage can reuse so
   both products share one liquid-glass vocabulary.
   ═══════════════════════════════════════════════════════════════════════ */
.hymeet-surface{
  position: relative;
  background: var(--hymeet-glass);
  -webkit-backdrop-filter: saturate(var(--hymeet-saturate)) blur(var(--hymeet-blur));
  backdrop-filter: saturate(var(--hymeet-saturate)) blur(var(--hymeet-blur));
  border: 1px solid var(--hymeet-border);
  border-radius: var(--hymeet-radius-lg);
  box-shadow: var(--hymeet-depth), var(--hymeet-edge);
  isolation: isolate;
}
.hymeet-surface::before{
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--hymeet-specular);
  pointer-events: none;
  z-index: 0;
}
.hymeet-btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--touch-target, 44px);
  padding: 0 18px;
  border: none; cursor: pointer;
  border-radius: var(--hymeet-radius-sm);
  font: 800 15px/1 var(--font-ios, -apple-system, system-ui, sans-serif);
  color: #fff;
  background: var(--hymeet-grad);
  box-shadow: var(--hymeet-glow), inset 0 1px 0 rgba(255,255,255,.38), inset 0 -10px 18px rgba(0,0,0,.12);
  transition: transform var(--hymeet-spring-fast), filter var(--hymeet-spring-fast);
}
.hymeet-btn:hover{ filter: brightness(1.06); }
.hymeet-btn:active{ transform: scale(.97); }
.hymeet-chip{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: var(--hymeet-radius-pill);
  background: var(--hymeet-glass-light);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--hymeet-border);
  font-size: 12px; font-weight: 600;
  color: var(--text, #eaf0ff);
}
.hymeet-accent-text{
  background: var(--hymeet-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ═══════════════════════════════════════════════════════════════════════
   §12  Performance + accessibility guardrails
   ═══════════════════════════════════════════════════════════════════════ */
/* Trim blur cost on small / low-power screens */
@media (max-width: 480px){
  :root{ --hymeet-blur: 20px; }
}
/* Hint the compositor only for elements that animate on press */
body .mt-btn, body .hv-cbtn, body .meet-admit, .hymeet-btn{ will-change: transform; }
/* Respect reduced-motion: drop transforms + transitions, keep the look */
@media (prefers-reduced-motion: reduce){
  body .glass, body .mt-btn, body .mt-btn.ghost, body .hv-cbtn, body .hv-tile,
  body .meet-admit, body .mt-field input, .hymeet-btn{
    transition: none !important;
  }
  body .mt-btn:active, body .hv-cbtn:active, body .meet-admit:active, .hymeet-btn:active{
    transform: none;
  }
  body .mt-spin iconify-icon{ animation: none; }
}
