/* Cookie settings dialog — matches the PETPAL consent panel. */
.cookie-root,
.cookie-launcher,
.cookie-bar {
  font-family: "Kanit", "Futura PT", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

html[lang="en"] .cookie-root,
html[lang="en"] .cookie-launcher,
html[lang="en"] .cookie-bar {
  font-family: "Futura PT", "Kanit", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.cookie-root,
.cookie-root *,
.cookie-launcher,
.cookie-launcher *,
.cookie-bar,
.cookie-bar * {
  box-sizing: border-box;
}

body.cookie-pending {
  padding-bottom: var(--cookie-bar-space, 110px);
}

body.cookie-open {
  overflow: hidden;
}

body.cookie-open .cookie-launcher {
  display: none;
}

.cookie-root {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 4000;
  place-items: center;
  padding: 20px;
}

.cookie-root.is-open {
  display: grid;
}

.cookie-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 9, 0.72);
}

.cookie-dialog {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(180deg, rgba(237, 193, 139, 0.14), transparent 72px),
    #100e0b;
  color: #efe1d5;
  border: 1px solid rgba(237, 193, 139, 0.28);
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: 0 28px 70px rgba(9, 9, 9, 0.55), inset 0 1px 0 rgba(237, 193, 139, 0.18);
}

.cookie-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cookie-head h2 {
  margin: 0;
  color: #efe1d5;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

.cookie-x {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: -6px -6px 0 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #edc18b;
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.cookie-x:hover {
  background: rgba(237, 193, 139, 0.14);
}

.cookie-lead {
  margin: 8px 0 16px;
  color: #c6ac8d;
  font-size: 0.92rem;
  line-height: 1.65;
}

.cookie-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cookie-card {
  border: 1px solid rgba(137, 103, 65, 0.18);
  border-radius: 12px;
  padding: 14px 16px 16px;
  background: #efe1d5;
}

.cookie-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-card h3 {
  margin: 0;
  color: #090909;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.cookie-card p {
  margin: 8px 0 0;
  color: #896741;
  font-size: 0.9rem;
  line-height: 1.65;
}

.cookie-badge {
  flex: 0 0 auto;
  padding: 4px 12px;
  border-radius: 999px;
  background: #af6a19;
  color: #efe1d5;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
}

.cookie-switch {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
}

.cookie-switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.cookie-switch-track {
  display: block;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #5c4a38;
  transition: background 0.2s ease;
}

.cookie-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #efe1d5;
  box-shadow: 0 1px 3px rgba(9, 9, 9, 0.35);
  transition: transform 0.2s ease;
}

.cookie-switch input:checked + .cookie-switch-track {
  background: #ca8627;
}

.cookie-switch input:checked + .cookie-switch-track::after {
  transform: translateX(20px);
}

.cookie-switch input:focus-visible + .cookie-switch-track {
  outline: 2px solid #edc18b;
  outline-offset: 3px;
}

.cookie-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.cookie-policy {
  color: #edc18b;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-policy:hover {
  color: #efe1d5;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 22px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cookie-btn:active {
  transform: translateY(0) scale(0.98);
}

.cookie-btn--confirm {
  border-color: rgba(237, 193, 139, 0.55);
  background: rgba(237, 193, 139, 0.06);
  color: #edc18b;
}

.cookie-btn--confirm:hover {
  border-color: #edc18b;
  background: rgba(237, 193, 139, 0.14);
  color: #efe1d5;
  transform: translateY(-1px);
}

.cookie-btn--all {
  background: linear-gradient(135deg, #edc18b 0%, #ca8627 52%, #af6a19 100%);
  color: #090909;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(202, 134, 39, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cookie-btn--all:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(202, 134, 39, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  filter: brightness(1.05);
}

.cookie-root :focus-visible {
  outline: 2px solid #edc18b;
  outline-offset: 2px;
}

.cookie-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 18px clamp(18px, 3vw, 36px) calc(18px + env(safe-area-inset-bottom));
  background: #090909;
  color: #efe1d5;
  border-top: 1px solid rgba(237, 193, 139, 0.28);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.28);
}

.cookie-bar.is-on {
  display: flex;
}

.cookie-bar-copy {
  min-width: 0;
  max-width: 760px;
}

.cookie-bar-copy h2 {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
}

.cookie-bar-copy p {
  margin: 0;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.6;
}

.cookie-bar-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: #edc18b;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.cookie-bar-link:hover {
  color: #efe1d5;
}

.cookie-bar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.cookie-bar-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid rgba(198, 172, 141, 0.55);
  border-radius: 999px;
  padding: 10px 22px;
  background: rgba(239, 225, 213, 0.04);
  color: #efe1d5;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.cookie-bar-btn:hover {
  transform: translateY(-2px);
  border-color: #c6ac8d;
  background: #896741;
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(137, 103, 65, 0.9);
}

#cookieReject {
  border-color: rgba(237, 193, 139, 0.35);
  background: rgba(237, 193, 139, 0.1);
  color: #edc18b;
}

#cookieReject:hover {
  border-color: #efe1d5;
  background: #efe1d5;
  color: #090909;
  box-shadow: 0 10px 22px -12px rgba(239, 225, 213, 0.7);
}

.cookie-bar-btn--accept {
  border-color: transparent;
  background: linear-gradient(135deg, #edc18b 0%, #ca8627 55%, #af6a19 100%);
  color: #090909;
  font-weight: 600;
  box-shadow: 0 10px 24px -10px rgba(202, 134, 39, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cookie-bar-btn--accept::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.cookie-bar-btn--accept:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #edc18b 0%, #ca8627 55%, #af6a19 100%);
  color: #090909;
  box-shadow: 0 14px 30px -10px rgba(202, 134, 39, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cookie-bar-btn--accept:hover::after {
  transform: translateX(120%);
}

.cookie-bar :focus-visible {
  outline: 2px solid #edc18b;
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .cookie-bar.is-on {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .cookie-bar-actions {
    flex-wrap: wrap;
  }
}

.cookie-launcher {
  display: none;
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 900;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(237, 193, 139, 0.45);
  border-radius: 999px;
  background: #090909;
  color: #efe1d5;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.cookie-launcher.is-on {
  display: inline-flex;
}

.cookie-launcher svg {
  width: 18px;
  height: 18px;
  fill: #ca8627;
}

.cookie-launcher:hover {
  background: #1a140e;
}

@media (max-width: 560px) {
  .cookie-root {
    padding: 12px;
    align-items: end;
  }

  .cookie-dialog {
    padding: 18px 16px 16px;
  }

  .cookie-foot,
  .cookie-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-actions {
    margin-left: 0;
  }

  .cookie-btn {
    width: 100%;
    white-space: normal;
  }

  .cookie-launcher {
    left: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .cookie-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  }

  .cookie-bar-actions {
    flex-wrap: wrap;
  }

  .cookie-bar-btn {
    flex: 1 1 auto;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-switch-track,
  .cookie-switch-track::after,
  .cookie-btn,
  .cookie-bar-btn,
  .cookie-bar-btn--accept::after {
    transition: none;
  }

  .cookie-bar-btn:hover {
    transform: none;
  }

  .cookie-btn:hover,
  .cookie-btn:active {
    transform: none;
  }
}
