/**
 * Affiliate Popup Styles — 1WIN Partners
 * Slide-in card from bottom-right, dark branded design.
 */

/* ==========================================================================
   Popup Backdrop + Container
   ========================================================================== */
.aff-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 24px;
  pointer-events: none;
}

.aff-popup--visible {
  pointer-events: auto;
}

.aff-popup-inner {
  position: relative;
  width: 340px;
  max-width: calc(100vw - 48px);
  background: linear-gradient(145deg, #0f172a 0%, #1a1036 60%, #0e0e1f 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  border-radius: 20px;
  padding: 1.4rem 1.5rem 1.1rem;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(251, 191, 36, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(120px) scale(0.95);
  opacity: 0;
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s ease;
  overflow: hidden;
}

/* Glowing top bar accent */
.aff-popup-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #fbbf24, #f59e0b, #fbbf24, transparent);
  border-radius: 20px 20px 0 0;
}

.aff-popup--visible .aff-popup-inner {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.aff-popup--hidden .aff-popup-inner {
  transform: translateY(40px) scale(0.95);
  opacity: 0;
}

/* ==========================================================================
   Close button
   ========================================================================== */
.aff-popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
}

.aff-popup-close:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.5);
  color: #f43f5e;
}

/* ==========================================================================
   Header: logo + brand
   ========================================================================== */
.aff-popup-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.aff-popup-logo-wrap {
  width: 72px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid rgba(251, 191, 36, 0.5);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.3);
  flex-shrink: 0;
}

.aff-popup-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aff-popup-badge-col {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.aff-popup-sponsored {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(251, 191, 36, 0.55);
}

.aff-popup-partner-name {
  font-size: 1rem;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.2px;
}

/* ==========================================================================
   Body
   ========================================================================== */
.aff-popup-body {
  margin-bottom: 1rem;
}

.aff-popup-headline {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fde68a;
  margin: 0 0 0.45rem;
  line-height: 1.35;
}

.aff-popup-message {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin: 0 0 0.8rem;
}

.aff-popup-message strong {
  color: #f1f5f9;
  font-weight: 700;
}

/* Promo code row */
.aff-popup-code-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
}

.aff-popup-code-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.aff-popup-code {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: #38bdf8;
  letter-spacing: 1px;
}

.aff-popup-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.1rem 0.2rem;
  border-radius: 4px;
  transition: transform 0.15s ease;
  line-height: 1;
}

.aff-popup-copy-btn:hover { transform: scale(1.25); }

/* ==========================================================================
   CTA Button
   ========================================================================== */
.aff-popup-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fde68a 100%);
  color: #0a0a0a;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.4);
  margin-bottom: 0.7rem;
}

.aff-popup-cta:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #fde68a 100%);
  box-shadow: 0 6px 24px rgba(251, 191, 36, 0.65);
  transform: translateY(-1px);
}

/* ==========================================================================
   Disclaimer
   ========================================================================== */
.aff-popup-disclaimer {
  font-size: 0.62rem;
  color: #475569;
  text-align: center;
  margin: 0;
  letter-spacing: 0.3px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 480px) {
  .aff-popup {
    padding: 12px;
    align-items: flex-end;
    justify-content: center;
  }
  .aff-popup-inner {
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
  }
}
