/* =========================================================
   Thapanee Cookie Consent - GDPR/ePrivacy friendly banner
   Brand: Peach buttons, brown text, white background
   ========================================================= */
:root {
  --tt-cookie-peach: #f3c9b5;
  --tt-cookie-peach-dark: #d99c82;
  --tt-cookie-brown: #5b3828;
  --tt-cookie-brown-soft: #7a5545;
  --tt-cookie-cream: #fffaf7;
  --tt-cookie-line: #eaded6;
  --tt-cookie-shadow: 0 24px 70px rgba(57, 34, 25, 0.22);
}

.tt-cookie-hidden { display: none !important; }

.tt-cookie-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(61, 39, 30, 0.42);
  backdrop-filter: blur(5px);
}

.tt-cookie-modal {
  width: min(980px, 100%);
  max-height: min(88vh, 820px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: #fff;
  color: var(--tt-cookie-brown);
  box-shadow: var(--tt-cookie-shadow);
  border: 1px solid rgba(243, 201, 181, 0.65);
  font-family: inherit, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tt-cookie-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 22px 28px;
  border-bottom: 1px solid var(--tt-cookie-line);
  background: linear-gradient(180deg, #fff, var(--tt-cookie-cream));
}

.tt-cookie-brand {
  font-weight: 800;
  letter-spacing: .02em;
  font-size: 20px;
  color: var(--tt-cookie-brown);
}

.tt-cookie-badge {
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff2ec;
  color: var(--tt-cookie-brown-soft);
  font-size: 13px;
  border: 1px solid #f6d8ca;
  white-space: nowrap;
}

.tt-cookie-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--tt-cookie-line);
  background: #fff;
}

.tt-cookie-tab {
  border: 0;
  border-bottom: 3px solid transparent;
  background: #fff;
  color: var(--tt-cookie-brown-soft);
  padding: 16px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}

.tt-cookie-tab:hover,
.tt-cookie-tab.is-active {
  color: var(--tt-cookie-brown);
  background: #fffaf7;
  border-bottom-color: var(--tt-cookie-peach-dark);
}

.tt-cookie-content {
  overflow: auto;
  padding: 26px 28px 18px;
  line-height: 1.65;
}

.tt-cookie-panel { display: none; }
.tt-cookie-panel.is-active { display: block; }

.tt-cookie-title {
  margin: 0 0 10px;
  color: var(--tt-cookie-brown);
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.25;
}

.tt-cookie-text {
  margin: 0 0 14px;
  color: var(--tt-cookie-brown-soft);
  font-size: 15.5px;
}

.tt-cookie-link {
  color: var(--tt-cookie-brown);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tt-cookie-category-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.tt-cookie-category {
  border: 1px solid var(--tt-cookie-line);
  border-radius: 14px;
  background: #fffaf7;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}

.tt-cookie-category h4 {
  margin: 0 0 4px;
  color: var(--tt-cookie-brown);
  font-size: 16px;
}

.tt-cookie-category p {
  margin: 0;
  color: var(--tt-cookie-brown-soft);
  font-size: 14px;
}

.tt-cookie-switch {
  position: relative;
  display: inline-flex;
  width: 58px;
  height: 32px;
  flex-shrink: 0;
}

.tt-cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.tt-cookie-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d8c8bf;
  border-radius: 999px;
  transition: .2s ease;
}

.tt-cookie-slider:before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 4px;
  top: 4px;
  border-radius: 50%;
  background: #fff;
  transition: .2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.16);
}

.tt-cookie-switch input:checked + .tt-cookie-slider {
  background: var(--tt-cookie-peach-dark);
}

.tt-cookie-switch input:checked + .tt-cookie-slider:before {
  transform: translateX(26px);
}

.tt-cookie-switch input:disabled + .tt-cookie-slider {
  cursor: not-allowed;
  background: #c8b1a5;
  opacity: .75;
}

.tt-cookie-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 18px 28px 24px;
  border-top: 1px solid var(--tt-cookie-line);
  background: #fff;
}

.tt-cookie-btn {
  min-height: 50px;
  border-radius: 12px;
  border: 1px solid var(--tt-cookie-peach-dark);
  background: var(--tt-cookie-peach);
  color: var(--tt-cookie-brown);
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.tt-cookie-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(217, 156, 130, .25);
  background: #f7d6c6;
}

.tt-cookie-btn--ghost {
  background: #fff;
}

.tt-cookie-btn--ghost:hover {
  background: #fff7f2;
}

.tt-cookie-settings-btn {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 99990;
  border: 1px solid var(--tt-cookie-peach-dark);
  border-radius: 999px;
  background: #fff;
  color: var(--tt-cookie-brown);
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(57, 34, 25, .13);
  cursor: pointer;
}

.tt-cookie-settings-btn:hover { background: #fff7f2; }

.tt-cookie-mini-list {
  margin: 12px 0 0 18px;
  padding: 0;
  color: var(--tt-cookie-brown-soft);
}

@media (max-width: 720px) {
  .tt-cookie-overlay {
    align-items: flex-end;
    padding: 10px;
  }
  .tt-cookie-modal {
    max-height: 92vh;
    border-radius: 18px 18px 14px 14px;
  }
  .tt-cookie-head {
    padding: 18px;
    align-items: flex-start;
    flex-direction: column;
  }
  .tt-cookie-tabs {
    grid-template-columns: 1fr;
  }
  .tt-cookie-tab {
    padding: 12px;
    text-align: left;
    border-bottom-width: 1px;
  }
  .tt-cookie-content {
    padding: 20px 18px 14px;
  }
  .tt-cookie-category {
    grid-template-columns: 1fr;
  }
  .tt-cookie-actions {
    grid-template-columns: 1fr;
    padding: 14px 18px 18px;
  }
  .tt-cookie-settings-btn {
    left: 12px;
    bottom: 12px;
  }
}
