/* Communicate — the few additions the real application needs on top of the
   design prototype's stylesheets. Kept separate so the vendored design CSS
   (site/header/footer/auth/tone/theme/market/seller) stays byte-identical. */

/* ---- content width ------------------------------------------------------- */
/* The prototype sized the frame for its own copy: .wrap is 1200px and the
   header pill is 1152px (1152 + 24px padding on each side = 1200, so the two
   line up). The Vietnamese nav labels need roughly 1190px, so at 1152px the
   labels wrapped inside their 40px-tall buttons. Widen both, keeping the
   header-to-content alignment intact. */
.hm .wrap { max-width: 1320px; }
.hm .ft-wrap { max-width: 1320px; }
.hdr.site { --hdr-max: 1272px; }

/* Belt and braces: a nav label must never break across two lines, whatever
   the viewport does. */
.hdr .hdr-l,
.hdr .hdr-login,
.hdr .hdr-cta { white-space: nowrap; }

/* header.css reveals the desktop nav from 1024px, but measured against the
   Vietnamese labels it only fits from about 1230px of window width. Between
   the two it used to wrap; with nowrap it would overflow instead, so hand
   those widths back to the burger menu. 1260px leaves ~30px of margin. */
@media (max-width: 1259.98px) {
  .hdr.site .hdr-nav { display: none; }
  .hdr.site .hdr-burger { display: grid; }
  .hdr.site .hdr-r { margin-left: auto; }
}

/* ---- brand logo ---------------------------------------------------------- */
/*
 * The design prototype drew the logo in white (and, in the login dialog, left a
 * placeholder gradient tile). Use the real Hidemium brand blue instead.
 *
 * Palette taken from the official landing page (src/assets/tailwind.css):
 *   --brand-400 #3d7ffc   --brand-500 #1a6bff   --brand-600 #0062ff
 * The logo SVG there is #004CC6, but that is too dark to read on this near
 * black chrome, and the landing page itself switches to --brand-400 for brand
 * coloured text on dark surfaces. So: brand-400 on dark, brand-600 on light.
 *
 * brand-logo.blade.php inlines the mark with fill="currentColor", so this one
 * `color` drives the mark and the "Hidemium" wordmark together.
 */
.hm {
  --brand: #3d7ffc;
  --brand-glow: rgba(0, 98, 255, .45);
}
.hm.light {
  --brand: #0062ff;
  --brand-glow: rgba(0, 98, 255, .28);
}

