/* ===================================================================
   Grambl Cookie Consent
   Dark / crimson consent bar + preferences modal, reskinned from a
   competitor reference onto the Grambl PvP palette. Uses the same
   --gp-* variables as gramblpvp.css when present, with hard fallbacks
   so this still looks correct if that theme isn't the active one.
=================================================================== */

#gramblcookies-banner,
#gramblcookies-modal,
#gramblcookies-reopen {
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}
#gramblcookies-banner *,
#gramblcookies-modal *,
#gramblcookies-reopen * {
  box-sizing: border-box;
}

/* ---------- Banner ---------- */
.gp-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99990;
  background: var(--gp-surface-2, #1b1b1e);
  border-top: 2px solid var(--gp-crimson, #c8102e);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .45);
  transform: translateY(100%);
  transition: transform .35s ease;
}
.gp-cookie-banner.gp-cookie-visible {
  transform: translateY(0);
}
.gp-cookie-banner__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.gp-cookie-banner__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gp-crimson-x, #450410);
  color: var(--gp-crimson, #c8102e);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gp-cookie-banner__text {
  flex: 1 1 auto;
  min-width: 200px;
}
.gp-cookie-banner__title {
  margin: 0 0 2px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .3px;
  color: var(--gp-text, #f2efe9);
}
.gp-cookie-banner__desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--gp-text-dim, #a29fa5);
}
.gp-cookie-banner__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

/* ---------- Buttons (shared by banner + modal) ---------- */
.gp-cookie-btn {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s;
  line-height: 1;
}
.gp-cookie-btn:active {
  transform: translateY(1px);
}
.gp-cookie-btn--solid {
  background: var(--gp-crimson, #c8102e);
  border-color: var(--gp-crimson, #c8102e);
  color: #fff;
}
.gp-cookie-btn--solid:hover {
  background: var(--gp-crimson-d, #7a0819);
  border-color: var(--gp-crimson-d, #7a0819);
}
.gp-cookie-btn--ghost {
  background: transparent;
  border-color: var(--gp-steel, #302f33);
  color: var(--gp-text-dim, #a29fa5);
}
.gp-cookie-btn--ghost:hover {
  border-color: var(--gp-crimson, #c8102e);
  color: var(--gp-text, #f2efe9);
}

/* ---------- Modal ---------- */
.gp-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.gp-cookie-modal[hidden] { display: none; }
.gp-cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 6, .72);
  backdrop-filter: blur(2px);
}
.gp-cookie-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--gp-surface, #141416);
  border: 1px solid var(--gp-steel, #302f33);
  border-top: 3px solid var(--gp-crimson, #c8102e);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
}
.gp-cookie-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 12px;
}
.gp-cookie-modal__header h2 {
  margin: 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--gp-text, #f2efe9);
}
.gp-cookie-modal__close {
  background: transparent;
  border: none;
  color: var(--gp-text-faint, #6f6d72);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.gp-cookie-modal__close:hover {
  color: var(--gp-crimson, #c8102e);
}
.gp-cookie-modal__body {
  padding: 0 22px 6px;
}
.gp-cookie-modal__intro {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--gp-text-dim, #a29fa5);
}
.gp-cookie-modal__policy {
  margin: 14px 0 6px;
  font-size: 12.5px;
}
.gp-cookie-modal__policy a {
  color: var(--gp-text-dim, #a29fa5);
  text-decoration: underline;
}
.gp-cookie-modal__policy a:hover {
  color: var(--gp-crimson, #c8102e);
}

/* Category rows */
.gp-cookie-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--gp-steel, #302f33);
}
.gp-cookie-row:first-of-type {
  border-top: 1px solid var(--gp-steel, #302f33);
}
.gp-cookie-row__text {
  flex: 1 1 auto;
}
.gp-cookie-row__text h3 {
  margin: 0 0 3px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: .2px;
  color: var(--gp-text, #f2efe9);
}
.gp-cookie-row__text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--gp-text-dim, #a29fa5);
}
.gp-cookie-row__control {
  flex: 0 0 auto;
  padding-top: 2px;
}
.gp-cookie-active-badge {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #3fbf6a;
}

/* Toggle switch */
.gp-cookie-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}
.gp-cookie-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.gp-cookie-switch__track {
  position: absolute;
  inset: 0;
  background: var(--gp-steel, #302f33);
  border-radius: 999px;
  transition: background-color .15s;
}
.gp-cookie-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gp-text, #f2efe9);
  transition: transform .18s ease;
}
.gp-cookie-switch input:checked ~ .gp-cookie-switch__track {
  background: var(--gp-crimson, #c8102e);
}
.gp-cookie-switch input:checked ~ .gp-cookie-switch__track .gp-cookie-switch__thumb {
  transform: translateX(18px);
}
.gp-cookie-switch input:focus-visible ~ .gp-cookie-switch__track {
  box-shadow: 0 0 0 3px rgba(200, 16, 46, .35);
}

.gp-cookie-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--gp-steel, #302f33);
  margin-top: 6px;
}

/* ---------- Floating reopen button ---------- */
.gp-cookie-reopen {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 99980;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gp-surface, #141416);
  border: 1px solid var(--gp-steel, #302f33);
  color: var(--gp-crimson, #c8102e);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  transition: border-color .15s, transform .15s;
}
.gp-cookie-reopen[hidden] { display: none; }
.gp-cookie-reopen:hover {
  border-color: var(--gp-crimson, #c8102e);
  transform: translateY(-2px);
}

/* ---------- Small screens ---------- */
@media (max-width: 767px) {
  .gp-cookie-banner__inner {
    flex-wrap: wrap;
    padding: 14px 16px;
  }
  .gp-cookie-banner__actions {
    flex: 1 1 100%;
    justify-content: stretch;
  }
  .gp-cookie-banner__actions .gp-cookie-btn {
    flex: 1 1 0;
    text-align: center;
  }
  .gp-cookie-modal__dialog {
    max-height: calc(100vh - 24px);
  }
}
