.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.popup-overlay.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.glass-modal {
  position: relative;
  width: 100%;
  max-width: 315px; /* Imepunguzwa kwa 25% kutoka 420px */
  padding: 0;
  overflow: hidden;
  border-radius: 0.95rem;
  background: linear-gradient(145deg, rgba(24, 24, 35, 0.97), rgba(12, 12, 22, 0.99));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  text-align: center;
  color: #f1f5f9;
}

.modal-logo-header {
  width: 100%;
  padding: 0.85rem 0.9rem 0.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.8rem;
}

.provider-logo {
  width: 100%;
  max-width: 230px;
  height: auto;
  max-height: 4.5rem;
  min-height: 2.8rem;
  object-fit: contain;
  object-position: center;
  display: block;
}

.modal-body {
  padding: 0.85rem 1rem 1rem;
}

.glass-modal h2 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 0.2rem;
}

.payment-subtitle {
  color: #22c55e;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.25;
  margin: 0 0 0.55rem;
  text-transform: uppercase;
  animation: heartbeat-beep 1.05s ease-in-out infinite;
  text-shadow: 0 0 12px rgba(34, 197, 94, 0.45);
}

@keyframes heartbeat-beep {
  0%, 100% {
    transform: scale(1);
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.35);
  }
  14% {
    transform: scale(1.09);
    text-shadow: 0 0 18px rgba(34, 197, 94, 0.8);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.06);
    text-shadow: 0 0 16px rgba(34, 197, 94, 0.7);
  }
  70% {
    transform: scale(1);
  }
}

.batch-text {
  font-size: 0.65rem;
  color: #a78bfa;
  margin-bottom: 0.75rem;
}

.payment-steps {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  text-align: left;
}

.step-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.7rem;
}