.hm .hdr-logo,
.am .am-logo { color: var(--brand, #3d7ffc); }

/* theme.css:43 repaints the header logo for the light theme at a higher
   specificity (.hm.light .hdr-logo, and the span separately), so match it. */
.hm.light .hdr-logo,
.hm.light .hdr-logo span { color: var(--brand); }

.hm .hdr-logo .hm-mark,
.am .am-logo .hm-mark { flex-shrink: 0; filter: drop-shadow(0 0 10px var(--brand-glow)); }

/* ---- header: signed-in account menu -------------------------------------- */
/* Reuses the language-switcher chrome (.hdr-lg / .lg-menu / .lg-it); the
   prototype only ever rendered a signed-out "Đăng nhập" button. */
.hm .hdr-acc .hdr-lg-btn { font: 500 14px 'Space Grotesk', sans-serif; letter-spacing: 0; }
.hm .hdr-acc .lg-menu { width: 230px; }
.hm .hdr-acc .lg-it em { font-size: 13px; }

/* ---- login popup: light theme ------------------------------------------- */
/*
 * The design prototype never themed this dialog — theme.css has no `.am` rule
 * at all, so the popup stayed dark on a light page. Most of auth.css already
 * reads --tx/--mu/--dim/--ln/--ln2, so redefining those does most of the work.
 *
 * The variables are redefined on .am-main, not .am: the left panel is artwork
 * (matrix rain, glowing fingerprint core, dashed rings, floating ID chips) that
 * only reads on a dark ground, so it deliberately stays dark in both themes.
 */
.hm.light .am-bg {
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(0, 98, 255, .10), transparent 70%),
    rgba(15, 20, 36, .38);
}

.hm.light .am-card {
  background: #fff;
  border-color: rgba(15, 20, 36, .10);
  box-shadow: 0 50px 160px -30px rgba(15, 20, 36, .3), 0 0 0 1px rgba(15, 20, 36, .04) inset;
}

.hm.light .am-main {
  --tx: #0F1424;
  --mu: #5A6376;
  --dim: #8A93A6;
  --ln: rgba(15, 20, 36, .10);
  --ln2: rgba(15, 20, 36, .16);
  background: #fff;
  color: var(--tx);
}

/* The left panel stays dark in both themes, so the logo on it keeps the
   dark-surface brand tint even when the page is light. */
.hm.light .am-side { --brand: #3d7ffc; --brand-glow: rgba(0, 98, 255, .45); }

.hm.light .am-main .am-in { background: #F5F7FB; }
.hm.light .am-main .am-in:hover { border-color: rgba(15, 20, 36, .26); }
.hm.light .am-main .am-in:focus {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(139, 108, 255, .16);
}
.hm.light .am-main .am-x { background: rgba(15, 20, 36, .04); }
.hm.light .am-main .am-x:hover { background: rgba(15, 20, 36, .09); }
.hm.light .am-main .am-pw button:hover { background: rgba(15, 20, 36, .06); }

/* The dark error pink (#FF8FA3) washes out on white. */
.hm.light .am-main .am-err {
  border-color: rgba(193, 18, 63, .22);
  background: rgba(193, 18, 63, .06);
  color: #C1123F;
}

/* ---- primary CTA in the light theme -------------------------------------- */
/*
 * .btn-glow was drawn for the dark page: a spinning conic-gradient ring around
 * a near-black pill. theme.css:34-37 only repaints the pill white and dims the
 * ring, which on a light page leaves a pale outlined button with no weight.
 *
 * Light theme instead gets a filled brand-gradient pill: white text, a drifting
 * gradient, a sheen sweep (same idea as .hdr-cta::after in header.css) and a
 * brand-blue shadow. The conic ring is kept as a tight lit rim plus a soft aura
 * so the button still belongs to the same family as its dark counterpart.
 */
.hm.light .btn-glow { color: #fff !important; }

.hm.light .btn-glow > span {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(100deg, #0062ff 0%, #6D5BF5 48%, #00C2A8 100%);
  background-size: 220% 100%;
  box-shadow:
    0 12px 32px -12px rgba(0, 98, 255, .65),
    inset 0 1px 0 rgba(255, 255, 255, .38);
  animation: hm-cta-pan 7s ease-in-out infinite alternate;
}

/* Sheen sweep across the pill. */
.hm.light .btn-glow > span::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-20deg);
  animation: hm-cta-shine 4s ease-in-out infinite;
}

.hm.light .btn-glow:hover > span {
  background-position: 100% 0;
  box-shadow:
    0 18px 42px -12px rgba(0, 98, 255, .8),
    inset 0 1px 0 rgba(255, 255, 255, .5);
}

/* Tight lit rim; the blurred copy becomes a soft coloured aura on white.
   Rim stays at the design's -1.5px so it does not overpower the small
   .fy-btn variant of this button. */
.hm.light .btn-glow::before { opacity: .95; }
.hm.light .btn-glow::after { opacity: .5; filter: blur(16px); }

@keyframes hm-cta-pan { to { background-position: 100% 0; } }
@keyframes hm-cta-shine { 0% { left: -60%; } 55%, 100% { left: 140%; } }

@media (prefers-reduced-motion: reduce) {
  .hm.light .btn-glow > span,
  .hm.light .btn-glow > span::after { animation: none !important; }
}

/* ---- login popup: show/hide password toggle ------------------------------ */
/* auth.css sizes .am-pw button for a short text label ("Hiện"/"Ẩn"); make it a
   square icon button instead. */
.am .am-pw button.am-eye {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  transition: color .25s, background .25s;
}
.am .am-pw button.am-eye svg { display: block; }

/* ---- forms: validation feedback ------------------------------------------ */
.am .am-err,
.hm .mx-err {
  margin: 0 0 2px;
  padding: 10px 13px;
  border-radius: 9px;
  border: 1px solid rgba(255, 107, 138, .32);
  background: rgba(255, 107, 138, .1);
  color: #FF8FA3;
  font-size: 13.5px;
  line-height: 1.45;
}
.hm .fld-err,
.hm .mx-f .err { color: #FF8FA3; font-size: 12px; }

/* ---- tables: empty state ------------------------------------------------- */
.hm .t-empty {
  padding: 40px 22px;
  text-align: center;
  color: var(--dim);
  font-size: 13.5px;
}

/* ---- seller sidebar: extra managers beyond the prototype's five ---------- */
.sb-k.sb-k-more { margin-top: 18px; }
