/* =========================================================
   PDPA — Cookie Consent banner + Privacy (legal) page
   ========================================================= */

/* ---------- Cookie Consent Banner ---------- */
.cookie-consent {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9999;
  padding: 16px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  animation: cookieUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes cookieUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
.cookie-consent__inner {
  pointer-events: auto;
  width: 100%;
  max-width: 1080px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(20, 24, 31, 0.18), 0 4px 12px rgba(20, 24, 31, 0.08);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-consent__body { flex: 1; min-width: 260px; }
.cookie-consent__title {
  font-family: 'Prompt', 'IBM Plex Sans Thai', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #1a1a1a;
}
.cookie-consent__text {
  font-size: 13.5px;
  line-height: 1.7;
  color: #555;
  margin: 0;
}
.cookie-consent__text a { color: var(--red, #E5343F); font-weight: 600; text-decoration: underline; }
.cookie-consent__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.cookie-btn {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 10px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.cookie-btn:hover { transform: translateY(-1px); }
.cookie-btn--primary { background: var(--red, #E5343F); color: #fff; }
.cookie-btn--primary:hover { background: #c92b35; }
.cookie-btn--ghost { background: #fff; color: #333; border-color: #d9d9d9; }
.cookie-btn--ghost:hover { border-color: #1a1a1a; }

/* ---------- Preferences (granular toggles) ---------- */
.cookie-prefs { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.cookie-pref {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fafafa;
}
.cookie-pref__info { display: flex; flex-direction: column; gap: 3px; }
.cookie-pref__name { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.cookie-pref__desc { font-size: 12px; color: #777; line-height: 1.55; }

.cookie-toggle {
  flex-shrink: 0;
  width: 46px; height: 26px;
  border-radius: 999px;
  background: #cfcfcf;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 0;
  transition: background 0.2s ease;
}
.cookie-toggle span {
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}
.cookie-toggle--on { background: var(--red, #E5343F); }
.cookie-toggle--on span { transform: translateX(20px); }
.cookie-toggle--locked { background: #b8b8b8; cursor: not-allowed; opacity: 0.85; }

@media (max-width: 720px) {
  .cookie-consent { padding: 10px; }
  .cookie-consent__inner { padding: 18px; gap: 16px; }
  .cookie-consent__actions { width: 100%; }
  .cookie-consent__actions .cookie-btn { flex: 1; text-align: center; }
}

/* ---------- Legal / Privacy page ---------- */
.legal { max-width: 820px; margin: 0 auto; }
.legal__updated {
  display: inline-block;
  font-size: 12.5px;
  color: #888;
  background: #f3f3f3;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.legal p { font-size: 15px; line-height: 1.85; color: #3a3a3a; margin: 0 0 14px; }
.legal__h2 {
  font-family: 'Prompt', 'IBM Plex Sans Thai', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 34px 0 12px;
  padding-left: 14px;
  border-left: 4px solid var(--red, #E5343F);
}
.legal__list { margin: 0 0 16px; padding-left: 22px; }
.legal__list li { font-size: 15px; line-height: 1.8; color: #3a3a3a; margin-bottom: 8px; }
.legal a { color: var(--red, #E5343F); font-weight: 600; text-decoration: underline; }
.legal__cta { margin-top: 40px; padding-top: 28px; border-top: 1px solid #ececec; }

/* ---------- Footer legal links ---------- */
.footer__legal {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.footer__legal a {
  color: #888;
  font-size: 12px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.footer__legal a:hover { color: var(--red, #E5343F); }
