/* promo-redeem.css — "มีโค้ดส่วนลด?" card.
   Theme: matches Premium Monthly + เชิญเพื่อน — dark card with subtle
   gold accent (NOT the rainbow standout from earlier). */

#promo-redeem-card,
[data-dd-promo-card] {
  position: relative !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  /* Same dark theme as sibling cards (Premium Monthly / เชิญเพื่อน) */
  background: #14122a !important;
  border: 1px solid rgba(245, 197, 66, 0.22) !important;
  border-radius: 18px !important;
  padding: 16px 18px !important;
  margin: 12px 12px !important;
  box-shadow:
    inset 0 1px 0 rgba(245, 197, 66, 0.10),
    0 4px 12px rgba(0, 0, 0, 0.35) !important;
  overflow: hidden !important;
}

#promo-redeem-card .pr-header {
  display: flex !important;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
#promo-redeem-card .pr-icon {
  font-size: 22px;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 197, 66, 0.10);
  border: 1px solid rgba(245, 197, 66, 0.30);
  border-radius: 10px;
  flex-shrink: 0;
}
#promo-redeem-card .pr-title {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #fde68a !important;
  letter-spacing: 0.2px;
  line-height: 1.2;
}
#promo-redeem-card .pr-sub {
  font-size: 11.5px !important;
  color: rgba(255, 255, 255, 0.50) !important;
  margin-top: 3px;
  font-weight: 500;
  line-height: 1.3;
}
#promo-redeem-card .pr-input-row {
  display: flex !important;
  gap: 8px;
  position: relative;
  z-index: 1;
}
#promo-redeem-card input.pr-input {
  flex: 1 1 auto;
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 10px;
  color: #fff !important;
  padding: 11px 14px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  min-width: 0;
  font-family: 'SF Mono', 'Consolas', 'Courier New', monospace !important;
}
#promo-redeem-card input.pr-input::placeholder {
  color: rgba(255, 255, 255, 0.20) !important;
}
#promo-redeem-card input.pr-input:focus {
  border-color: rgba(245, 197, 66, 0.55) !important;
  background: rgba(0, 0, 0, 0.50) !important;
}
#promo-redeem-card button.pr-submit {
  background: linear-gradient(180deg, #f5c542 0%, #e0a82b 100%) !important;
  color: #1a1300 !important;
  border: none;
  border-radius: 10px;
  padding: 11px 18px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  cursor: pointer;
  letter-spacing: 0.4px;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    0 2px 6px rgba(245, 197, 66, 0.25);
  transition: filter 0.12s, transform 0.12s, opacity 0.12s;
  flex-shrink: 0;
}
#promo-redeem-card button.pr-submit:hover {
  filter: brightness(1.08);
}
#promo-redeem-card button.pr-submit:active { transform: scale(0.97); }
#promo-redeem-card button.pr-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#promo-redeem-card .pr-status {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  min-height: 16px;
  position: relative;
  z-index: 1;
  line-height: 1.5;
}
#promo-redeem-card .pr-status.is-ok {
  color: #4ade80;
}
#promo-redeem-card .pr-status.is-err { color: #fca5a5; }
#promo-redeem-card .pr-status.is-info { color: rgba(253, 230, 138, 0.85); }

/* Spinner */
#promo-redeem-card .pr-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #1a1300;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  animation: prSpin 0.8s linear infinite;
}
@keyframes prSpin {
  to { transform: rotate(360deg); }
}

/* Subtle gold-glow flash on success */
#promo-redeem-card.pr-flash {
  animation: prFlashAnim 0.9s ease-out;
}
@keyframes prFlashAnim {
  0%   { box-shadow: inset 0 1px 0 rgba(245, 197, 66, 0.10), 0 4px 12px rgba(0, 0, 0, 0.35); }
  35%  { box-shadow: inset 0 0 0 2px rgba(245, 197, 66, 0.55), 0 0 30px rgba(245, 197, 66, 0.40); }
  100% { box-shadow: inset 0 1px 0 rgba(245, 197, 66, 0.10), 0 4px 12px rgba(0, 0, 0, 0.35); }
}
