.upsc-cookie-banner,
.upsc-cookie-settings,
.upsc-consent-backdrop,
.upsc-consent-panel {
  box-sizing: border-box;
  font-family: inherit;
}

.upsc-cookie-banner[hidden],
.upsc-cookie-settings[hidden],
.upsc-consent-backdrop[hidden] {
  display: none !important;
}

.upsc-cookie-banner {
  position: fixed;
  z-index: 2147483600;
  right: 18px;
  bottom: 18px;
  left: 18px;
  width: min(860px, calc(100% - 36px));
  margin: 0 auto;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(245, 184, 0, .36);
  border-radius: 18px;
  background: #091526;
  color: #f8fafc;
  box-shadow: 0 24px 80px rgba(3, 12, 24, .34);
}

.upsc-cookie-copy h2 {
  margin: 0 0 3px;
  color: #fff;
  font-size: 14.5px;
  line-height: 1.25;
  letter-spacing: -.2px;
}

.upsc-cookie-copy p {
  max-width: 640px;
  margin: 0;
  color: #b9c5d5;
  font-size: 12.5px;
  line-height: 1.45;
}

.upsc-cookie-copy a,
.upsc-consent-policy a {
  color: #f5c84b;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.upsc-cookie-actions,
.upsc-consent-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.upsc-cookie-button,
.upsc-cookie-settings,
.upsc-consent-close {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.upsc-cookie-button {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.upsc-cookie-primary {
  background: #f5b800;
  color: #091526;
}

.upsc-cookie-primary:hover {
  background: #ffc72e;
}

.upsc-cookie-secondary {
  border: 1px solid #40516a;
  background: #14243a;
  color: #edf2f8;
}

.upsc-cookie-secondary:hover {
  border-color: #617590;
  background: #1a2d47;
}

.upsc-cookie-button:focus-visible,
.upsc-cookie-settings:focus-visible,
.upsc-consent-close:focus-visible,
.upsc-consent-choice input:focus-visible {
  outline: 3px solid rgba(245, 184, 0, .55);
  outline-offset: 3px;
}

.upsc-cookie-settings {
  position: fixed;
  z-index: 2147483500;
  left: 12px;
  bottom: 12px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cad2dc;
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  color: #27364a;
  box-shadow: 0 7px 24px rgba(9, 21, 38, .13);
  font-size: 11px;
  font-weight: 750;
}

.upsc-cookie-settings:hover {
  border-color: #9daabd;
  background: #fff;
}

.upsc-consent-backdrop {
  position: fixed;
  z-index: 2147483640;
  inset: 0;
  padding: 20px;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(4, 12, 24, .72);
  backdrop-filter: blur(5px);
}

.upsc-consent-panel {
  width: min(610px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 25px;
  border: 1px solid #dde3eb;
  border-radius: 20px;
  background: #fff;
  color: #17243a;
  box-shadow: 0 28px 100px rgba(2, 11, 23, .4);
}

.upsc-consent-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.upsc-consent-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #916800;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1.15px;
  text-transform: uppercase;
}

.upsc-consent-head h2 {
  margin: 0 0 7px;
  color: #091526;
  font-size: 25px;
  line-height: 1.17;
  letter-spacing: -.65px;
}

.upsc-consent-head p {
  margin: 0;
  color: #647187;
  font-size: 13px;
  line-height: 1.6;
}

.upsc-consent-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eef1f5;
  color: #27364a;
  font-size: 25px;
  line-height: 1;
}

.upsc-consent-close:hover {
  background: #e3e8ee;
}

.upsc-consent-choices {
  margin: 21px 0 14px;
  display: grid;
  gap: 10px;
}

.upsc-consent-choice {
  min-height: 82px;
  padding: 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid #dce3eb;
  border-radius: 13px;
  background: #f8fafc;
  cursor: pointer;
}

.upsc-consent-choice:has(input:checked) {
  border-color: #94d6b9;
  background: #f2fbf7;
}

.upsc-consent-choice strong {
  display: block;
  margin-bottom: 3px;
  color: #132238;
  font-size: 14px;
}

.upsc-consent-choice small {
  display: block;
  color: #69768a;
  font-size: 11.5px;
  line-height: 1.5;
}

.upsc-consent-choice input {
  width: 22px;
  height: 22px;
  accent-color: #11875e;
  cursor: pointer;
}

.upsc-consent-choice input:disabled {
  cursor: not-allowed;
}

.upsc-consent-policy {
  margin: 0 0 18px;
  color: #6a778b;
  font-size: 11.5px;
  line-height: 1.55;
}

.upsc-consent-modal-actions {
  padding-top: 17px;
  border-top: 1px solid #e3e8ef;
}

.upsc-consent-modal-open {
  overflow: hidden !important;
}

@media (max-width: 760px) {
  .upsc-cookie-banner {
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: calc(100% - 16px);
    padding: 11px 13px;
    grid-template-columns: 1fr;
    gap: 9px;
    border-radius: 13px;
  }

  /* On a phone the heading is the single biggest space cost and adds nothing
     the copy does not already say, so it is dropped rather than shrunk. */
  .upsc-cookie-copy h2 {
    display: none;
  }

  .upsc-cookie-copy p {
    font-size: 12px;
    line-height: 1.4;
  }

  .upsc-cookie-banner[data-ui="app"] {
    bottom: 78px;
  }

  .upsc-cookie-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .upsc-cookie-button {
    min-height: 36px;
    font-size: 11.5px;
    padding: 0 10px;
  }

  .upsc-cookie-actions .upsc-cookie-primary {
    grid-column: 1 / -1;
  }

  .upsc-cookie-settings[data-ui="app"] {
    bottom: 73px;
  }

  .upsc-consent-backdrop {
    padding: 10px;
    align-items: end;
  }

  .upsc-consent-panel {
    max-height: calc(100vh - 20px);
    padding: 20px 17px 18px;
    border-radius: 19px 19px 13px 13px;
  }

  .upsc-consent-head h2 {
    font-size: 22px;
  }

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

@media (prefers-reduced-motion: reduce) {
  .upsc-cookie-button,
  .upsc-cookie-settings,
  .upsc-consent-panel {
    scroll-behavior: auto;
    transition: none;
  }
}
