/* ธีมเทศกาล (app/festive.php + assets/festive.js) — ชั้นเอฟเฟกต์คลิกทะลุได้ + ป้ายทักทายมุมซ้ายล่าง */
#festive-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;   /* คลิกทะลุ — ไม่บังปุ่ม / ตาราง / กราฟ */
  z-index: 9000;
}

.festive-chip {
  position: fixed;
  left: 16px;   /* ฝั่งซ้าย — หน้าแดชบอร์ด JS จะเลื่อนให้พ้น sidebar */
  bottom: 16px;
  z-index: 9001;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  padding: 6px 6px 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #E3E6EB;
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.10);
  font: 500 0.82rem/1.2 'Inter', 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #101828;
  backdrop-filter: blur(6px);
  animation: festive-in 0.5s ease-out both;
}
.festive-chip.has-floor { bottom: 64px; }   /* เทศกาลที่มีของวางที่ขอบล่าง (ฟักทอง / สายน้ำ) */

.festive-emoji { font-size: 1.05rem; line-height: 1; }
.festive-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
  transition: max-width 0.4s ease, opacity 0.3s ease;
}
.festive-chip { transition: left 0.25s ease; }
.festive-chip.is-min .festive-text { max-width: 0; opacity: 0; }
.festive-chip.is-min:hover .festive-text,
.festive-chip.is-min:focus-within .festive-text { max-width: 320px; opacity: 1; }
.festive-chip.no-text .festive-text { display: none; }

.festive-toggle {
  flex: none;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: #F3F5F8;
  color: #667085;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
}
.festive-toggle:hover { background: #E3E6EB; color: #101828; }
.festive-toggle:focus-visible { outline: 2px solid #2A78D6; outline-offset: 2px; }

/* 🎄 หมวกซานต้าบนโลโก้ (วางบนยอดขาซ้ายของตัว K) */
.festive-hat-wrap { position: relative; display: inline-flex; flex-shrink: 0; line-height: 0; }
.festive-hat {
  position: absolute;
  left: 0;
  top: -30%;
  width: 54%;
  transform: rotate(-12deg);
  transform-origin: 30% 80%;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 1px 1px rgba(16, 24, 40, 0.18));
}
.festive-hat svg { display: block; width: 100%; height: auto; }
.festive-hat-wrap.is-full .festive-hat { left: 22%; top: -3%; width: 30%; }

@keyframes festive-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .festive-chip { left: 12px; bottom: 12px; font-size: 0.76rem; }
  .festive-chip.has-floor { bottom: 52px; }
  .festive-text { max-width: 200px; }
  .festive-chip.is-min:hover .festive-text { max-width: 200px; }
}

@media print {
  #festive-canvas, .festive-chip { display: none !important; }
}

/* ของตกแต่งโลโก้ของเทศกาลอื่น (ค่าเริ่มต้นของ .festive-hat = หมวกซานต้า) */
.festive-decor-halloween { left: -2%; top: -40%; width: 62%; transform: rotate(-10deg); }
.festive-hat-wrap.is-full .festive-decor-halloween { left: 20%; top: -12%; width: 32%; }
.festive-decor-cny { left: 62%; top: -34%; width: 44%; transform: none; transform-origin: 50% 0; animation: festive-swing 2.6s ease-in-out infinite; }
.festive-hat-wrap.is-full .festive-decor-cny { left: 60%; top: 2%; width: 18%; }
.festive-decor-valentine { left: -4%; top: -40%; width: 108%; transform: none; }
.festive-hat-wrap.is-full .festive-decor-valentine { left: 25%; top: 2%; width: 50%; }
.festive-decor-songkran { left: -6%; top: 20%; width: 112%; transform: none; filter: none; }
.festive-hat-wrap.is-full .festive-decor-songkran { left: 27%; top: 22%; width: 48%; }
.festive-decor-loykrathong { left: 58%; top: 52%; width: 60%; transform: none; }
.festive-hat-wrap.is-full .festive-decor-loykrathong { left: 66%; top: 46%; width: 22%; }
@keyframes festive-swing { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .festive-decor-cny { animation: none; } }
