/* ==========================================================================
   MacroSpyder - Subscription Plans & Pricing Stylesheet
   Path: assets/css/pages/plans.css
   ========================================================================== */

:root {
  --plans-hero-bg: radial-gradient(circle at 50% -20%, rgba(99, 102, 241, 0.15), transparent 70%);
  --card-glass-bg: var(--surface);
  --card-hover-border: var(--accent);
}

[data-theme="light"] {
  --plans-hero-bg: radial-gradient(circle at 50% -20%, rgba(79, 70, 229, 0.08), transparent 70%);
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  height: 50px;
  min-height: 50px;
  max-height: 50px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 16px;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Main Container */
.plans-wrapper {
  max-width: 1320px;
  margin: 0 auto;
  padding: 48px 24px 80px 24px;
  width: 100%;
  box-sizing: border-box;
}

.hero-section {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 16px 0;
  letter-spacing: -0.8px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.6;
  margin: 0 0 32px 0;
}

/* Billing Toggle */
.billing-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
}

.toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
}
.toggle-label.active {
  color: var(--text);
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.3s;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 0.3s ease;
}
input:checked + .slider {
  transform: translateX(24px);
}

.discount-tag {
  background: #10b981;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.2px;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 64px;
  align-items: stretch;
}

@media (max-width: 1023px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.tier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.tier-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.tier-card.is-current {
  border: 2px solid #10b981;
  padding: 27px 19px;
}

.current-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  background: #10b981;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.tier-header {
  margin-bottom: 24px;
}

.tier-name {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.tier-desc {
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
  min-height: 60px;
  line-height: 1.5;
}

.tier-price-box {
  margin-bottom: 24px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-height: 48px;
}

.price-amount {
  font-size: 36px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -1px;
}

.price-period {
  font-size: 14px;
  color: var(--text-muted, #94a3b8);
}

.device-limit-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface-2);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
  flex-grow: 1;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}
[data-theme="light"] .feature-item {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

.icon-check {
  color: #10b981;
  flex-shrink: 0;
}
.icon-cross {
  color: #ef4444;
  opacity: 0.5;
  flex-shrink: 0;
}

.tier-action-btn {
  display: block;
  width: 100%;
  padding: 12px 0;
  text-align: center;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
}
.btn-primary:hover {
  opacity: 0.92;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  background: var(--surface-2);
  border-color: var(--accent);
}

.btn-disabled {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: #10b981;
  cursor: default;
}

/* Comparison Section */
.comparison-section {
  margin-bottom: 64px;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
}

.comparison-table-wrapper {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.comparison-table th, .comparison-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  background: var(--surface-2);
  font-weight: 700;
}

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

/* FAQ Section */
.faq-section {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  padding: 18px 24px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-answer {
  padding: 0 24px 18px 24px;
  font-size: 14px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.6;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}
.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-icon {
  transition: transform 0.3s ease;
}

/* Footer */
.plans-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
  background: var(--surface);
}

