/* Privacy settings button and window: copy of the underhost.com widget (styles.dev.css). Keep in step with the website. */
/* UnderHost privacy settings widget */
.uh-privacy-fab {
  position: fixed;
  left: 40px;
  bottom: 26px;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: 1px solid rgba(145,232,255,0.72);
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,0.62) 0 12%, rgba(103,225,255,0.78) 13% 30%, transparent 31%),
    linear-gradient(145deg, #20d5ff 0%, #00a9ef 46%, #006fba 100%);
  box-shadow: 0 14px 28px rgba(0,169,239,0.28), 0 0 0 4px rgba(0,196,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  z-index: 2147482999;
  transition: transform .2s ease, box-shadow .2s ease;
}

.uh-privacy-fab[hidden],
.uh-privacy-modal[hidden] {
  display: none !important;
}

.uh-privacy-fab:hover,
.uh-privacy-fab:focus-visible {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 18px 34px rgba(0,196,255,0.34), 0 0 0 6px rgba(0,196,255,0.11);
  outline: none;
}

.uh-privacy-fab img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 999px;
  padding: 4px;
  background: rgba(255,255,255,0.94);
  box-shadow: inset 0 0 0 1px rgba(0,113,186,0.12), 0 4px 10px rgba(0,54,91,0.22);
  display: block;
}

.uh-privacy-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2147483002;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.uh-privacy-modal.is-open {
  display: flex;
}

.uh-privacy-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.58);
}

.uh-privacy-panel {
  position: relative;
  width: min(625px, calc(100vw - 32px));
  max-height: min(730px, calc(100vh - 48px));
  background: #fff;
  color: #111827;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.34);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.uh-privacy-panel::before {
  content: "";
  height: 4px;
  background: linear-gradient(90deg, #002b5c, #00aeef);
  flex: 0 0 auto;
}

.uh-privacy-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px 18px;
}

.uh-privacy-head h2 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.25;
  color: #0f172a;
  font-weight: 800;
}

.uh-privacy-head p {
  margin: 0;
  color: #263244;
  font-size: 12px;
  line-height: 1.55;
}

.uh-privacy-links {
  display: flex;
  gap: 20px;
  margin-top: 14px;
}

.uh-privacy-links a {
  color: #0f172a;
  font-size: 11px;
  text-decoration: none;
}

.uh-privacy-links a:hover {
  color: #0064c8;
}

.uh-privacy-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  position: relative;
  margin-top: -4px;
}

.uh-privacy-close span,
.uh-privacy-close span::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 17px;
  height: 2px;
  background: #111827;
  transform: rotate(45deg);
}

.uh-privacy-close span::after {
  left: 0;
  right: 0;
  top: 0;
  transform: rotate(90deg);
}

.uh-privacy-close:hover {
  background: #f3f4f6;
}

.uh-privacy-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #eef1f5;
  border-bottom: 1px solid #d9dde4;
  background: #fbfdff;
}

.uh-privacy-tabs button {
  height: 48px;
  border: 0;
  background: #fff;
  color: #111827;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  position: relative;
}

.uh-privacy-tabs button.is-active {
  color: #0057bd;
}

.uh-privacy-tabs button.is-active::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 3px;
  background: #0057bd;
}

.uh-privacy-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px 24px;
  scrollbar-color: #8aa4bf #eef3f8;
  scrollbar-width: thin;
}

.uh-privacy-card {
  border: 1px solid #d7dce4;
  border-radius: 5px;
  padding: 17px 12px 17px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 1px 0 rgba(15,23,42,0.03);
}

.uh-privacy-card:has(input:checked:not(:disabled)) {
  border-color: rgba(0,110,210,0.34);
  background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
}

.uh-privacy-card h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.uh-privacy-card p {
  margin: 0;
  color: #536070;
  font-size: 11px;
  line-height: 1.55;
}

.uh-privacy-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.uh-privacy-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.uh-privacy-switch span {
  width: 38px;
  height: 20px;
  border-radius: 999px;
  background: #cfd4dc;
  position: relative;
  transition: background .18s ease;
}

.uh-privacy-switch span::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.22);
  transition: transform .18s ease;
}

.uh-privacy-switch input:checked + span {
  background: #0057bd;
}

.uh-privacy-switch input:checked + span::before {
  transform: translateX(18px);
}

.uh-privacy-switch.is-locked {
  cursor: default;
}

.uh-privacy-switch.is-locked input:checked + span {
  background: #cfd4dc;
}

.uh-privacy-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  background: #eef6ff;
  color: #0057bd;
  font-size: 11px;
  font-weight: 800;
}

.uh-privacy-pill.is-off {
  background: #f3f4f6;
  color: #6b7280;
}

.uh-privacy-pill.is-required {
  background: #edfdf5;
  color: #047857;
}

.uh-privacy-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  padding: 12px 24px;
  border-top: 1px solid #e5e7eb;
  background: #fbfdff;
}

.uh-privacy-btn {
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  background: #f3f4f6;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.uh-privacy-btn:hover {
  background: #e8ebef;
}

.uh-privacy-btn-primary {
  background: #00aeef;
  color: #fff;
}

.uh-privacy-btn-primary:hover {
  background: #0091d6;
}

body.uh-privacy-lock {
  overflow: hidden !important;
}

@media (max-width: 640px) {
  .uh-privacy-fab {
    left: 14px;
    bottom: 14px;
    width: 48px;
    height: 48px;
  }

  .uh-privacy-modal {
    padding: 12px;
    align-items: flex-end;
  }

  .uh-privacy-panel {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 10px;
  }

  .uh-privacy-head,
  .uh-privacy-body {
    padding: 18px;
  }

  .uh-privacy-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .uh-privacy-actions {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 18px 18px;
  }
}

/* CustomerPanel: sit above the cart's phone total bar */
body:has(.cart-mbar) .uh-privacy-fab { bottom: 96px; }
@media (min-width: 768px) { body:has(.cart-mbar) .uh-privacy-fab { bottom: 26px; } }
