/* iPoolGo cookie preferences */
.cookie-consent[hidden],
.cookie-preferences[hidden] {
  display: none !important;
}

.cookie-consent {
  position: fixed;
  z-index: 12000;
  inset: auto 0 0;
  color: #ffffff;
  font-family: var(--font-body, "Poppins", sans-serif);
}

.cookie-consent-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 5vw, 80px);
  width: calc(100% - 32px);
  max-width: 1380px;
  margin: 0 auto 16px;
  padding: 24px 26px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  align-items: center;
  background: #071f27;
  box-shadow: 0 20px 50px rgba(2, 18, 24, 0.25);
}

.cookie-consent-copy > span,
.cookie-preferences-head span {
  display: block;
  margin-bottom: 7px;
  color: #d4ff39;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.cookie-consent-copy h2,
.cookie-preferences-head h2 {
  margin: 0;
  color: #ffffff;
  font-family: var(--font-title, "Sora", sans-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.cookie-consent-copy p {
  max-width: 760px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  line-height: 1.65;
}

.cookie-consent-actions,
.cookie-preferences-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cookie-button {
  display: inline-flex;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: transparent;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.cookie-button--plain {
  padding-right: 10px;
  padding-left: 10px;
  color: rgba(255, 255, 255, 0.7);
}

.cookie-button--outline {
  border-color: rgba(255, 255, 255, 0.34);
}

.cookie-button--primary {
  color: #071f27;
  background: #d4ff39;
}

.cookie-preferences {
  position: fixed;
  z-index: 12010;
  display: grid;
  inset: 0;
  place-items: center;
}

.cookie-preferences-backdrop {
  position: absolute;
  border: 0;
  inset: 0;
  background: rgba(1, 15, 20, 0.66);
}

.cookie-preferences-panel {
  position: relative;
  display: flex;
  width: min(calc(100% - 32px), 620px);
  max-height: calc(100vh - 40px);
  max-height: calc(100svh - 40px);
  overflow: hidden;
  padding: 30px;
  border-radius: 6px;
  flex-direction: column;
  color: #0b252e;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(1, 15, 20, 0.28);
}

.cookie-preferences-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
}

.cookie-preferences-head span {
  color: #6e8a00;
}

.cookie-preferences-head h2 {
  color: #081b21;
  font-size: 26px;
}

.cookie-preferences-close {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #dfe7e6;
  border-radius: 50%;
  color: #0b252e;
  background: #ffffff;
  font-size: 18px;
  place-items: center;
}

.cookie-preferences-intro {
  max-width: 510px;
  margin: 16px 0 0;
  color: #65797f;
  font-size: 11px;
  line-height: 1.7;
}

.cookie-preference-list {
  min-height: 0;
  overflow-y: auto;
  margin-top: 28px;
  border-top: 1px solid #dfe7e6;
}

.cookie-preference-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  min-height: 94px;
  padding: 20px 0;
  border-bottom: 1px solid #dfe7e6;
  align-items: center;
}

.cookie-preference-row strong {
  display: block;
  color: #0b252e;
  font-size: 12px;
}

.cookie-preference-row p {
  max-width: 410px;
  margin: 6px 0 0;
  color: #718388;
  font-size: 10px;
  line-height: 1.6;
}

.cookie-required {
  color: #74868b;
  font-size: 9px;
  font-weight: 600;
}

.cookie-switch {
  position: relative;
  display: block;
  width: 42px;
  height: 24px;
}

.cookie-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.cookie-switch > span {
  position: absolute;
  border-radius: 999px;
  inset: 0;
  background: #d9e1e0;
  transition: background-color 160ms ease;
}

.cookie-switch > span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  content: "";
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(1, 20, 28, 0.2);
  transition: transform 160ms ease;
}

.cookie-switch input:checked + span {
  background: #0b252e;
}

.cookie-switch input:checked + span::after {
  transform: translateX(18px);
}

.cookie-switch input:focus-visible + span {
  outline: 2px solid #82a800;
  outline-offset: 2px;
}

.cookie-preferences-actions {
  flex: 0 0 auto;
  margin-top: 26px;
  justify-content: flex-end;
}

.cookie-preferences-actions .cookie-button--outline {
  border-color: #b9c7c6;
  color: #0b252e;
}

.footer-cookie-settings {
  padding: 0;
  border: 0;
  color: rgba(255, 255, 255, 0.54);
  background: transparent;
  font: inherit;
}

.footer-cookie-settings:hover {
  color: #ffffff;
}

@media (max-width: 900px) {
  .cookie-consent-banner {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .cookie-consent-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 600px) {
  .cookie-consent-banner {
    width: calc(100% - 20px);
    margin-bottom: 10px;
    padding: 20px;
  }

  .cookie-consent-copy h2 {
    font-size: 18px;
  }

  .cookie-consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .cookie-button {
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
  }

  .cookie-button--plain {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .cookie-preferences-panel {
    width: calc(100% - 20px);
    max-height: calc(100svh - 20px);
    padding: 24px 20px;
  }

  .cookie-preferences-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-switch > span,
  .cookie-switch > span::after {
    transition: none;
  }
}
