/* =========================
   COOKIE BANNER (CRYSIS HUD)
   ========================= */

/* Banner default hidden (JS shows it) */
.cookie-banner{
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;

  display: none;

  background:
    linear-gradient(180deg, rgba(255,255,255,.05), transparent 40%),
    linear-gradient(0deg, rgba(0,0,0,.55), transparent 55%),
    var(--panel);

  border: 1px solid var(--stroke);
  box-shadow: var(--shadow2);
  border-radius: 6px;
  overflow: hidden;

  color: var(--text);
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}

/* inner bevel */
.cookie-banner::before{
  content:"";
  position:absolute; inset:0;
  border-top: 1px solid rgba(255,255,255,.06);
  border-left: 1px solid rgba(255,255,255,.04);
  border-right: 1px solid rgba(0,0,0,.65);
  border-bottom: 1px solid rgba(0,0,0,.80);
  pointer-events:none;
}

/* subtle HUD corners */
.cookie-banner::after{
  content:"";
  position:absolute; inset:0;
  background:
    linear-gradient(var(--accent), var(--accent)) left 10px top 10px / 22px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left 10px top 10px / 2px 22px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 10px top 10px / 22px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 10px top 10px / 2px 22px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left 10px bottom 10px / 22px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left 10px bottom 10px / 2px 22px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 10px bottom 10px / 22px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 10px bottom 10px / 2px 22px no-repeat;
  opacity:.14;
  filter: drop-shadow(0 0 10px rgba(255,42,42,.22));
  pointer-events:none;
}

.cookie-banner__inner{
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px;
  flex-wrap: wrap;
}

.cookie-banner__text{
  font-size: 13px;
  line-height: 1.45;
  max-width: 980px;
  color: rgba(255,255,255,.82);
}

.cookie-banner__text strong{
  color: rgba(255,255,255,.92);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.cookie-banner__link{
  color: var(--accent);
  text-decoration:none;
  font-weight: 800;
  letter-spacing: .04em;
}
.cookie-banner__link:hover{
  color:#fff;
}

/* Actions wrap */
.cookie-banner__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* Buttons: inherit your global button look, but we keep cookie class hooks */
.cookie-btn{
  appearance:none;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)),
    rgba(0,0,0,.30);
  color: rgba(255,255,255,.92);
  padding: 8px 14px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor:pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, var(--shadow2);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease, background .12s ease;
}

.cookie-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,42,42,.45);
  box-shadow:
    0 1px 0 rgba(255,255,255,.07) inset,
    0 0 0 2px rgba(255,42,42,.10),
    0 0 22px rgba(255,42,42,.16),
    0 16px 34px rgba(0,0,0,.58);
  background:
    linear-gradient(180deg, rgba(255,42,42,.16), rgba(255,42,42,.04)),
    rgba(0,0,0,.30);
}

.cookie-btn--primary{
  border-color: rgba(255,42,42,.60);
  background:
    linear-gradient(180deg, rgba(255,42,42,.24), rgba(255,42,42,.06)),
    rgba(0,0,0,.30);
}

.cookie-btn--ghost{
  background: transparent;
}

/* =========================
   COOKIE MODAL (CRYSIS HUD)
   ========================= */

.cookie-modal{
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: none;   /* JS sets to grid */

  background:
    radial-gradient(900px 520px at 18% 30%, rgba(255,42,42,.12), transparent 62%),
    radial-gradient(900px 520px at 82% 70%, rgba(255,42,42,.10), transparent 60%),
    rgba(0,0,0,.65);

  padding: 18px;
  place-items: center;
}

.cookie-modal__box{
  width: min(560px, 100%);
  position: relative;
  overflow:hidden;

  background:
    linear-gradient(180deg, rgba(255,255,255,.05), transparent 40%),
    linear-gradient(0deg, rgba(0,0,0,.55), transparent 55%),
    var(--panel);

  border: 1px solid var(--stroke);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

/* inner bevel */
.cookie-modal__box::before{
  content:"";
  position:absolute; inset:0;
  border-top: 1px solid rgba(255,255,255,.06);
  border-left: 1px solid rgba(255,255,255,.04);
  border-right: 1px solid rgba(0,0,0,.65);
  border-bottom: 1px solid rgba(0,0,0,.80);
  pointer-events:none;
}

/* HUD corners */
.cookie-modal__box::after{
  content:"";
  position:absolute; inset:0;
  background:
    linear-gradient(var(--accent), var(--accent)) left 12px top 12px / 22px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left 12px top 12px / 2px 22px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 12px top 12px / 22px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 12px top 12px / 2px 22px no-repeat;
  opacity:.16;
  filter: drop-shadow(0 0 10px rgba(255,42,42,.24));
  pointer-events:none;
}

.cookie-modal__header{
  position: relative;
  z-index: 1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.cookie-modal__header strong{
  letter-spacing:.10em;
  text-transform: uppercase;
  font-weight: 950;
  font-size: 13px;
}

.cookie-x{
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.30);
  color: rgba(255,255,255,.92);
  cursor: pointer;
  font-size: 18px;
  line-height: 34px;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, var(--shadow2);
}
.cookie-x:hover{
  transform: translateY(-1px);
  border-color: rgba(255,42,42,.45);
  box-shadow:
    0 1px 0 rgba(255,255,255,.07) inset,
    0 0 0 2px rgba(255,42,42,.10),
    0 0 18px rgba(255,42,42,.14),
    0 16px 34px rgba(0,0,0,.58);
}

/* Body */
.cookie-modal__body{
  position: relative;
  z-index: 1;
  padding: 14px;
  display: grid;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,.82);
}

/* Switch rows */
.cookie-switch{
  display:flex;
  gap: 10px;
  align-items:center;
  padding: 10px 10px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 6px;
  background: rgba(0,0,0,.30);
}

/* checkboxes a bit bigger and tinted */
.cookie-switch input[type="checkbox"]{
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.cookie-hint{
  font-size: 12px;
  color: rgba(255,255,255,.62);
  margin-top: 6px;
}

/* Footer */
.cookie-modal__footer{
  position: relative;
  z-index: 1;
  display:flex;
  gap: 10px;
  justify-content:flex-end;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.10);
}

/* Mobile: stack cookie buttons */
@media (max-width: 520px){
  .cookie-banner__actions{ width: 100%; justify-content: flex-end; }
  .cookie-btn{ width: 100%; }
}


/* =========================
   COOKIE HUD ANIMATION
   ========================= */

.cookie-banner,
.cookie-modal{
  will-change: transform, opacity;
}

/* Banner animation states */
.cookie-banner{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}

/* When JS shows banner, add this class */
.cookie-banner.is-open{
  opacity: 1;
  transform: translateY(0);
}

/* Modal overlay */
.cookie-modal{
  opacity: 0;
  transition: opacity .16s ease;
}

/* Modal box animation */
.cookie-modal__box{
  transform: translateY(10px) scale(.985);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}

/* Open state */
.cookie-modal.is-open{
  opacity: 1;
}

.cookie-modal.is-open .cookie-modal__box{
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .cookie-banner,
  .cookie-modal,
  .cookie-modal__box{
    transition: none !important;
    transform: none !important;
  }
}
