/* ==================================================
   Kabar Smart Promotions Banner
   Dashboard only — isolated component
================================================== */

.kp-promotion-host[hidden] {
  display: none !important;
}

.kp-promotion-host {
  width: 100%;
  min-width: 0;
  margin: 0 0 22px;
}

.kp-banner {
  --kp-primary: #1769e0;
  --kp-primary-dark: #0b4fb8;
  --kp-soft: #eef7ff;
  --kp-border: #cfe4ff;
  --kp-text: #10233f;
  --kp-muted: #5d708d;
  --kp-accent: #ffc857;

  position: relative;
  overflow: hidden;
  border: 1px solid var(--kp-border);
  border-radius: 24px;
  padding: 22px;
  background:
    radial-gradient(
      circle at 10% 15%,
      rgba(73, 164, 255, 0.18),
      transparent 32%
    ),
    linear-gradient(
      135deg,
      #ffffff 0%,
      var(--kp-soft) 100%
    );
  box-shadow:
    0 16px 45px rgba(23, 105, 224, 0.10);
  color: var(--kp-text);
}

.kp-banner::before {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  left: -65px;
  bottom: -95px;
  border-radius: 50%;
  background: rgba(23, 105, 224, 0.08);
  pointer-events: none;
}

.kp-banner--loyalty {
  --kp-primary: #1748b8;
  --kp-primary-dark: #0c2f87;
  --kp-soft: #f1f6ff;
  --kp-border: #c8d9ff;
  --kp-accent: #f3bd43;
}

.kp-banner--welcome {
  --kp-primary: #1688d4;
  --kp-primary-dark: #0867a9;
  --kp-soft: #effaff;
  --kp-border: #c7eaff;
  --kp-accent: #4ec7ff;
}

.kp-banner__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.kp-banner__intro {
  min-width: 0;
  flex: 1 1 auto;
}

.kp-banner__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  border: 1px solid rgba(23, 105, 224, 0.15);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--kp-primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.kp-banner__title {
  margin: 0 0 7px;
  color: var(--kp-text);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.35;
}

.kp-banner__description {
  max-width: 760px;
  margin: 0;
  color: var(--kp-muted);
  font-size: 14px;
  line-height: 1.9;
}

.kp-countdown {
  flex: 0 0 auto;
  min-width: 225px;
  border: 1px solid rgba(23, 105, 224, 0.13);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.88);
  text-align: center;
}

.kp-countdown__label {
  display: block;
  margin-bottom: 8px;
  color: var(--kp-muted);
  font-size: 12px;
  font-weight: 700;
}

.kp-countdown__units {
  display: grid;
  grid-template-columns: repeat(4, minmax(42px, 1fr));
  gap: 6px;
}

.kp-countdown__unit {
  border-radius: 12px;
  padding: 7px 4px;
  background: var(--kp-soft);
}

.kp-countdown__unit strong {
  display: block;
  color: var(--kp-primary-dark);
  font-size: 17px;
  line-height: 1.1;
}

.kp-countdown__unit small {
  display: block;
  margin-top: 4px;
  color: var(--kp-muted);
  font-size: 10px;
}

.kp-offers {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(230px, 1fr)
    );
  gap: 13px;
}

.kp-offer {
  min-width: 0;
  border: 1px solid rgba(23, 105, 224, 0.13);
  border-radius: 19px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.92);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.kp-offer:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 28px rgba(23, 105, 224, 0.10);
}

.kp-offer__label {
  display: block;
  margin-bottom: 11px;
  color: var(--kp-muted);
  font-size: 12px;
  font-weight: 800;
}

.kp-offer__amounts {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.kp-offer__recharge {
  color: var(--kp-text);
  font-size: 22px;
  font-weight: 900;
}

.kp-offer__arrow {
  color: var(--kp-primary);
  font-size: 18px;
  font-weight: 900;
}

.kp-offer__final {
  color: var(--kp-primary-dark);
  font-size: 25px;
  font-weight: 900;
}

.kp-offer__bonus {
  display: block;
  margin-bottom: 13px;
  color: var(--kp-primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.kp-offer__button {
  width: 100%;
  border: 0;
  border-radius: 13px;
  padding: 11px 13px;
  background:
    linear-gradient(
      135deg,
      var(--kp-primary),
      var(--kp-primary-dark)
    );
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.kp-offer__button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.kp-offer--used,
.kp-offer--expired {
  opacity: 0.62;
}

.kp-banner__footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin-top: 15px;
  color: var(--kp-muted);
  font-size: 11px;
  line-height: 1.7;
}

.kp-mobile-dots {
  display: none;
}

@media (max-width: 900px) {
  .kp-promotion-host {
    margin-bottom: 17px;
  }

  .kp-banner {
    border-radius: 20px;
    padding: 17px;
  }

  .kp-banner__head {
    display: block;
    margin-bottom: 15px;
  }

  .kp-countdown {
    width: 100%;
    min-width: 0;
    margin-top: 13px;
  }

  .kp-offers {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    gap: 11px;
    padding-bottom: 4px;
  }

  .kp-offers::-webkit-scrollbar {
    display: none;
  }

  .kp-offer {
    flex: 0 0 calc(89% - 4px);
    scroll-snap-align: start;
  }

  .kp-mobile-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 12px;
  }

  .kp-mobile-dots button {
    width: 7px;
    height: 7px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: #b8cae0;
  }

  .kp-mobile-dots button.is-active {
    width: 19px;
    border-radius: 999px;
    background: var(--kp-primary);
  }

  .kp-banner__footer {
    display: block;
  }

  .kp-banner__footer span {
    display: block;
    margin-top: 4px;
  }
}

@media (max-width: 520px) {
  .kp-banner {
    padding: 14px;
  }

  .kp-banner__title {
    font-size: 19px;
  }

  .kp-banner__description {
    font-size: 12px;
    line-height: 1.75;
  }

  .kp-countdown__units {
    gap: 4px;
  }

  .kp-countdown__unit strong {
    font-size: 15px;
  }

  .kp-offer {
    flex-basis: 92%;
    padding: 14px;
  }

  .kp-offer__recharge {
    font-size: 20px;
  }

  .kp-offer__final {
    font-size: 23px;
  }
}
