/* ═══════════════════════════════════════════════════════
   NasajTools — Pricing Page Styles
   ═══════════════════════════════════════════════════════ */

.pricing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Pricing Hero ── */
.pricing-hero {
  padding: 140px 24px 40px;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.pricing-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--hero-heading-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}

.pricing-hero p {
  font-size: 1.05rem;
  color: var(--dark-text);
  opacity: 0.65;
  line-height: 1.6;
}

.pricing-account-panel {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
}

.pricing-account-copy {
  color: var(--dark-text);
  font-size: 0.95rem;
  opacity: 0.82;
}

.pricing-account-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.pricing-inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.pricing-inline-link.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--dark-text);
}

.pricing-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

/* ── Pricing Grid ── */
.pricing-section {
  padding: 20px 24px 60px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 60px;
}

.pricing-card {
  background: var(--tool-card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(58, 90, 254, 0.15);
}

.light-mode .pricing-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.08);
}

/* Featured card */
.pricing-card.featured {
  border-color: rgba(58, 90, 254, 0.4);
  background: linear-gradient(180deg, rgba(58, 90, 254, 0.08), var(--tool-card-bg));
  transform: scale(1.03);
}

.pricing-card.featured:hover {
  transform: scale(1.03) translateY(-6px);
}

.light-mode .pricing-card.featured {
  background: linear-gradient(180deg, rgba(58, 90, 254, 0.06), rgba(255, 255, 255, 0.95));
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 16px;
  border-radius: 20px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.pricing-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.3rem;
}

.pricing-card:nth-child(1) .pricing-icon { background: rgba(58, 90, 254, 0.12); color: #3a5afe; }
.pricing-card:nth-child(2) .pricing-icon { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.pricing-card:nth-child(3) .pricing-icon { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.pricing-card:nth-child(4) .pricing-icon { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }

.pricing-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 4px;
}

.pricing-credits {
  font-size: 0.9rem;
  color: var(--dark-text);
  opacity: 0.55;
  margin-bottom: 20px;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark-text);
  margin-bottom: 4px;
  line-height: 1;
}

.pricing-price sup {
  font-size: 1.2rem;
  font-weight: 600;
  vertical-align: super;
}

.pricing-per-credit {
  font-size: 0.82rem;
  color: var(--dark-text);
  opacity: 0.5;
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: start;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  font-size: 0.88rem;
  color: var(--dark-text);
  opacity: 0.75;
}

.pricing-features li i {
  color: #10b981;
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 0.3em;
}

.pricing-buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.pricing-card.featured .pricing-buy-btn {
  background: var(--primary-gradient);
  color: #fff;
}

.pricing-card.featured .pricing-buy-btn:hover {
  box-shadow: 0 6px 20px rgba(58, 90, 254, 0.4);
  transform: translateY(-2px);
}

.pricing-card:not(.featured) .pricing-buy-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--dark-text);
}

.pricing-card:not(.featured) .pricing-buy-btn:hover {
  background: rgba(58, 90, 254, 0.1);
  border-color: rgba(58, 90, 254, 0.3);
}

.light-mode .pricing-card:not(.featured) .pricing-buy-btn {
  background: #f8f9fb;
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e1e2a;
}

/* ── Tool Cost Table ── */
.credit-cost-section {
  margin-bottom: 60px;
}

.credit-cost-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-text);
  text-align: center;
  margin-bottom: 8px;
}

.credit-cost-section > p {
  text-align: center;
  color: var(--dark-text);
  opacity: 0.55;
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.credit-table {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--tool-card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
}

.light-mode .credit-table {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.08);
}

.credit-table th {
  padding: 14px 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--dark-text);
  opacity: 0.5;
  text-align: start;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
}

.credit-table td {
  padding: 14px 20px;
  font-size: 0.92rem;
  color: var(--dark-text);
  text-align: start;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.credit-table th:nth-child(2),
.credit-table td:nth-child(2) {
  text-align: center;
  width: 190px;
}

.light-mode .credit-table td {
  border-bottom-color: rgba(0, 0, 0, 0.04);
}

.credit-table tr:last-child td {
  border-bottom: none;
}

.credit-cost-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  font-size: 0.8rem;
  font-weight: 600;
}

