/* ==========================================
   PRICING MODAL - Премиум модальное окно тарифов
   ========================================== */

.pricing-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pricing-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pricing-container {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, rgba(15,23,42,.95) 0%, rgba(11,18,32,.98) 100%);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 
    0 25px 50px rgba(0,0,0,.5),
    0 0 100px rgba(139,92,246,.2),
    inset 0 1px 0 rgba(255,255,255,.05);
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header */
.pricing-header {
  text-align: center;
  padding: 32px 32px 24px 32px;
  border-bottom: 1px solid rgba(139,92,246,.15);
  position: relative;
}

.pricing-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pricing-subtitle {
  font-size: 14px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

.pricing-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(15,23,42,.6);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pricing-close:hover {
  background: rgba(239,68,68,.2);
  border-color: rgba(239,68,68,.4);
  transform: rotate(90deg);
}

.pricing-close svg {
  width: 18px;
  height: 18px;
  color: #94a3b8;
}

.pricing-close:hover svg {
  color: #fca5a5;
}

/* Grid */
.pricing-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
}

/* Cards */
.pricing-card {
  background: rgba(15,23,42,.6);
  border: 1px solid rgba(139,92,246,.25);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.pricing-card.popular {
  border-color: rgba(245,158,11,.5);
  box-shadow: 0 0 30px rgba(245,158,11,.15);
}

.pricing-card.premium {
  border-color: rgba(139,92,246,.5);
  box-shadow: 0 0 30px rgba(139,92,246,.15);
}

/* Badge */
.pricing-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 0 16px 0 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(245,158,11,.4);
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}

/* Card Top - Flex Layout */
.pricing-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.pricing-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pricing-card-right {
  text-align: right;
}

/* Icon - Compact */
.pricing-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pricing-icon.starter {
  background: linear-gradient(135deg, rgba(59,130,246,.2) 0%, rgba(37,99,235,.2) 100%);
  border: 1px solid rgba(59,130,246,.3);
}

.pricing-icon.popular {
  background: linear-gradient(135deg, rgba(245,158,11,.25) 0%, rgba(217,119,6,.25) 100%);
  border: 1px solid rgba(245,158,11,.4);
}

.pricing-icon.profit {
  background: linear-gradient(135deg, rgba(16,185,129,.2) 0%, rgba(5,150,105,.2) 100%);
  border: 1px solid rgba(16,185,129,.3);
}

.pricing-icon.pro {
  background: linear-gradient(135deg, rgba(236,72,153,.2) 0%, rgba(219,39,119,.2) 100%);
  border: 1px solid rgba(236,72,153,.3);
}

.pricing-icon.unlimited {
  background: linear-gradient(135deg, rgba(139,92,246,.25) 0%, rgba(99,102,241,.25) 100%);
  border: 1px solid rgba(139,92,246,.4);
}

.pricing-icon svg {
  width: 22px;
  height: 22px;
}

.pricing-icon.starter svg {
  color: #60a5fa;
}

.pricing-icon.popular svg {
  color: #fbbf24;
}

.pricing-icon.profit svg {
  color: #6ee7b7;
}

.pricing-icon.pro svg {
  color: #f472b6;
}

.pricing-icon.unlimited svg {
  color: #a78bfa;
}

/* Plan Name & Credits */
.pricing-plan-name {
  font-size: 18px;
  font-weight: 700;
  color: #e5e7eb;
  margin: 0 0 4px 0;
}

