/**
 * Promosyon kodu modalı — zümrüt tonları (auth-modals-emerald ile uyumlu)
 */

#promo-code-modal-overlay.promo-code-modal-overlay.bonus-modal-overlay {
  z-index: 1060;
  background: rgba(7, 15, 12, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#promo-code-modal-overlay .bonus-modal.promo-code-modal {
  max-width: 420px;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(
    165deg,
    rgba(21, 61, 30, 0.95) 0%,
    #0f1f17 42%,
    #0b1511 100%
  );
  color: #e8e8e8;
  border: 1px solid rgba(47, 132, 68, 0.5);
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#promo-code-modal-overlay .bonus-modal-close {
  color: rgba(232, 232, 232, 0.92);
  top: 10px;
  right: 12px;
}

#promo-code-modal-overlay .bonus-modal-close:hover,
#promo-code-modal-overlay .bonus-modal-close:focus-visible {
  color: #fff;
  background: rgba(47, 132, 68, 0.35);
}

.promo-code-modal__hero {
  padding: 28px 22px 18px;
  text-align: center;
  background: linear-gradient(180deg, rgba(4, 120, 87, 0.35) 0%, rgba(11, 21, 17, 0.2) 100%);
  border-bottom: 1px solid rgba(47, 132, 68, 0.28);
}

.promo-code-modal__badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #10b981 0%, #047857 55%, #065f46 100%);
  color: #ecfdf5;
  font-size: 22px;
  box-shadow:
    0 8px 24px rgba(4, 120, 87, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.promo-code-modal__title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f1f5f4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.promo-code-modal__lead {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(184, 201, 191, 0.95);
  max-width: 32ch;
  margin-left: auto;
  margin-right: auto;
}

.promo-code-modal__body {
  padding: 20px 22px 24px;
  background: rgba(11, 21, 17, 0.72);
}

.promo-code-modal__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9fd4ae;
  margin-bottom: 8px;
}

.promo-code-modal__input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f1f5f4;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(47, 132, 68, 0.42);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.promo-code-modal__input::placeholder {
  color: rgba(180, 190, 185, 0.45);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.promo-code-modal__input:focus {
  border-color: rgba(82, 170, 104, 0.75);
  box-shadow: 0 0 0 3px rgba(47, 132, 68, 0.25);
}

.promo-code-modal__err {
  margin: 10px 0 0;
  font-size: 0.8125rem;
  color: #fecaca;
  line-height: 1.4;
}

.promo-code-modal__err[hidden] {
  display: none !important;
}

.promo-code-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.promo-code-modal__btn {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease, opacity 0.15s ease;
}

.promo-code-modal__btn:active:not(:disabled) {
  transform: scale(0.98);
}

.promo-code-modal__btn--muted {
  background: rgba(255, 255, 255, 0.06);
  color: #c8d8ce;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.promo-code-modal__btn--muted:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f4;
}

.promo-code-modal__btn--go {
  background: linear-gradient(145deg, #34d399 0%, #059669 45%, #047857 100%);
  color: #ecfdf5;
  box-shadow: 0 4px 18px rgba(4, 120, 87, 0.45);
}

.promo-code-modal__btn--go:hover:not(:disabled) {
  box-shadow: 0 6px 22px rgba(4, 120, 87, 0.55);
  filter: brightness(1.03);
}

.promo-code-modal__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/**
 * Mobil: bonus-detail-modal.css içindeki genel .bonus-modal (tam ekran / açık tema)
 * kuralları bu küçük diyaloğu bozuyor — yalnız promosyon overlay’inde sıfırlanır.
 */
@media (max-width: 767px) {
  #promo-code-modal-overlay.promo-code-modal-overlay.bonus-modal-overlay {
    padding: max(12px, env(safe-area-inset-top, 0px))
      max(12px, env(safe-area-inset-right, 0px))
      max(12px, env(safe-area-inset-bottom, 0px))
      max(12px, env(safe-area-inset-left, 0px));
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  #promo-code-modal-overlay .bonus-modal.promo-code-modal {
    width: min(100%, calc(100vw - 24px));
    max-width: min(420px, calc(100vw - 24px));
    margin: auto;
    flex: 0 1 auto;
    height: auto;
    min-height: 0;
    max-height: min(92dvh, 92vh);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Genel mobil .bonus-modal beyaz zemini ezer */
    background: linear-gradient(
      165deg,
      rgba(21, 61, 30, 0.95) 0%,
      #0f1f17 42%,
      #0b1511 100%
    );
    color: #e8e8e8;
    border: 1px solid rgba(47, 132, 68, 0.5);
    box-shadow:
      0 28px 56px rgba(0, 0, 0, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  #promo-code-modal-overlay .bonus-modal-close {
    color: rgba(232, 232, 232, 0.92);
  }

  #promo-code-modal-overlay .bonus-modal-close:hover,
  #promo-code-modal-overlay .bonus-modal-close:focus-visible {
    color: #fff;
    background: rgba(47, 132, 68, 0.35);
  }

  .promo-code-modal__hero {
    flex-shrink: 0;
    padding: 22px 18px 14px;
  }

  .promo-code-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px 18px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(11, 21, 17, 0.72);
  }

  .promo-code-modal__title {
    font-size: 1.2rem;
  }

  .promo-code-modal__lead {
    font-size: 0.8125rem;
    max-width: none;
  }

  .promo-code-modal__actions {
    flex-direction: column;
    gap: 10px;
  }

  .promo-code-modal__btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 380px) {
  #promo-code-modal-overlay.promo-code-modal-overlay.bonus-modal-overlay {
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
  }

  #promo-code-modal-overlay .bonus-modal.promo-code-modal {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    border-radius: 14px;
  }

  .promo-code-modal__hero {
    padding: 18px 14px 12px;
  }

  .promo-code-modal__body {
    padding: 14px 14px 18px;
  }

  .promo-code-modal__badge {
    width: 48px;
    height: 48px;
    font-size: 19px;
  }
}
