/* FoxWiser Cookie Consent Banner */
.fw-cookie-root,
.fw-cookie-root * {
  box-sizing: border-box;
}

.fw-cookie-root {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 9999;
  padding: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text, #111827);
  pointer-events: none;
}

.fw-cookie-banner {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--border, rgba(17, 24, 39, 0.12));
  border-radius: 24px;
  background: color-mix(in srgb, var(--bg, #ffffff) 88%, transparent);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: auto;
}

html[data-theme="dark"] .fw-cookie-banner,
html[data-theme="dark"] .fw-cookie-modal-card {
  background: color-mix(in srgb, var(--bg, #081326) 84%, rgba(8, 19, 38, 0.86));
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.48);
}

.fw-cookie-copy {
  min-width: 0;
}

.fw-cookie-title {
  margin: 0 0 6px 0;
  font-size: 0.96rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text, #111827);
}

.fw-cookie-text {
  margin: 0;
  max-width: 760px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-2, #4b5563);
}

.fw-cookie-text a,
.fw-cookie-modal-card a {
  color: var(--action, #c46a2d);
  text-decoration: none;
  font-weight: 650;
}

.fw-cookie-text a:hover,
.fw-cookie-modal-card a:hover {
  text-decoration: underline;
}

.fw-cookie-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.fw-cookie-btn {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--border, rgba(17, 24, 39, 0.14));
  border-radius: 999px;
  background: transparent;
  color: var(--text, #111827);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.fw-cookie-btn:hover {
  transform: translateY(-1px);
  border-color: var(--action, #c46a2d);
}

.fw-cookie-btn-primary {
  border-color: var(--action, #c46a2d);
  background: var(--action, #c46a2d);
  color: #fff;
}

.fw-cookie-btn-ghost {
  color: var(--text-2, #4b5563);
}

.fw-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(4, 8, 18, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
}

.fw-cookie-modal.is-open {
  display: grid;
}

.fw-cookie-modal-card {
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--border, rgba(17, 24, 39, 0.12));
  border-radius: 26px;
  background: var(--bg, #ffffff);
  color: var(--text, #111827);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.34);
  pointer-events: auto;
}

.fw-cookie-modal-head {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 22px 12px;
}

.fw-cookie-modal-head h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  line-height: 1.2;
}

.fw-cookie-modal-head p {
  margin: 0;
  color: var(--text-2, #4b5563);
  font-size: 0.86rem;
  line-height: 1.5;
}

.fw-cookie-close {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--border, rgba(17, 24, 39, 0.12));
  border-radius: 999px;
  background: transparent;
  color: var(--text, #111827);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.fw-cookie-options {
  display: grid;
  gap: 10px;
  padding: 10px 22px 18px;
}

.fw-cookie-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border, rgba(17, 24, 39, 0.12));
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface, #ffffff) 72%, transparent);
}

.fw-cookie-option h3 {
  margin: 0 0 4px;
  font-size: 0.92rem;
  line-height: 1.35;
}

.fw-cookie-option p {
  margin: 0;
  color: var(--text-2, #4b5563);
  font-size: 0.78rem;
  line-height: 1.45;
}

.fw-cookie-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
}

.fw-cookie-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.fw-cookie-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.44);
  cursor: pointer;
  transition: background 0.18s ease;
  z-index: 1;
}

.fw-cookie-slider::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease;
}

.fw-cookie-switch input:checked + .fw-cookie-slider {
  background: var(--action, #c46a2d);
}

.fw-cookie-switch input:checked + .fw-cookie-slider::after {
  transform: translateX(20px);
}

.fw-cookie-switch input:disabled + .fw-cookie-slider {
  opacity: 0.72;
  cursor: not-allowed;
}

.fw-cookie-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 0 22px 22px;
}

@media (max-width: 760px) {
  .fw-cookie-root { padding: 10px; }
  .fw-cookie-banner {
    width: min(100%, calc(100vw - 20px));
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
  }
  .fw-cookie-actions {
    justify-content: stretch;
  }
  .fw-cookie-btn {
    flex: 1 1 100%;
  }
  .fw-cookie-modal-actions .fw-cookie-btn {
    flex: 1 1 100%;
  }
}