.pricing-credits {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Price - Large Right Side */
.pricing-price {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 2px;
  line-height: 1;
}

.pricing-currency {
  font-size: 16px;
  font-weight: 700;
  color: #94a3b8;
}

.pricing-amount {
  font-size: 36px;
  font-weight: 900;
  color: #e5e7eb;
}

.pricing-card.popular .pricing-amount {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pricing-card.premium .pricing-amount {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pricing-per-unit {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* Economy Badge */
.pricing-economy {
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #6ee7b7;
  margin-bottom: 12px;
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.25);
  border-radius: 6px;
  padding: 4px 8px;
}

/* Features - Compact */
.pricing-features {
  margin-bottom: 16px;
}

.pricing-feature {
  font-size: 13px;
  color: #cbd5e1;
  margin-bottom: 6px;
  line-height: 1.4;
}

.pricing-feature:last-child {
  margin-bottom: 0;
}

/* Button */
.pricing-btn {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(139,92,246,.2) 0%, rgba(99,102,241,.2) 100%);
  border: 1px solid rgba(139,92,246,.4);
  border-radius: 10px;
  color: #a78bfa;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pricing-btn.popular {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: rgba(245,158,11,.6);
  color: white;
  box-shadow: 0 4px 16px rgba(245,158,11,.25);
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
}

.pricing-btn.premium {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  border-color: rgba(139,92,246,.6);
  color: white;
  box-shadow: 0 4px 16px rgba(139,92,246,.25);
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
}

/* Footer */
.pricing-footer {
  text-align: center;
  padding: 20px 32px 24px 32px;
  border-top: 1px solid rgba(139,92,246,.15);
}

.pricing-footer p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

.pricing-footer svg {
  width: 18px;
  height: 18px;
  color: #6ee7b7;
}

/* Scrollbar */
.pricing-container::-webkit-scrollbar {
  width: 6px;
}

.pricing-container::-webkit-scrollbar-track {
  background: rgba(15,23,42,.5);
  border-radius: 3px;
}

.pricing-container::-webkit-scrollbar-thumb {
  background: rgba(139,92,246,.4);
  border-radius: 3px;
}

.pricing-container::-webkit-scrollbar-thumb:hover {
  background: rgba(139,92,246,.6);
}

/* Responsive Design */
@media (max-width: 640px) {
  .pricing-container {
    border-radius: 20px;
  }
  
  .pricing-header {
    padding: 24px 20px 20px 20px;
  }
  
  .pricing-title {
    font-size: 24px;
  }
  
  .pricing-subtitle {
    font-size: 13px;
  }
  
  .pricing-grid {
    padding: 20px;
    gap: 10px;
  }
  
  .pricing-card {
    padding: 16px;
  }
  
  .pricing-icon {
    width: 40px;
    height: 40px;
  }
  
  .pricing-icon svg {
    width: 20px;
    height: 20px;
  }
  
  .pricing-plan-name {
    font-size: 16px;
  }
  
  .pricing-amount {
    font-size: 32px;
  }
  
  .pricing-close {
    width: 32px;
    height: 32px;
    top: 14px;
    right: 14px;
  }
  
  .pricing-close svg {
    width: 16px;
    height: 16px;
  }
  
  .pricing-footer {
    padding: 16px 20px 20px 20px;
  }

  .payment-method-options {
    flex-direction: column;
  }
}

/* Payment Method Selector */
.payment-method-selector {
  margin-top: 12px;
  padding: 12px;
  background: rgba(15,23,42,.8);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 10px;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

.payment-method-selector.show {
  opacity: 1;
  transform: translateY(0);
}

.payment-method-title {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  text-align: center;
}

.payment-method-options {
  display: flex;
  gap: 8px;
}

.payment-method-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(139,92,246,.1);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-method-btn:hover {
  background: rgba(139,92,246,.2);
  border-color: rgba(139,92,246,.5);
  color: #e5e7eb;
}

.payment-method-btn svg {
  width: 18px;
  height: 18px;
}

/* Button Spinner */
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: white;
  border-radius: 50%;
  animation: pricing-spin 0.8s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

@keyframes pricing-spin {
  to { transform: rotate(360deg); }
}

.pricing-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Payment Toast */
.payment-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10001;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  opacity: 0;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.payment-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.payment-toast--error {
  background: #dc2626;
  color: white;
}

.payment-toast--success {
  background: #16a34a;
  color: white;
}

.payment-toast__icon {
  font-size: 18px;
}