.step-pill-active {
  border: 1px solid rgba(225, 29, 72, 0.5);
  background: rgba(225, 29, 72, 0.12);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  font-weight: 700;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.step-pill-active .step-number {
  background: var(--primary, #e11d48);
}

.payment-progress {
  margin: 0.5rem 0 0.35rem;
  text-align: left;
}

.pay-progress-track {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pay-progress-step {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.7rem;
  color: #64748b;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.pay-progress-step.is-active {
  color: #f8fafc;
  border: 1px solid rgba(225, 29, 72, 0.45);
  background: rgba(225, 29, 72, 0.14);
}

.pay-progress-step.is-done {
  color: #86efac;
}

.pay-progress-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.pay-progress-step.is-active .pay-progress-dot {
  background: var(--primary, #e11d48);
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.25);
}

.pay-progress-step.is-done .pay-progress-dot {
  background: #22c55e;
}

.pay-progress-label {
  line-height: 1.2;
}

.payment-form input[type="tel"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.55rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
}

.btn-gradient {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: none;
  border-radius: 0.6rem;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, var(--primary, #e11d48), #7c3aed);
}

.btn-gradient:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.payment-message {
  min-height: 1rem;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: #86efac;
}

.payment-message.is-error {
  color: #fca5a5;
}

.secure-text {
  margin-top: 0.55rem;
  font-size: 0.6rem;
  color: #64748b;
  letter-spacing: 0.04em;
}

.hidden {
  display: none !important;
}

.loader {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#videoModal.is-blurred #player {
  filter: none;
}

.preview-hint {
  font-size: 0.75rem;
  color: #fbbf24;
  margin-top: 0.35rem;
}

.video-play-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.video-play-btn {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  position: relative;
  flex-shrink: 0;
}

.video-play-btn::before {
  content: none;
}

.video-play-btn::after {
  content: '';
  position: absolute;
  left: 54%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}

.player-shell {
  max-width: 100%;
}

video.ukali-player {
  background: #000;
  height: 100%;
  max-height: 90vh;
  object-fit: contain;
}

video.ukali-player--preview {
  cursor: pointer;
}

video.ukali-player--preview::-webkit-media-controls,
video.ukali-player--preview::-webkit-media-controls-enclosure,
video.ukali-player--preview::-webkit-media-controls-panel,
video.ukali-player--preview::-webkit-media-controls-start-playback-button,
video.ukali-player--preview::-webkit-media-controls-overlay-play-button,
video.ukali-player--preview::-webkit-media-controls-play-button {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

video.ukali-player--full {
  cursor: default;
}

video.ukali-player--full::-webkit-media-controls {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#reelsContainer {
  display: flex;
  flex-direction: column;
  scroll-snap-type: y proximity;
  height: 100vh;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
}

.reel-card {
  flex-shrink: 0;
  width: 100%;
  height: 46vh;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #020617;
}

.reel-video-wrapper {
  position: relative;
  width: 100%;
  height: 80%;
  background-color: #000;
  overflow: hidden;
}

.reel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: black;
}

.reel-lock-screen {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
}

.reel-lock-screen .video-play-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  position: relative;
  flex-shrink: 0;
}

.reel-lock-screen .video-play-btn::after {
  content: '';
  position: absolute;
  left: 55%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
}

.reel-premium-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(225, 29, 72, 0.95);
  color: white;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: bold;
  z-index: 11;
}

.reel-bottom-info {
  width: 100%;
  height: 20%;
  background: #111827;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 9;
}

.reel-video-title {
  flex-grow: 1;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #f3f4f6;
  line-height: 1.3;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reel-preview-hint {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 8px;
}

#verify-section {
  display: block !important;
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}

/* GLASS MODAL WAITING MODE OVERRIDE - KUFICHA ELEMENTI ZOTE WAKATI WA COUNTDOWN */
.glass-modal.is-waiting-mode .modal-logo-header,
.glass-modal.is-waiting-mode h2,
.glass-modal.is-waiting-mode .payment-subtitle,
.glass-modal.is-waiting-mode .payment-steps,
.glass-modal.is-waiting-mode .payment-form,
.glass-modal.is-waiting-mode .payment-progress,
.glass-modal.is-waiting-mode #paymentProgress,
.glass-modal.is-waiting-mode .payment-message,
.glass-modal.is-waiting-mode #paymentMessage,
.glass-modal.is-waiting-mode .secure-text,
.glass-modal.is-waiting-mode .pkg-popup-btn,
.glass-modal.is-waiting-mode div:has(> .pkg-popup-btn) {
  display: none !important;
}

.glass-modal.is-waiting-mode {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  background: #020617 !important;
  border-color: rgba(225, 29, 72, 0.3) !important;
}

.payment-waiting-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: #020617;
  border-radius: 0.85rem;
  width: 100%;
  box-sizing: border-box;
}

.waiting-header {
  text-align: center;
  margin-bottom: 1rem;
}

.waiting-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 0.35rem 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.waiting-desc {
  font-size: 0.825rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

.countdown-circle-container {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.75rem auto 0.25rem;
}

.countdown-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.countdown-bg-circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 6;
}

.countdown-progress-circle {
  fill: none;
  stroke: var(--primary, #e11d48);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 263.89;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.3s linear;
}

.countdown-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  font-weight: 800;
  color: #ffffff;
  font-family: inherit;
}

/* ==========================================================================
   MOBILE WAIT SCREEN FULL VIEWPORT OVERLAY & RESPONSIVE BOTTOM ALIGNMENT
   ========================================================================== */
@media (max-width: 640px) {
  .glass-modal.is-waiting-mode {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 2.5rem 1.5rem !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    background: #020617 !important;
  }
  .glass-modal.is-waiting-mode .modal-body {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 0 !important;
  }
  .glass-modal.is-waiting-mode .payment-waiting-box {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 0 !important;
    background: transparent !important;
  }
  .glass-modal.is-waiting-mode .countdown-circle-container {
    order: 2 !important;
    margin: auto !important;
  }
  .glass-modal.is-waiting-mode .waiting-header {
    order: 3 !important;
    margin-top: auto !important;
    margin-bottom: 3.5rem !important;
  }
  .glass-modal.is-waiting-mode .waiting-title {
    font-size: 1.35rem !important;
    color: #ffffff !important;
  }
  .glass-modal.is-waiting-mode .waiting-desc {
    font-size: 0.9rem !important;
    color: #94a3b8 !important;
  }
}
