/* First-party Vista cookie consent UI (ported from VistaWebsiteBuild_WF CookieConsent.astro) */

/* Banner */
.vcc-banner {
  font-family: "Manrope", system-ui, sans-serif;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99998;
  background: linear-gradient(180deg, rgba(14, 18, 22, 0.93) 0%, rgba(8, 10, 13, 0.985) 100%);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.6);
  animation: vcc-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}
.vcc-banner[hidden] { display: none; }

/* Persistent Cookie Settings button */
.vcc-fab {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 99990;
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(178, 44, 46, 0.5);
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(20, 25, 28, 0.92) 0%, rgba(10, 13, 16, 0.96) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fafafa;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  animation: vcc-fab-in 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.vcc-fab[hidden] { display: none; }
.vcc-fab svg { width: 20px; height: 20px; display: block; }
.vcc-fab:hover {
  transform: translateY(-2px) scale(1.06);
  border-color: #b22c2e;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(178, 44, 46, 0.5), 0 0 44px rgba(178, 44, 46, 0.25);
}
.vcc-fab:active { transform: translateY(0) scale(1.02); }
.vcc-fab:focus-visible { outline: 2px solid #4dd3d1; outline-offset: 3px; }

@keyframes vcc-fab-in {
  from { transform: translateY(10px) scale(0.8); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@media (max-width: 600px) {
  .vcc-fab { width: 2.75rem; height: 2.75rem; left: 0.9rem; bottom: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .vcc-fab { animation: none; transition: none; }
  .vcc-fab:hover { transform: none; }
}

.vcc-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(178, 44, 46, 0.9) 20%,
    rgba(235, 170, 31, 0.9) 45%,
    rgba(181, 217, 238, 0.9) 70%,
    transparent 100%
  );
  background-size: 220% 100%;
  animation: vcc-sweep 7s linear infinite;
}

.vcc-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(130% 150% at 50% 115%, rgba(178, 44, 46, 0.16), transparent 62%);
}

@keyframes vcc-rise {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes vcc-sweep {
  0% { background-position: 220% 0; }
  100% { background-position: -220% 0; }
}

.vcc-banner__inner {
  position: relative;
  z-index: 1;
  width: min(1200px, 100% - clamp(2rem, 6vw, 2.5rem));
  margin: 0 auto;
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.vcc-chip {
  position: relative;
  display: inline-block;
  padding: 0.2rem 0.85rem;
  margin-bottom: 0.55rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fafafa;
}
.vcc-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #b22c2e;
  transform: skewX(-30deg);
  z-index: -1;
}

.vcc-banner__title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fafafa;
  margin: 0 0 0.35rem !important;
  text-transform: none;
  text-shadow: none;
}

.vcc-banner__text {
  font-size: 0.85rem;
  line-height: 1.65;
  color: rgba(250, 250, 250, 0.72);
  max-width: 76ch;
  margin: 0;
  text-shadow: none;
}

.vcc-banner__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.vcc-btn {
  position: relative;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0.65rem 1.6rem;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fafafa;
  white-space: nowrap;
  transition: color 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 0;
}
.vcc-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: skewX(-30deg);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  z-index: -1;
}
.vcc-btn:hover { transform: translateY(-1px); }
.vcc-btn:active { transform: translateY(0); }

.vcc-btn--primary::before { background: #b22c2e; }
.vcc-btn--primary:hover::before {
  background: #c93336;
  box-shadow: 0 0 22px rgba(178, 44, 46, 0.65), 0 0 48px rgba(178, 44, 46, 0.32);
}
.vcc-btn--pulse::before { animation: vcc-pulse 2.4s ease-in-out infinite; }
@keyframes vcc-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(178, 44, 46, 0); }
  50% { box-shadow: 0 0 20px rgba(178, 44, 46, 0.6), 0 0 45px rgba(178, 44, 46, 0.3); }
}

