/* css/monetization.css */

/* ═══════════════════════════════════════════════════════════════
   KO-FI BUTTON — always visible, bottom right
   ═══════════════════════════════════════════════════════════════ */

.kofi-button {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #ff5e5b 0%, #ff8c42 100%);
  color: white;
  border-radius: 20px;
  text-decoration: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  box-shadow: 0 4px 12px rgba(255, 94, 91, 0.35);
  transition: all 0.25s ease-out;
  opacity: 0.85;
  cursor: pointer;
}
.kofi-button:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 94, 91, 0.5);
}
.kofi-icon {
  font-size: 16px;
}
.kofi-text {
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 10px;
}

@media (max-width: 768px) {
  .kofi-button {
    bottom: max(12px, env(safe-area-inset-bottom));
    right: 12px;
    padding: 6px 12px;
    font-size: 11px;
  }
  .kofi-text {
    display: none; /* Just show icon on mobile to save space */
  }
  .kofi-icon {
    font-size: 18px;
  }
}

.kofi-button.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   PAYWALL MODAL
   ═══════════════════════════════════════════════════════════════ */

.paywall-overlay {
  position: fixed; inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: paywall-in 0.4s ease-out;
}
.paywall-overlay.closing {
  animation: paywall-out 0.3s ease-in forwards;
}

.paywall-backdrop {
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(40, 15, 60, 0.85) 0%, rgba(0,0,0,0.95) 70%);
  backdrop-filter: blur(14px);
}

.paywall-card {
  position: relative;
  background: var(--bg-void);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 32px 40px;
  width: 520px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 80px rgba(248, 216, 120, 0.15), 0 0 120px rgba(176, 133, 255, 0.1);
}
.paywall-card::before {
  content: '';
  position: absolute;
  top: 0; left: 40px; right: 40px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  opacity: 0.8;
}

.paywall-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}
.paywall-label {
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 500;
}
.paywall-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
  letter-spacing: 0.08em;
  line-height: 1.3;
}

.paywall-body {
  margin-bottom: 20px;
}
.paywall-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  font-style: italic;
  text-align: center;
  margin-bottom: 24px;
}

.paywall-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-gold), transparent);
  margin: 20px 0;
}

.paywall-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.paywall-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(248, 216, 120, 0.04);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--gold);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.25s ease-out;
  width: 100%;
}
.paywall-option:hover {
  background: rgba(248, 216, 120, 0.1);
  border-left-width: 4px;
  padding-left: 21px;
  transform: translateX(2px);
}
.paywall-option-primary {
  background: rgba(94, 215, 255, 0.06);
  border-left-color: var(--cyan);
}
.paywall-option-primary:hover {
  background: rgba(94, 215, 255, 0.12);
  border-color: var(--cyan);
}
.paywall-option-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gold);
}
.paywall-option-primary .paywall-option-label {
  color: var(--cyan);
}
.paywall-option-sub {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
  font-weight: 400;
}
.paywall-option-price {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--gold);
  min-width: 60px;
  text-align: right;
}
.paywall-option-primary .paywall-option-price {
  color: var(--cyan);
}

.paywall-support {
  text-align: center;
}
.paywall-support-label {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  font-style: italic;
}
.paywall-kofi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: linear-gradient(135deg, #ff5e5b 0%, #ff8c42 100%);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(255, 94, 91, 0.3);
}
.paywall-kofi:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 94, 91, 0.5);
}

.paywall-footer {
  margin-top: 24px;
  text-align: center;
}
.paywall-close {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  padding: 10px 28px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.paywall-close:hover {
  background: rgba(248, 216, 120, 0.06);
  color: var(--text);
  border-color: var(--border-gold);
}

@keyframes paywall-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes paywall-out {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.95); }
}

/* Mobile paywall */
@media (max-width: 768px) {
  .paywall-card {
    padding: 24px 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    padding-top: max(32px, env(safe-area-inset-top)) !important;
    padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
  }
  .paywall-title {
    font-size: 18px !important;
  }
  .paywall-text {
    font-size: 13px !important;
  }
  .paywall-option {
    padding: 14px 16px !important;
  }
  .paywall-option-label {
    font-size: 13px !important;
  }
  .paywall-option-price {
    font-size: 16px !important;
  }
}
