/* ແຈ້ງການຄຸກກີ້ (components/cookie_consent.php, js/cookie_consent.js) — ມີແຕ່ປຸ່ມຍອມຮັບ, ມຸມກາດ 4px
   1) .ck  = ແຖບລຸ່ມຈໍ ຍາວ ບໍ່ສູງ ສີຟ້າເຂັ້ມແບບແກ້ວ ລອຍກາງຈໍ (ໂທລະສັບ: ເຕັມຄວາມກວ້າງ)
   ສີ: ຟ້າ (--primary) + ເຫຼືອງ (--accent) ຂອງເວັບ */

/* ===== 1) ແຖບລຸ່ມຈໍ ===== */
.ck {
  position: fixed; left: 50%; bottom: 20px; z-index: 1250; width: min(1040px, calc(100vw - 200px));   /* ບໍ່ທັບປຸ່ມແຊັດລອຍທາງຂວາ */
  font-family: var(--font); opacity: 0; transform: translate(-50%, 24px); transition: opacity .35s, transform .5s cubic-bezier(.2, 1.25, .4, 1);
}
.ck[hidden] { display: none; }
.ck.is-on { opacity: 1; transform: translateX(-50%); }
.ck.is-bye { opacity: 0; transform: translate(-50%, 20px); transition-duration: .3s; transition-timing-function: ease-in; }

.ck-card {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 9px 10px 9px 14px;
  border-radius: 4px; color: #e2e8f0;
  background: linear-gradient(100deg, rgba(11, 31, 77, .95), rgba(15, 23, 42, .95) 60%);
  border: 1px solid rgba(147, 197, 253, .18);
  box-shadow: 0 18px 44px -14px rgba(2, 6, 23, .6);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  overflow: hidden;
}
.ck-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--primary, #1d4ed8) 0 70%, var(--accent, #f59e0b) 70%); }

/* ໂລ່ກຳບັງ + ໂລໂກ້ */
.ck-shield { position: relative; flex: none; display: grid; place-items: center; filter: drop-shadow(0 4px 10px rgba(59, 130, 246, .45)); }
.ck .ck-shield { animation: ckShield 3.6s ease-in-out infinite; }
.ck-shield svg { position: absolute; inset: 0; }
.ck-shield img { position: relative; height: auto; margin-top: -8%; object-fit: contain; }
@keyframes ckShield { 0%, 70%, 100% { transform: none; } 78% { transform: rotate(-8deg) scale(1.06); } 86% { transform: rotate(6deg); } 93% { transform: rotate(-2deg); } }

.ck-text { flex: 1; min-width: 0; margin: 0; font-size: .82rem; line-height: 1.55; color: #e2e8f0; }
.ck-text a { margin-left: .3rem; font-weight: 700; color: #fde68a; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.ck-text a:hover { color: #facc15; }

.ck-actions { flex: none; display: flex; align-items: center; gap: 6px; }

/* ປຸ່ມ (ໃຊ້ທັງແຖບ ແລະ popup) */
.ck-btn { font: inherit; font-size: .82rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer; height: 40px; padding: 0 16px; border-radius: 4px; white-space: nowrap; transition: background .2s, transform .15s, box-shadow .2s, color .2s, border-color .2s; }
.ck-btn:active { transform: scale(.97); }
.ck-btn:focus-visible { outline: 2px solid #facc15; outline-offset: 2px; }
.ck-btn-main { min-width: 120px; background: var(--primary, #1d4ed8); color: #fff; box-shadow: 0 0 0 1px rgba(147, 197, 253, .35) inset, 0 8px 18px -6px rgba(29, 78, 216, .8); }
.ck-btn-main:hover { background: #2563eb; }

/* ===== ຂະໜາດຈໍ ===== */
@media (max-width: 900px) {
  .ck-btn { padding: 0 12px; }
}
@media (max-width: 600px) {
  .ck { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); width: auto; transform: translateY(120%); }
  .ck.is-on { transform: none; }
  .ck.is-bye { transform: translateY(120%); }
  .ck-card { flex-wrap: wrap; gap: 10px; padding: 11px 11px 13px; }
  .ck-text { flex: 1 1 calc(100% - 60px); font-size: .8rem; }   /* ຢູ່ຂ້າງໂລ່ (42px + ຊ່ອງ) */
  .ck-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
  .ck-btn { padding: 0 8px; font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ck, .ck .ck-shield { animation: none !important; transition-duration: .01s !important; }
}
@media print { .ck { display: none !important; } }
