.nbfc {
  --nbfc-coral: #d4836f;
  --nbfc-peach: #e89b6d;
  --nbfc-mint: #e3f5f0;
  --nbfc-oatmeal: #faf7f5;
  --nbfc-ink: #1a1a1a;
  --nbfc-ink2: #3d3d3d;
  --nbfc-grey: #4f4f4f;
  --nbfc-line: #e5e7eb;

  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  line-height: 1.5;
  color: var(--nbfc-ink);
}

.nbfc[hidden] {
  display: none;
}

.nbfc *,
.nbfc *::before,
.nbfc *::after {
  box-sizing: border-box;
}

html.nbfc-open {
  overflow: hidden;
}

.nbfc__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.55);
}

.nbfc__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(26, 26, 26, 0.28);
  animation: nbfc-in 0.25s ease-out;
}

.nbfc__dialog:focus {
  outline: none;
}

@keyframes nbfc-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nbfc__dialog {
    animation: none;
  }
}

.nbfc__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--nbfc-ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.nbfc__close:hover {
  background: var(--nbfc-oatmeal);
}

.nbfc__close svg {
  width: 16px;
  height: 16px;
}

.nbfc__media {
  display: none;
}

.nbfc__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 20px 20px;
}

.nbfc__badge {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--nbfc-mint);
  color: #2f6f63;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
}

.nbfc .nbfc__title {
  margin: 0;
  padding-right: 28px;
  color: var(--nbfc-ink);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}

.nbfc .nbfc__text {
  margin: 0;
  color: var(--nbfc-grey);
  font-size: 15px;
}

.nbfc .nbfc__price {
  margin: 0;
  color: var(--nbfc-ink2);
  font-size: 15px;
}

.nbfc__price strong {
  margin-right: 6px;
  color: var(--nbfc-coral);
  font-weight: 600;
}

.nbfc__sponsor {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--nbfc-line);
}

.nbfc__sponsor-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid var(--nbfc-line);
  border-radius: 50%;
  background: #fff;
}

.nbfc__sponsor-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nbfc__sponsor small {
  display: block;
  color: var(--nbfc-grey);
  font-size: 12px;
  line-height: 1.2;
}

.nbfc__sponsor b {
  color: var(--nbfc-ink);
  font-size: 15px;
  font-weight: 600;
}

.nbfc__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.nbfc .nbfc__btn {
  display: inline-block;
  width: 100%;
  padding: 14px 32px;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.nbfc .nbfc__btn--primary {
  background: var(--nbfc-peach);
  color: #fff;
}

.nbfc .nbfc__btn--primary:hover {
  background: var(--nbfc-coral);
}

.nbfc .nbfc__btn--tertiary {
  background: #fff;
  color: var(--nbfc-coral);
  box-shadow: inset 0 0 0 1px var(--nbfc-coral);
}

.nbfc .nbfc__btn--tertiary:hover {
  background: var(--nbfc-oatmeal);
}

.nbfc__close:focus-visible,
.nbfc .nbfc__btn:focus-visible {
  outline: 2px solid var(--nbfc-ink);
  outline-offset: 2px;
}

/* Desktop: larger type, inline buttons, optional image column. */
@media (min-width: 761px) {
  .nbfc__body {
    gap: 16px;
    padding: 36px 40px 32px;
  }

  .nbfc__badge {
    font-size: 12px;
  }

  .nbfc .nbfc__title {
    font-size: 28px;
  }

  .nbfc .nbfc__text {
    font-size: 16px;
  }

  .nbfc__sponsor {
    padding-top: 16px;
  }

  .nbfc__sponsor-icon {
    width: 48px;
    height: 48px;
  }

  .nbfc__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nbfc .nbfc__btn {
    width: auto;
  }

  .nbfc__dialog--image {
    display: grid;
    grid-template-columns: 42% 1fr;
    max-width: 860px;
  }

  .nbfc__dialog--image .nbfc__media {
    display: block;
    position: relative;
    min-height: 100%;
    background: var(--nbfc-mint);
  }

  .nbfc__dialog--image .nbfc__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
  }

  .nbfc__dialog--image .nbfc__body {
    justify-content: center;
  }
}
