/* ============================================================
   REvalue.vn — Giao diện mùa Giáng sinh (theo mùa, tự bật/tắt)
   Mọi rule đều nằm dưới html.xmas → chỉ có hiệu lực khi
   /js/features/christmas.js bật class (trong khung ngày lễ).
   Hết mùa: không cần gỡ file, JS tự không bật.
   Bảng màu: giữ teal thương hiệu, thêm đỏ nhung + vàng ánh kim.
   ============================================================ */
html.xmas {
  --xmas-red: #c0262d;
  --xmas-red-deep: #8f1d22;
  --xmas-gold: #e8b23a;
  --xmas-green: #15803d;
  --xmas-snow: #ffffff;
}

/* ---------- Dây đèn nhấp nháy ---------- */
html.xmas .xmas-lights {
  position: absolute;
  left: 0;
  right: 0;
  height: 22px;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  /* dây điện võng nhẹ */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='12' viewBox='0 0 56 12'%3E%3Cpath d='M0 2 Q28 12 56 2' fill='none' stroke='%23334155' stroke-width='1.4'/%3E%3C/svg%3E") repeat-x 0 0 / 56px 12px;
}
html.xmas .xmas-lights--bottom { bottom: -20px; }
html.xmas .xmas-lights--top { top: 0; }
html.xmas .xmas-lights i {
  position: relative;
  display: block;
  width: 7px;
  height: 11px;
  margin-top: 6px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--xmas-red);
  box-shadow: 0 2px 8px 1px var(--xmas-red);
  animation: xmas-twinkle 2.4s ease-in-out infinite;
}
html.xmas .xmas-lights i::before {      /* đui đèn */
  content: "";
  position: absolute;
  top: -3px;
  left: 1px;
  width: 5px;
  height: 4px;
  border-radius: 1px;
  background: #475569;
}
html.xmas .xmas-lights i:nth-child(4n+2) { background: var(--xmas-gold); box-shadow: 0 2px 8px 1px var(--xmas-gold); animation-delay: .6s; }
html.xmas .xmas-lights i:nth-child(4n+3) { background: #22c55e; box-shadow: 0 2px 8px 1px #22c55e; animation-delay: 1.2s; }
html.xmas .xmas-lights i:nth-child(4n+4) { background: #38bdf8; box-shadow: 0 2px 8px 1px #38bdf8; animation-delay: 1.8s; }
html.xmas .xmas-lights i:nth-child(odd)  { margin-top: 8px; }

@keyframes xmas-twinkle {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; box-shadow: none; }
}

/* ---------- Mũ Noel trên logo ---------- */
html.xmas .brand .logo,
html.xmas .footer-brand .logo,
html.xmas .rail-logo,
html.xmas .logo-area { position: relative; }

html.xmas .brand .logo::before,
html.xmas .footer-brand .logo::before,
html.xmas .rail-logo::before,
html.xmas #mobile-nav .logo-area::before,
html.xmas .sidebar-header .logo-area::before {
  content: "";
  position: absolute;
  top: -11px;
  left: -8px;
  width: 26px;
  height: 22px;
  transform: rotate(-22deg);
  pointer-events: none;
  z-index: 3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 26'%3E%3Cpath d='M4 20 C6 9 13 2 22 4 C26 5 28 9 29 14 L25 13 C23 9 21 9 19 11 C16 14 15 18 15 20Z' fill='%23c0262d'/%3E%3Cpath d='M15 20 C16 16 18 12 21 10' fill='none' stroke='%238f1d22' stroke-width='1.2' opacity='.6'/%3E%3Crect x='2' y='18.5' width='17' height='6' rx='3' fill='%23fff' stroke='%23e2e8f0' stroke-width='.6'/%3E%3Ccircle cx='28.5' cy='15' r='3.2' fill='%23fff' stroke='%23e2e8f0' stroke-width='.6'/%3E%3C/svg%3E") no-repeat center / contain;
}
html.xmas .rail-logo::before { top: -6px; left: -2px; }
html.xmas #mobile-nav .logo-area::before { top: -9px; left: -7px; }
html.xmas .sidebar-header .logo-area::before { top: -10px; left: -8px; }

/* ---------- Nút bật/tắt tuyết ---------- */
html.xmas .xmas-snow-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  min-width: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f766e;
  font: 600 13px/1 'Inter', system-ui, sans-serif;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
html.xmas .xmas-snow-toggle:hover { border-color: #0f766e; background: #f0fdfa; }
html.xmas .xmas-snow-toggle[aria-pressed="false"] { color: #64748b; }
html.xmas .xmas-snow-toggle[aria-pressed="false"] svg { opacity: .55; }
html.xmas .xmas-snow-toggle:focus-visible { outline: 2px solid #0f766e; outline-offset: 2px; }
html.xmas .xmas-snow-toggle svg { width: 16px; height: 16px; flex-shrink: 0; }
/* thanh rail dọc của công cụ: dạng icon vuông như các nút rail khác */
html.xmas #app-rail .xmas-snow-toggle { padding: 0; width: 40px; height: 40px; border-color: transparent; background: transparent; }
html.xmas #app-rail .xmas-snow-toggle:hover { background: #f0fdfa; border-color: transparent; }
html.xmas #app-rail .xmas-snow-toggle svg { width: 20px; height: 20px; }
/* nút trong tiêu đề panel: chỉ dùng trên mobile */
html.xmas .xmas-snow-toggle--panel { display: none; }
@media (max-width: 860px) {
  html.xmas #app-rail .xmas-snow-toggle--rail { display: none; }
  html.xmas #panel .sidebar-header .xmas-snow-toggle--panel {
    display: inline-flex;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    width: 34px;
    height: 34px;
    z-index: 3;
  }
}

/* nav trang nội dung: nhóm nút bên phải */
html.xmas .nav .xmas-nav-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Tuyết rơi (canvas phủ màn hình, không bắt chuột) ---------- */
html.xmas .xmas-snow {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9990;
}

/* ---------- Trang chủ: hero ---------- */
html.xmas .hero-section {
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(192, 38, 45, .22), transparent 70%),
    linear-gradient(135deg, #0f172a 0%, #13233f 100%);
}
html.xmas .xmas-greeting {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(232, 178, 58, .45);
  background: rgba(192, 38, 45, .18);
  color: #fde68a;
  font: 600 13px/1.3 'Inter', system-ui, sans-serif;
  letter-spacing: .01em;
}
html.xmas .xmas-greeting svg { width: 15px; height: 15px; color: var(--xmas-gold); flex-shrink: 0; }
html.xmas .hero-btn-primary { box-shadow: 0 6px 18px rgba(192, 38, 45, .28); }
html.xmas .xmas-roofsnow { fill: #f1f5f9; }

/* ---------- Footer ---------- */
html.xmas .xmas-footer-wish {
  display: block;
  margin-top: 6px;
  color: var(--xmas-red-deep);
  font-weight: 600;
}

/* ---------- Giảm chuyển động / in ấn ---------- */
@media (prefers-reduced-motion: reduce) {
  html.xmas .xmas-lights i { animation: none; }
  html.xmas .xmas-snow { display: none; }
}
@media print {
  html.xmas .xmas-lights,
  html.xmas .xmas-snow,
  html.xmas .xmas-snow-toggle,
  html.xmas .xmas-greeting { display: none !important; }
  html.xmas .brand .logo::before,
  html.xmas .footer-brand .logo::before,
  html.xmas .rail-logo::before,
  html.xmas .logo-area::before { display: none !important; }
}
