/**
 * Token Limit Modal Styles
 * D&D-themed modal for daily message limits and token purchases
 */

/* ============================================================================
   MODAL CONTAINER
   ============================================================================ */

.token-limit-modal {
  max-width: 600px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  position: relative;
}

.token-limit-modal .modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

/* ============================================================================
   HEADER
   ============================================================================ */

.token-limit-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1.5rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.token-limit-icon {
  font-size: 3rem;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(255, 223, 0, 0.5));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(255, 223, 0, 0.8));
  }
}

.token-limit-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary-color);
  text-align: center;
  font-family: "Cinzel", serif;
}

/* ============================================================================
   BODY
   ============================================================================ */

.token-limit-body {
  padding: 1.5rem 1.5rem 1rem;
}

.token-limit-message {
  text-align: center;
  margin-bottom: 1.5rem;
}

.token-limit-primary {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.token-limit-secondary {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* ============================================================================
   DIVIDER
   ============================================================================ */

.token-limit-divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
}

.token-limit-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--glass-border) 20%,
    var(--glass-border) 80%,
    transparent
  );
}

.token-limit-divider-text {
  position: relative;
  display: inline-block;
  padding: 0 1rem;
  background: var(--glass-bg);
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================================================
   PURCHASE SECTION
   ============================================================================ */

.token-limit-purchase {
  margin: 1.5rem 0;
}

.token-limit-purchase-text {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  color: var(--primary-color);
}

/* Pricing Info Section */
.token-pricing-info {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.pricing-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pricing-info-row:last-of-type {
  border-bottom: none;
  padding-bottom: 0.25rem;
}

.pricing-info-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.pricing-info-value {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
  font-family: "Courier New", monospace;
}

.pricing-highlight {
  color: var(--primary-color);
  font-size: 1.05rem;
}

.pricing-info-note {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-align: center;
  line-height: 1.4;
}

.token-purchase-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.token-purchase-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 0.75rem;
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 100px;
}

.token-purchase-btn:hover {
  transform: translateY(-2px);
  border-color: #00ffff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.6), 0 0 40px rgba(0, 255, 255, 0.4),
    0 8px 24px rgba(0, 0, 0, 0.3);
  animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6), 0 0 40px rgba(0, 255, 255, 0.4),
      0 8px 24px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8), 0 0 60px rgba(0, 255, 255, 0.6),
      0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

.token-purchase-btn:active {
  transform: translateY(0);
}

.token-purchase-popular {
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(100, 50, 200, 0.3);
}

.token-purchase-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.75rem;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 12px;
  white-space: nowrap;
}

.token-purchase-count {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: inherit;
}

.token-purchase-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffd700;
  order: -1;
  font-family: inherit;
}

/* ============================================================================
   STATS SECTION
   ============================================================================ */

.token-limit-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.token-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.token-stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  font-family: inherit;
}

.token-stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  font-family: inherit;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.token-limit-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 600px) {
  .token-limit-header h2 {
    font-size: 1.2rem;
  }

  .token-purchase-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .token-limit-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .token-stat-item {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ============================================================================
   DARK MODE ADJUSTMENTS
   ============================================================================ */

@media (prefers-color-scheme: dark) {
  .token-purchase-btn {
    background: rgba(255, 255, 255, 0.05);
  }

  .token-purchase-btn:hover {
    background: rgba(255, 255, 255, 0.08);
  }
}