.credit-note {
  max-width: 600px;
  margin: 14px auto 0;
  text-align: center;
  color: var(--dark-text);
  opacity: 0.75;
  font-size: 0.92rem;
  line-height: 1.5;
}

.credit-note.subtle {
  opacity: 0.58;
  font-size: 0.88rem;
}

html[lang="ar"] .pricing-grid {
  direction: rtl;
}

html[lang="ar"] .pricing-features li {
  flex-direction: row-reverse;
  text-align: right;
}

html[lang="ar"] .pricing-buy-btn {
  flex-direction: row-reverse;
}

html[lang="ar"] .credit-table {
  direction: rtl;
}

html[lang="ar"] .credit-table td:first-child,
html[lang="ar"] .credit-table th:first-child {
  text-align: right;
}

html[lang="ar"] .credit-table td:first-child > i:first-child {
  margin-right: 0 !important;
  margin-left: 8px !important;
}

html[lang="ar"] .credit-note,
html[lang="ar"] .credit-note.subtle,
html[lang="ar"] .credit-cost-section > p {
  max-width: 760px;
}

/* ── Pricing FAQ ── */
.pricing-faq {
  max-width: 700px;
  margin: 0 auto 40px;
}

.pricing-faq h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-text);
  text-align: center;
  margin-bottom: 24px;
}

/* ── Payment Toast ── */
.faq-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.faq-item:hover {
  border-color: rgba(58, 90, 254, 0.28);
  box-shadow: 0 14px 36px rgba(8, 15, 45, 0.18);
}

.faq-item.active {
  background: rgba(58, 90, 254, 0.08);
  border-color: rgba(58, 90, 254, 0.36);
  box-shadow: 0 18px 42px rgba(18, 35, 100, 0.2);
}

.light-mode .faq-item {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(0, 0, 0, 0.08);
}

.light-mode .faq-item:hover,
.light-mode .faq-item.active {
  box-shadow: 0 18px 36px rgba(58, 90, 254, 0.12);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark-text);
  cursor: pointer;
  line-height: 1.4;
}

.faq-icon {
  flex-shrink: 0;
  color: var(--primary-light);
  font-size: 0.95rem;
  transition: transform 0.25s ease, color 0.25s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 22px;
  color: var(--dark-text);
  opacity: 0.72;
  font-size: 0.96rem;
  line-height: 1.75;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.25s ease;
}

.faq-item.active .faq-answer {
  max-height: 220px;
  padding: 0 22px 20px;
  opacity: 0.88;
}

.payment-toast {
  position: fixed;
  top: 100px;
  right: 24px;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  animation: toastSlideIn 0.4s ease, toastFadeOut 0.4s ease 4s forwards;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.payment-toast.success {
  background: rgba(16, 185, 129, 0.95);
  color: #fff;
}

.payment-toast.cancelled {
  background: rgba(245, 158, 11, 0.95);
  color: #fff;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastFadeOut {
  to { opacity: 0; transform: translateX(40px); }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing-card.featured {
    transform: none;
  }
  .pricing-card.featured:hover {
    transform: translateY(-6px);
  }
}

@media (max-width: 600px) {
  .pricing-hero {
    padding: 110px 16px 24px;
  }
  .pricing-hero h1 {
    font-size: 1.75rem;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .pricing-section {
    padding: 12px 16px 40px;
  }
  .pricing-card {
    padding: 28px 20px;
  }
  .pricing-price {
    font-size: 2rem;
  }
  .pricing-account-panel {
    padding: 14px;
  }
  .pricing-inline-link {
    width: 100%;
  }
  .faq-question {
    padding: 18px 18px 16px;
    font-size: 0.95rem;
  }
  .faq-answer {
    padding: 0 18px;
    font-size: 0.92rem;
  }
  .faq-item.active .faq-answer {
    padding: 0 18px 18px;
    max-height: 320px;
  }
}
