.ccb-popup {
  --ccb-card: #111827;
  --ccb-alt: #151c2e;
  --ccb-text: #f1f5f9;
  --ccb-muted: #94a3b8;
  --ccb-light: #64748b;
  --ccb-accent: #3dc372;
  --ccb-accent-light: #6ee7a8;
  --ccb-accent-dark: #0a0e1a;
  --ccb-orange: #f5a623;
  --ccb-orange-light: #ffbe55;
  --ccb-border: rgba(255, 255, 255, 0.09);
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 18px;
  font-family: "DM Sans", system-ui, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

html.ccb-popup-open body {
  overflow: hidden;
}

.ccb-popup.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ccb-popup a,
.ccb-popup a:hover,
.ccb-popup a:focus {
  text-decoration: none !important;
}

.ccb-popup__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(245, 166, 35, 0.2), transparent 26%),
    radial-gradient(circle at 12% 82%, rgba(61, 195, 114, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(4, 6, 11, 0.82), rgba(4, 6, 11, 0.9));
  backdrop-filter: blur(10px);
}

.ccb-popup__dialog {
  position: relative;
  width: min(860px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(245, 166, 35, 0.34);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(10, 14, 26, 0.98));
  color: #ffffff;
  box-shadow: 0 28px 90px rgba(4, 6, 11, 0.56), 0 0 0 7px rgba(245, 166, 35, 0.06);
  transform: translateY(18px) scale(0.98);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.ccb-popup.is-open .ccb-popup__dialog {
  transform: translateY(0) scale(1);
  animation: ccb-popup-pop 360ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.ccb-popup__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ccb-orange), var(--ccb-orange-light));
  color: var(--ccb-accent-dark);
  cursor: pointer;
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 12px 26px rgba(245, 166, 35, 0.24);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.ccb-popup__close:hover,
.ccb-popup__close:focus {
  background: linear-gradient(135deg, var(--ccb-orange-light), var(--ccb-orange));
  color: var(--ccb-accent-dark);
  box-shadow: 0 0 0 5px rgba(245, 166, 35, 0.16), 0 16px 30px rgba(245, 166, 35, 0.2);
  transform: translateY(-1px) rotate(90deg) scale(1.04);
  outline: 0;
}

.ccb-popup__shell {
  position: relative;
  overflow: hidden;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(61, 195, 114, 0.1) 0 1px, transparent 1px 16px),
    radial-gradient(circle at 88% 4%, rgba(245, 166, 35, 0.14), transparent 24%),
    linear-gradient(160deg, #111827 0%, #0a0e1a 100%);
}

.ccb-popup__shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(61, 195, 114, 0.36), transparent 34%),
    linear-gradient(180deg, rgba(245, 166, 35, 0.16), transparent 28%);
  opacity: 0.35;
  pointer-events: none;
}

.ccb-popup__header {
  position: relative;
  overflow: hidden;
  padding: 26px 82px 20px 28px;
  border-top: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.075), transparent 62%);
  color: #ffffff;
}

.ccb-popup__header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 16px);
  pointer-events: none;
}

.ccb-popup__eyebrow {
  position: relative;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ccb-orange-light);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.ccb-popup__eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ccb-orange);
  box-shadow: 0 0 0 6px rgba(245, 166, 35, 0.14);
}

.ccb-popup__title {
  position: relative;
  max-width: 520px;
  margin: 0;
  color: #ffffff;
  font-family: Outfit, "DM Sans", system-ui, sans-serif;
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.98;
}

.ccb-popup__header p {
  position: relative;
  max-width: 560px;
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.ccb-popup__brands {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.ccb-popup__brand-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  min-width: 0;
  min-height: 100%;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 0%, rgba(245, 166, 35, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 14px 34px rgba(4, 6, 11, 0.22);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.ccb-popup__brand-card[hidden] {
  display: none !important;
}

.ccb-popup__brand-card::before {
  content: "";
  position: absolute;
  inset: -40% auto -40% -32%;
  width: 24%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: rotate(16deg) translateX(-220%);
  pointer-events: none;
}

.ccb-popup__brand-card:hover,
.ccb-popup__brand-card:focus-within {
  border-color: rgba(61, 195, 114, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 44px rgba(4, 6, 11, 0.32), 0 0 0 4px rgba(61, 195, 114, 0.08);
  transform: translateY(-3px);
}

.ccb-popup__brand-card:hover::before,
.ccb-popup__brand-card:focus-within::before {
  animation: ccb-popup-card-shine 820ms ease;
}

.ccb-popup__brand-card .ccb-brand-image {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 156px;
  height: 82px;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  padding: 0;
  background: transparent;
  transition: transform 200ms ease, filter 200ms ease;
}

.ccb-popup__brand-card:hover .ccb-brand-image,
.ccb-popup__brand-card:focus-within .ccb-brand-image {
  filter: saturate(1.08) brightness(1.04);
  transform: scale(1.04);
}

.ccb-popup__brand-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  min-height: 104px;
  text-align: center;
}

.ccb-popup__brand-copy strong {
  display: block;
  color: var(--ccb-text);
  font-family: Outfit, "DM Sans", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.04;
}

.ccb-popup__brand-copy p {
  margin: 0;
  color: var(--ccb-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.ccb-popup__brand-card a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin-top: auto;
  border-radius: 12px;
  background: linear-gradient(135deg, #e8930a 0%, var(--ccb-orange) 52%, var(--ccb-orange-light) 100%);
  color: var(--ccb-accent-dark);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-decoration: none !important;
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.25);
  transition: box-shadow 160ms ease, transform 160ms ease, filter 160ms ease;
}

.ccb-popup__brand-card a:hover,
.ccb-popup__brand-card a:focus {
  color: var(--ccb-accent-dark);
  filter: brightness(1.04);
  box-shadow: 0 8px 26px rgba(245, 166, 35, 0.34);
  transform: translateY(-2px);
  outline: 0;
}

@keyframes ccb-popup-pop {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ccb-popup-card-shine {
  from {
    transform: rotate(16deg) translateX(-220%);
  }

  to {
    transform: rotate(16deg) translateX(680%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ccb-popup.is-open .ccb-popup__dialog,
  .ccb-popup__brand-card:hover::before,
  .ccb-popup__brand-card:focus-within::before {
    animation: none;
  }

  .ccb-popup__dialog,
  .ccb-popup__close,
  .ccb-popup__brand-card,
  .ccb-popup__brand-card .ccb-brand-image,
  .ccb-popup__brand-card a {
    transition: none;
  }
}

@media (max-width: 560px) {
  .ccb-popup {
    padding: 12px;
  }

  .ccb-popup__dialog {
    width: min(430px, 100%);
    border-radius: 20px;
  }

  .ccb-popup__close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }

  .ccb-popup__header {
    padding: 62px 18px 16px;
  }

  .ccb-popup__title {
    max-width: 100%;
    font-size: 32px;
  }

  .ccb-popup__header p {
    max-width: 100%;
    font-size: 13px;
  }

  .ccb-popup__brands {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 12px 12px;
  }

  .ccb-popup__brand-card {
    gap: 9px;
    padding: 14px;
    text-align: center;
  }

  .ccb-popup__brand-card a {
    grid-column: 1;
    width: 100%;
  }

  .ccb-popup__brand-card .ccb-brand-image {
    width: 150px;
    max-width: 100%;
    height: 76px;
  }

  .ccb-popup__brand-copy {
    min-height: 0;
  }

  .ccb-popup__brand-copy strong {
    font-size: 22px;
  }

  .ccb-popup__brand-copy p {
    font-size: 14px;
  }
}
