body.cmp-open { overflow: hidden; }

.cmp-root {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(18, 30, 44, 0.7);
  font-family: "General Sans", "DM Sans", sans-serif;
}
.cmp-root.is-open { display: flex; }

.cmp-panel {
  width: 100%;
  max-width: 50rem;
  max-height: min(92vh, 48rem);
  overflow: hidden;
  border-radius: 2px;
  background: #fff;
  color: #121e2c;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.35);
}

.cmp-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.cmp-brand {
  display: flex;
  align-items: center;
}
.cmp-brand img {
  display: block;
  width: 82px;
  height: 53px;
}

.cmp-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.cmp-tab {
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 1rem 0.75rem;
  background: #fff;
  color: #121e2c;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.cmp-tab.is-active {
  border-bottom-color: #016dc6;
  color: #016dc6;
}

.cmp-body {
  max-height: 24rem;
  overflow: auto;
  padding: 1.5rem;
}
.cmp-view { display: none; }
.cmp-view.is-active { display: block; }
.cmp-view h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.cmp-view p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.7;
}
.cmp-view a {
  color: #016dc6;
  text-decoration: underline;
}

.cmp-category {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
.cmp-category-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: #121e2c;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.cmp-chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.cmp-category-summary[aria-expanded="true"] .cmp-chevron { transform: rotate(225deg); }
.cmp-category-copy {
  display: none;
  grid-column: 1 / -1;
  padding-left: 1.2rem;
  color: #686868;
  font-size: 0.9rem;
  line-height: 1.6;
}
.cmp-category-copy.is-open { display: block; }

.cmp-switch {
  position: relative;
  display: inline-flex;
  width: 3.1rem;
  height: 1.65rem;
}
.cmp-switch input {
  position: absolute;
  opacity: 0;
}
.cmp-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d9d9d9;
  cursor: pointer;
  transition: background 0.2s ease;
}
.cmp-switch span::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.28rem;
  height: 1.28rem;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}
.cmp-switch input:checked + span { background: #016dc6; }
.cmp-switch input:checked + span::after { transform: translateX(1.45rem); }
.cmp-switch input:focus-visible + span { outline: 2px solid #016dc6; outline-offset: 2px; }
.cmp-switch input:disabled + span {
  opacity: 0.65;
  cursor: not-allowed;
}

.cmp-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
}
.cmp-btn {
  min-height: 48px;
  border: 2px solid #016dc6;
  border-radius: 980px;
  padding: 0.75rem 1rem;
  font-family: "Sofia Sans Condensed", "Sofia Sans Extra Condensed", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cmp-btn-primary {
  background: #016dc6;
  color: #fff;
}
.cmp-btn-secondary {
  background: #fff;
  color: #016dc6;
}
.cmp-btn:hover,
.cmp-btn:focus-visible {
  background: #121e2c;
  border-color: #121e2c;
  color: #fff;
}

.cmp-reopen {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 9990;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  padding: 0.65rem 0.85rem;
  background: rgba(18, 30, 44, 0.92);
  color: #fff;
  font-family: "General Sans", "DM Sans", sans-serif;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
}
.cmp-reopen:hover,
.cmp-reopen:focus-visible {
  background: #016dc6;
  border-color: #016dc6;
}

@media (max-width: 575px) {
  .cmp-root { padding: 1rem; }
  .cmp-tab {
    padding: 0.65rem 0.35rem;
    font-size: 0.72rem;
    line-height: 1.25;
    text-align: center;
  }
  .cmp-body {
    max-height: 50vh;
    padding: 1rem;
  }
  .cmp-actions {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
}