.vcc-btn--ghost::before {
  background: rgba(250, 250, 250, 0.045);
  border: 1px solid rgba(250, 250, 250, 0.22);
}
.vcc-btn--ghost:hover::before {
  background: rgba(250, 250, 250, 0.1);
  border-color: rgba(250, 250, 250, 0.55);
  box-shadow: 0 0 18px rgba(250, 250, 250, 0.08);
}
.vcc-btn:focus-visible { outline: 2px solid #4dd3d1; outline-offset: 3px; }

/* Preferences dialog */
.vcc-modal {
  font-family: "Manrope", system-ui, sans-serif;
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  text-align: left;
}
.vcc-modal[hidden] { display: none; }

.vcc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: vcc-fade 0.3s ease;
}
@keyframes vcc-fade { from { opacity: 0; } to { opacity: 1; } }

.vcc-modal__panel {
  position: relative;
  width: min(700px, 100%);
  max-height: min(86vh, 900px);
  overflow-y: auto;
  background: linear-gradient(165deg, rgba(20, 25, 28, 0.97) 0%, rgba(10, 13, 16, 0.99) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(178, 44, 46, 0.3);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  animation: vcc-pop 0.42s cubic-bezier(0.16, 1, 0.3, 1), vcc-border-cycle 16s ease-in-out infinite;
  scrollbar-width: thin;
  scrollbar-color: rgba(178, 44, 46, 0.5) transparent;
  color: #fafafa;
}
.vcc-modal__panel::-webkit-scrollbar { width: 8px; }
.vcc-modal__panel::-webkit-scrollbar-thumb {
  background: rgba(178, 44, 46, 0.45);
  border-radius: 999px;
}

@keyframes vcc-pop {
  from { transform: translateY(22px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes vcc-border-cycle {
  0%, 100% {
    border-color: rgba(178, 44, 46, 0.3);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 26px rgba(178, 44, 46, 0.1), 0 0 60px rgba(178, 44, 46, 0.05);
  }
  33% {
    border-color: rgba(235, 170, 31, 0.3);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 26px rgba(235, 170, 31, 0.1), 0 0 60px rgba(235, 170, 31, 0.05);
  }
  66% {
    border-color: rgba(181, 217, 238, 0.3);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 26px rgba(181, 217, 238, 0.1), 0 0 60px rgba(181, 217, 238, 0.05);
  }
}

.vcc-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.vcc-modal__title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fafafa;
  margin: 0 !important;
  text-transform: none;
  text-shadow: none;
}

.vcc-modal__close {
  background: none;
  border: none;
  color: rgba(250, 250, 250, 0.55);
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  transition: color 0.25s ease, transform 0.25s ease;
}
.vcc-modal__close:hover { color: #b22c2e; transform: rotate(90deg); }
.vcc-modal__close:focus-visible { outline: 2px solid #4dd3d1; outline-offset: 2px; }

.vcc-modal__intro {
  font-size: 0.86rem;
  line-height: 1.7;
  color: rgba(250, 250, 250, 0.65);
  margin: 0 0 1.1rem;
  max-width: none;
  text-shadow: none;
}
.vcc-modal__intro a {
  color: #b5d9ee;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.vcc-modal__intro a:hover { color: #fafafa; }

.vcc-modal__gpc,
.vcc-modal__record {
  font-size: 0.8rem;
  line-height: 1.6;
  padding: 0.5rem 0 0.5rem 0.85rem;
  margin: 0 0 1.1rem;
  max-width: none;
  text-shadow: none;
}
.vcc-modal__gpc { color: #b5d9ee; border-left: 2px solid #b5d9ee; }
.vcc-modal__record { color: #7cc8a1; border-left: 2px solid #7cc8a1; }

.vcc-cats { display: flex; flex-direction: column; gap: 0.45rem; }

.vcc-cat {
  position: relative;
  border: 1px solid rgba(250, 250, 250, 0.08);
  background: rgba(250, 250, 250, 0.022);
  padding: 1.05rem 1.15rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.vcc-cat:hover {
  border-color: rgba(178, 44, 46, 0.32);
  background: rgba(250, 250, 250, 0.038);
}

.vcc-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
}

.vcc-cat__name {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fafafa;
  margin: 0 !important;
}
.vcc-cat__name label { cursor: pointer; }

.vcc-cat__always {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7cc8a1;
  flex-shrink: 0;
}

.vcc-cat__desc {
  font-size: 0.8rem;
  line-height: 1.65;
  color: rgba(250, 250, 250, 0.55);
  margin: 0;
  max-width: none;
  text-shadow: none;
}

.vcc-disc { margin-top: 0.7rem; }
.vcc-disc summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(181, 217, 238, 0.85);
  transition: color 0.2s ease;
}
.vcc-disc summary::-webkit-details-marker { display: none; }
.vcc-disc summary::before {
  content: "+";
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 0.25s ease;
}
.vcc-disc[open] summary::before { content: "\2212"; }
.vcc-disc summary:hover { color: #fafafa; }
.vcc-disc summary:focus-visible { outline: 2px solid #4dd3d1; outline-offset: 2px; }

.vcc-disc__none {
  margin: 0.7rem 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: rgba(250, 250, 250, 0.35);
  text-shadow: none;
}

.vcc-table {
  width: 100%;
  margin-top: 0.7rem;
  border-collapse: collapse;
  font-size: 0.72rem;
  line-height: 1.5;
}
.vcc-table th {
  text-align: left;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250, 250, 250, 0.48);
  font-weight: 600;
  padding: 0.3rem 0.55rem 0.3rem 0;
  border-bottom: 1px solid rgba(250, 250, 250, 0.1);
}
.vcc-table td {
  padding: 0.45rem 0.55rem 0.45rem 0;
  color: rgba(250, 250, 250, 0.65);
  border-bottom: 1px solid rgba(250, 250, 250, 0.05);
  vertical-align: top;
}
.vcc-table code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  color: #ebaa1f;
  white-space: nowrap;
}

/* Toggle */
.vcc-switch { position: relative; flex-shrink: 0; display: inline-flex; cursor: pointer; }
.vcc-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.vcc-switch__track {
  width: 46px;
  height: 25px;
  border-radius: 999px;
  background: rgba(250, 250, 250, 0.12);
  border: 1px solid rgba(250, 250, 250, 0.2);
  display: block;
  position: relative;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.vcc-switch__nob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fafafa;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.vcc-switch input:checked + .vcc-switch__track {
  background: #b22c2e;
  border-color: #b22c2e;
  box-shadow: 0 0 16px rgba(178, 44, 46, 0.5), inset 0 0 8px rgba(255, 255, 255, 0.12);
}
.vcc-switch input:checked + .vcc-switch__track .vcc-switch__nob {
  transform: translateX(21px);
}
.vcc-switch input:focus-visible + .vcc-switch__track {
  outline: 2px solid #4dd3d1;
  outline-offset: 2px;
}

.vcc-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(250, 250, 250, 0.08);
  flex-wrap: wrap;
}

body.vcc-locked { overflow: hidden; }

@media (max-width: 900px) {
  .vcc-banner__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1.05rem;
    padding: 1.2rem 0 1.35rem;
  }
  .vcc-banner__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .vcc-banner__actions .vcc-btn { width: 100%; text-align: center; }
  .vcc-banner__actions [data-vcc="settings"] { order: 3; grid-column: 1 / -1; }

  .vcc-modal__foot {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .vcc-modal__foot .vcc-btn { width: 100%; text-align: center; }
  .vcc-btn { min-height: 46px; padding: 0.7rem 1.1rem; }
  .vcc-banner__text { font-size: 0.82rem; }

  .vcc-table, .vcc-table tbody, .vcc-table tr, .vcc-table td { display: block; width: 100%; }
  .vcc-table thead { display: none; }
  .vcc-table tr {
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(250, 250, 250, 0.07);
  }
  .vcc-table td { border: none; padding: 0.12rem 0; }
  .vcc-table td::before {
    content: attr(data-label) " ";
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(250, 250, 250, 0.38);
  }
}

@media (hover: none), (max-width: 900px) {
  .vcc-switch {
    min-width: 46px;
    min-height: 46px;
    align-items: center;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vcc-banner,
  .vcc-banner::before,
  .vcc-modal__panel,
  .vcc-modal__backdrop,
  .vcc-btn--pulse::before { animation: none !important; }
  .vcc-switch__nob,
  .vcc-btn,
  .vcc-modal__close { transition: none; }
}
