/* ==========================================================================
   FinBillx Website Pricing Section (Exact Webapp Alignment & Multi-Currency)
   ========================================================================== */

.pricing-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--fb-space-6);
  margin-bottom: var(--fb-space-10);
}

/* Currency Selector Segmented Pill */
.currency-selector {
  display: inline-flex;
  align-items: center;
  background: var(--fb-bg-card);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius-full);
  padding: 3px;
  box-shadow: var(--fb-shadow-sm);
}

.currency-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  border-radius: var(--fb-radius-full);
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: var(--fb-font-size-sm);
  font-weight: var(--fb-font-weight-medium);
  color: var(--fb-text-secondary);
  cursor: pointer;
  transition: all var(--fb-transition-fast);
}

.currency-btn.active {
  background: var(--fb-primary);
  color: var(--fb-primary-fg);
  font-weight: var(--fb-font-weight-semibold);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Billing Switch */
.pricing-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: var(--fb-space-2);
}

.toggle-label {
  font-size: var(--fb-font-size-sm);
  font-weight: var(--fb-font-weight-medium);
  color: var(--fb-text-secondary);
  cursor: pointer;
  user-select: none;
}

.toggle-label.active {
  color: var(--fb-text-primary);
  font-weight: var(--fb-font-weight-semibold);
}

.discount-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  background: var(--fb-success-bg);
  color: var(--fb-success-fg);
  border-radius: var(--fb-radius-full);
  font-size: 11px;
  font-weight: var(--fb-font-weight-semibold);
  margin-left: 4px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--fb-border-strong);
  transition: .2s ease;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

input:checked + .slider {
  background-color: var(--fb-primary);
}

input:checked + .slider:before {
  transform: translateX(18px);
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--fb-space-6);
  align-items: stretch;
  margin-bottom: var(--fb-space-12);
}

@media (max-width: 992px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }
}

.pricing-card {
  background: var(--fb-bg-card);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius-lg);
  padding: var(--fb-space-6);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color var(--fb-transition-fast), box-shadow var(--fb-transition-fast);
}

.pricing-card:hover {
  border-color: var(--fb-border-strong);
}

.pricing-card.popular {
  border-color: var(--fb-primary);
  box-shadow: var(--fb-shadow-card);
}

.popular-ribbon {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fb-primary);
  color: var(--fb-primary-fg);
  font-size: 11px;
  font-weight: var(--fb-font-weight-semibold);
  padding: 2px 10px;
  border-radius: var(--fb-radius-full);
}

.pricing-header {
  margin-bottom: var(--fb-space-4);
}

.plan-name {
  font-size: var(--fb-font-size-lg);
  font-weight: var(--fb-font-weight-bold);
  color: var(--fb-text-primary);
  margin-bottom: 2px;
}

.plan-desc {
  font-size: var(--fb-font-size-sm);
  color: var(--fb-text-muted);
  line-height: 1.4;
  min-height: 38px;
}

.plan-price-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--fb-space-5);
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.plan-price {
  font-size: var(--fb-font-size-3xl);
  font-weight: var(--fb-font-weight-bold);
  color: var(--fb-text-primary);
  letter-spacing: -0.02em;
}

.plan-period {
  font-size: var(--fb-font-size-sm);
  color: var(--fb-text-muted);
}

.plan-annual-note {
  font-size: 11px;
  color: var(--fb-success);
  font-weight: var(--fb-font-weight-medium);
  min-height: 16px;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--fb-space-2);
  margin-bottom: var(--fb-space-6);
  flex-grow: 1;
}

.pricing-features-title {
  font-size: var(--fb-font-size-xs);
  font-weight: var(--fb-font-weight-bold);
  color: var(--fb-text-primary);
  margin-bottom: var(--fb-space-2);
}

.pricing-feature-item {
  display: flex;
  align-items: center;
  gap: var(--fb-space-2);
  font-size: var(--fb-font-size-sm);
  color: var(--fb-text-secondary);
}

.pricing-feature-item svg {
  color: var(--fb-success);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.pricing-card .fb-btn-primary,
.pricing-card .fb-btn-ghost {
  width: 100%;
}
