/* BLVKHONGMINH 1.0.3 — app layout (approved "Mẫu A"). Layout only: colours, fonts and artwork come from style.css.
   Computers (≥1101px): fixed left column with logo, menu, vertical channel list and login; video + chat beside it.
   Tablets / phones: channels scroll sideways under the logo, menu becomes a bottom tab bar. */

/* Homepage blocks become items of one grid */
body.jk-a.home .stage,body.jk-a.home .grid,body.jk-a.home .grid>.col{display:contents}
body.jk-a.home .stage-main{grid-area:video;min-width:0}
body.jk-a.home .chat-panel{grid-area:chat;min-width:0}
body.jk-a.home .match-shell{grid-area:match}
body.jk-a.home .grid>.col:first-child>.panel:not(.match-shell){grid-area:others}
body.jk-a.home .grid>aside.col>*{grid-area:sched}
body.jk-a.home #tran-hay{grid-area:clips}
body.jk-a.home #tin-tuc{grid-area:news}
body.jk-a.home .wrap>header.top{grid-area:head}
body.jk-a.home .wrap>.site-foot{grid-area:foot}
body.jk-a.home .wrap{align-items:start}
.jk-watch{display:none}

/* ---------- Computers ---------- */
@media (min-width:1101px){
  body.jk-a .wrap{max-width:1900px;margin:0;padding-left:calc(268px + 22px);padding-right:22px;padding-top:0}
  body.jk-a:not(.home) .wrap{padding-top:22px}
  body.jk-a:not(.home) .wrap>*:not(header){max-width:1320px}
  body.jk-a .wrap>header.top{position:fixed;left:0;top:0;bottom:0;width:268px;z-index:50;overflow:auto;scrollbar-width:thin;
    display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start;gap:18px;
    margin:0;padding:22px 18px 18px;border:0;border-right:1px solid var(--line);
    background:linear-gradient(180deg,var(--surface),var(--bg) 70%)}
  body.jk-a .wrap>header.top::after{display:none}
  body.jk-a header.top>.brand{flex:none;flex-direction:column;align-items:flex-start;gap:10px}
  body.jk-a header.top>.brand .logo .brand-rooster{width:58px;height:58px}
  body.jk-a header.top .wordmark{font-size:34px}

  /* menu: vertical list */
  body.jk-a header.top>.mainnav{order:1;display:grid;grid-template-columns:1fr;gap:2px;margin:0;padding:8px 0;
    border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:transparent}
  body.jk-a header.top>.mainnav a{display:flex;align-items:center;justify-content:flex-start;gap:10px;padding:10px 12px;text-align:left;
    border:0;border-left:3px solid transparent;border-radius:0}
  body.jk-a header.top>.mainnav a:is(.on,:hover,:focus-visible){border-left-color:var(--ball)}

  /* channel list */
  body.jk-a header.top>.courts{order:2;display:grid;grid-template-columns:1fr;grid-auto-flow:row;grid-auto-columns:auto;gap:8px;
    margin:0;padding:0;background:none;border:0;overflow:visible}
  body.jk-a header.top>.courts::before{content:"KÊNH TRỰC TIẾP";font:700 12px/1 var(--display);letter-spacing:.16em;color:var(--muted);padding:2px 2px 4px}
  body.jk-a header.top>.courts .ct{padding:10px 12px}
  body.jk-a header.top>.courts .ct-blv,body.jk-a header.top>.courts .ct-foot{display:none}

  /* "watch live" shortcut on inner pages */
  body.jk-a header.top>.jk-watch{order:2;display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 14px;
    background:var(--ball);color:#fff;text-decoration:none;font:800 15px/1 var(--display);letter-spacing:.08em;text-transform:uppercase;border-radius:4px}
  body.jk-a header.top>.jk-watch:hover{background:var(--ball-ink)}
  .jk-watch-dot{width:8px;height:8px;border-radius:50%;background:#fff;animation:ct-blink 1.2s ease-in-out infinite}

  /* login / sign-up: highlighted card right under the logo */
  body.jk-a header.top>.brand{order:0}
  body.jk-a header.top>.right{order:1;margin:0;flex:none}
  body.jk-a header.top>.mainnav{order:2}
  body.jk-a header.top>.courts,body.jk-a header.top>.jk-watch{order:3}
  body.jk-a header.top .auth.auth-buttons{position:relative;display:grid;grid-template-columns:1fr;gap:8px;padding:12px;
    border:1px solid color-mix(in srgb,var(--ball) 55%,transparent);border-radius:6px;
    background:radial-gradient(120% 90% at 100% 0,color-mix(in srgb,var(--ball) 26%,transparent),transparent 60%),linear-gradient(160deg,#2a141b,#17121a);
    box-shadow:0 10px 28px -14px color-mix(in srgb,var(--ball) 80%,transparent)}
  body.jk-a header.top .auth-action{justify-content:center;width:100%;min-height:44px;font-size:15px;border-radius:5px}
  body.jk-a header.top .auth-signup{order:1;position:relative;overflow:hidden;min-height:50px;font-size:17px;font-weight:800;letter-spacing:.03em;color:#fff;
    background:linear-gradient(100deg,#ff5fa2,var(--ball) 50%,#c2186b);border-color:var(--ball);
    animation:blv-su-glow 2.4s ease-in-out infinite;text-shadow:0 1px 0 #0004}
  body.jk-a header.top .auth-signup::after{animation:blv-su-sweep 3.6s ease-in-out infinite}
  body.jk-a header.top .auth-signup svg{animation:blv-su-pop 3.6s ease-in-out infinite;color:#fff}
  body.jk-a header.top .auth-login{order:2;background:#ffffff08;border:1px solid #ffffff2e;color:#fff}
  body.jk-a header.top .auth-login:hover{border-color:var(--ball);background:#ffffff12}

  /* homepage grid: video | chat, then match + schedule, other lobbies, highlights, news */
  body.jk-a.home .wrap{grid-template-columns:minmax(0,1fr) 340px;
    grid-template-areas:"video chat" "match sched" "others sched" "clips clips" "news news" "foot foot";grid-template-rows:auto auto 1fr auto auto auto}
  body.jk-a.home .stage-main,body.jk-a.home .chat-panel{margin-top:22px}
  body.jk-a.home .chat-panel{align-self:stretch;min-height:440px}
  body.jk-a.home .chat-panel .chat-inner{height:100%}

  /* articles: the left column already lists the categories */
  body.jk-a .art-layout.has-left{grid-template-columns:minmax(0,1fr) 300px;grid-template-rows:none;grid-template-areas:"art right"}
  body.jk-a .art-layout.has-left>.art-left{display:none}
}

/* ---------- Tablets and phones ---------- */
@media (max-width:1100px){
  body.jk-a.home .wrap{grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "video" "chat" "match" "others" "sched" "clips" "news" "foot"}
  /* the chat box is absolutely positioned inside its panel, so the panel needs its own height in the single-column layout */
  body.jk-a.home .chat-panel{height:min(80svh,660px);min-height:420px}
  body.jk-a header.top>.courts{order:5;flex:1 0 100%;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(170px,1fr);
    overflow-x:auto;scroll-snap-type:x mandatory;padding:2px 0 4px;margin:0;background:none;border:0}
  body.jk-a header.top>.courts>.ct{scroll-snap-align:start}
  body.jk-a header.top>.courts .ct-blv,body.jk-a header.top>.courts .ct-foot{display:none}

  /* bottom tab bar */
  body.jk-a{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
  body.jk-a header.top>.mainnav{position:fixed;left:0;right:0;bottom:0;z-index:80;display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin:0;
    padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px));border:0;border-top:1px solid var(--line);border-radius:0;
    background:color-mix(in srgb,var(--bg) 94%,transparent);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:0 -8px 24px #0006}
  body.jk-a header.top>.mainnav a{display:grid;justify-items:center;gap:3px;padding:6px 4px;font-size:12px;text-align:center;
    background:transparent;border:0;border-top:2px solid transparent;border-radius:0}
  body.jk-a header.top>.mainnav a:is(.on,:hover,:focus-visible){background:transparent;border-top-color:var(--ball);color:#fff}
  body.jk-a header.top>.mainnav a .nav-icon{width:20px;height:20px}
  body.jk-a .tg-fab{bottom:calc(78px + env(safe-area-inset-bottom,0px))}
}
@media (min-width:1101px) and (prefers-reduced-motion:reduce){body.jk-a header.top .auth-signup,body.jk-a header.top .auth-signup::after,body.jk-a header.top .auth-signup svg{animation:none}}
/* laptop screens (≤ 960px tall): tighter column so all 5 channels stay visible */
@media (min-width:1101px) and (max-height:960px){
  body.jk-a .wrap>header.top{gap:12px;padding:16px 16px 14px}
  body.jk-a header.top>.brand{flex-direction:row;align-items:center;gap:10px}
  body.jk-a header.top>.brand .logo .brand-rooster{width:42px;height:42px}
  body.jk-a header.top .wordmark{font-size:27px}
  body.jk-a header.top .auth.auth-buttons{grid-template-columns:1fr 1fr;padding:10px}
  body.jk-a header.top .auth-action{min-height:40px;font-size:14px}
  body.jk-a header.top .auth-signup{min-height:40px;font-size:15px;order:2}
  body.jk-a header.top .auth-login{order:1;font-size:13px;padding-inline:6px;gap:5px}
  body.jk-a header.top .auth-signup{padding-inline:8px;gap:6px}
  body.jk-a header.top>.mainnav{padding:4px 0}
  body.jk-a header.top>.mainnav a{padding:7px 12px}
  body.jk-a header.top>.courts{gap:6px}
  body.jk-a header.top>.courts .ct{padding:8px 11px}
}

/* 1.0.15 — desktop sidebar with many channels: 6–8 channels = one-line cards (the "no match yet" line is hidden),
   9–10 channels = two columns with a live dot instead of the status label, so every channel fits on screen. */
@media (min-width:1101px){
  body.jk-a header.top>.courts:has(>.ct:nth-child(6)) .ct{padding:8px 12px}
  body.jk-a header.top>.courts:has(>.ct:nth-child(6)) .ct-match{display:none}
  body.jk-a header.top>.courts:has(>.ct:nth-child(9)){grid-template-columns:1fr 1fr;gap:6px}
  body.jk-a header.top>.courts:has(>.ct:nth-child(9))::before{grid-column:1/-1}
  body.jk-a header.top>.courts:has(>.ct:nth-child(9)) .ct-state{font-size:0;padding:0;width:9px;height:9px;min-width:0;border-radius:50%;border:0;background:#6d6068;flex:none}
  body.jk-a header.top>.courts:has(>.ct:nth-child(9)) .ct.is-live .ct-state{background:#ff3d8b;box-shadow:0 0 0 3px #ff3b4f33}
  body.jk-a header.top>.courts:has(>.ct:nth-child(9)) .ct-head{gap:6px;min-width:0}
  body.jk-a header.top>.courts:has(>.ct:nth-child(9)) .ct{position:relative;padding:8px 18px 8px 9px}
  body.jk-a header.top>.courts:has(>.ct:nth-child(9)) .ct-state{position:absolute;top:7px;right:7px}
  body.jk-a header.top>.courts:has(>.ct:nth-child(9)) .ct-head{justify-content:flex-start}
  body.jk-a header.top>.courts:has(>.ct:nth-child(9)) .ct-head .nm{min-width:0;font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  body.jk-a header.top>.courts:has(>.ct:nth-child(9)) .ct-nblv{margin:0;padding:1px 3px;font-size:9px}
  body.jk-a header.top>.courts:has(>.ct:nth-child(9)) .ct-nblv svg{width:8px;height:8px}
}
