/* =====================================================================
   POG.VN – B1 TOPBAR (nền POG Navy – đổi từ Dark theo yêu cầu 2026-11-17)
   Markup: template-parts/topbar.php
   Máy tính: 3 cam kết · hotline + liên kết nhanh. Điện thoại ≤ 992px: 1 dòng xoay vòng.
   Cập nhật: 2026-11-17 (B1). Chỉ dùng biến --pog-*.
   ===================================================================== */
.pog-tb {
  --tb-bg: var(--pog-navy);
  --tb-fg: rgba(255, 255, 255, 0.94);
  --tb-muted: rgba(255, 255, 255, 0.78);
  --tb-strong: var(--pog-white);
  --tb-accent: var(--pog-primary);
  --tb-sep: rgba(255, 255, 255, 0.22);
  --tb-h: 36px;

  background: var(--tb-bg);
  color: var(--tb-fg);
  font-family: var(--pog-font);
  font-size: 12.5px;
  font-weight: var(--pog-fw-medium);
  line-height: 1;
}

.pog-tb__inner {
  max-width: var(--pog-container);
  margin: 0 auto;
  padding: 0 var(--pog-gutter);
  height: var(--pog-tb-h, var(--tb-h));
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pog-space-4);
}

.pog-tb svg {
  width: 14px;
  height: 14px;
  flex: none;
  fill: none;
  stroke: var(--tb-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pog-tb strong {
  color: var(--tb-strong);
  font-weight: var(--pog-fw-bold);
}

/* ---------- Bên trái: cam kết ---------- */
.pog-tb__usp {
  display: flex;
  align-items: center;
  gap: var(--pog-space-4);
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pog-tb__usp li {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}
.pog-tb__usp li + li::before {
  content: "";
  width: 3px;
  height: 3px;
  margin-right: var(--pog-space-4);
  border-radius: 50%;
  background: var(--tb-sep);
}

/* ---------- Bên phải: hotline + liên kết ---------- */
.pog-tb__links {
  display: flex;
  align-items: center;
  flex: none;
}
.pog-tb__links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--tb-h);
  padding: 0 var(--pog-space-3);
  color: var(--tb-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--pog-transition-fast);
}
.pog-tb__links a:hover {
  color: var(--tb-strong);
}
.pog-tb__links a + a {
  border-left: 1px solid var(--tb-sep);
}
.pog-tb__links a:last-child {
  padding-right: 0;
}
.pog-tb__links .pog-tb__hotline {
  color: var(--tb-strong);
  font-weight: var(--pog-fw-bold);
}

.pog-tb a:focus-visible {
  outline: 2px solid var(--tb-accent);
  outline-offset: -2px;
  border-radius: 4px;
}

/* ---------- Điện thoại: 1 dòng, thông điệp xoay vòng ---------- */
.pog-tb__rotator {
  display: none;
}

@media (max-width: 992px) {
  .pog-tb {
    --tb-h: 32px;
  }
  .pog-tb__inner {
    justify-content: center;
  }
  .pog-tb__usp,
  .pog-tb__links {
    display: none;
  }
  .pog-tb__rotator {
    display: block;
    position: relative;
    width: 100%;
    height: var(--tb-h);
    overflow: hidden;
  }
  .pog-tb__rotator > * {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--tb-fg);
    text-decoration: none;
    white-space: nowrap;
    opacity: 0;
  }
  .pog-tb__rotator svg {
    width: 13px;
    height: 13px;
  }

  /* 1 thông điệp: đứng yên */
  .pog-tb__rotator--1 > * { opacity: 1; }

  /* 2 thông điệp: chu kỳ 8s */
  .pog-tb__rotator--2 > * { animation: pogTbRotate2 8s infinite; }
  .pog-tb__rotator--2 > :nth-child(2) { animation-delay: 4s; }

  /* 3 thông điệp: chu kỳ 12s */
  .pog-tb__rotator--3 > * { animation: pogTbRotate3 12s infinite; }
  .pog-tb__rotator--3 > :nth-child(2) { animation-delay: 4s; }
  .pog-tb__rotator--3 > :nth-child(3) { animation-delay: 8s; }
}

@keyframes pogTbRotate3 {
  0%       { opacity: 0; transform: translateY(6px); visibility: visible; }
  4%, 30%  { opacity: 1; transform: none; }
  34%, 100% { opacity: 0; transform: translateY(-6px); visibility: hidden; }
}
@keyframes pogTbRotate2 {
  0%       { opacity: 0; transform: translateY(6px); visibility: visible; }
  6%, 45%  { opacity: 1; transform: none; }
  51%, 100% { opacity: 0; transform: translateY(-6px); visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .pog-tb__rotator > * {
    animation: none !important;
  }
  .pog-tb__rotator > :first-child {
    opacity: 1;
  }
}
