/**
 * Billing & Plans Styles
 * Matches marketing/v2 pricing aesthetic — clean dividers, flat cards, light type
 */

/* ── Status Card ── */
.billing-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  margin-bottom: 20px;
}

.billing-status-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary, #e2e8f0);
  margin: 0 0 4px 0;
}

.billing-status-msg {
  font-size: 13px;
  color: var(--color-text-secondary, rgba(226,232,240,0.55));
  margin: 0;
  font-weight: 300;
}

/* ── Section label ── */
.billing-section {
  margin-bottom: 20px;
}

.billing-section-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(226, 232, 240, 0.35);
  margin-bottom: 10px;
}

/* ── Payment Methods ── */
.payment-methods {
  display: flex;
  gap: 1px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
}

.payment-method {
  flex: 1;
  padding: 14px 18px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface, #0e0e12);
}

.payment-method:hover {
  background: rgba(255, 255, 255, 0.03);
}

.payment-method input[type="radio"] {
  accent-color: var(--brand, #06b6d4);
}

.payment-method.selected {
  background: rgba(6, 182, 212, 0.04);
}

.payment-method-info h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary, #e2e8f0);
  margin: 0 0 2px 0;
}

.payment-method-info p {
  font-size: 11px;
  color: rgba(226, 232, 240, 0.4);
  margin: 0;
  font-weight: 300;
}

/* ── Billing Interval Toggle ── */
.billing-interval {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 20px 0;
  padding: 14px 0;
}

.billing-interval label {
  color: rgba(226, 232, 240, 0.4);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  cursor: pointer;
}

.billing-interval label.active {
  color: var(--color-text-primary, #e2e8f0);
}

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

.billing-interval .interval-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.billing-interval .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  transition: 0.25s;
  border-radius: 24px;
}

.billing-interval .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: rgba(226, 232, 240, 0.7);
  transition: 0.25s;
  border-radius: 50%;
}

.billing-interval input:checked + .slider {
  background-color: rgba(6, 182, 212, 0.25);
}

.billing-interval input:checked + .slider:before {
  transform: translateX(20px);
  background-color: #67e8f9;
}

.billing-interval .discount-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ── Plans Grid — v2 landing page style ── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
}

/* ── Plan Card ── */
.plan-card {
  position: relative;
  background: var(--bg-surface, #0f172a);
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
  transition: background 0.3s;
}

.plan-card:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* ── Plan Current State ── */
.plan-card.plan-current {
  background: rgba(6, 182, 212, 0.03);
}

/* ── Recommended (Plus) — accent line on top ── */
.plan-recommended {
  position: relative;
}

.plan-recommended::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand, #06b6d4), transparent);
  opacity: 0.6;
}

.plan-badge {
  position: absolute;
  top: 12px;
  right: 16px;
  background: linear-gradient(135deg, #5eadb8, #4a9ba6);
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* ── Plan Header ── */
.plan-header {
  margin-bottom: 24px;
}

.plan-tier-label {
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text-primary, #e2e8f0);
}

.plan-tagline {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.35);
  margin: 4px 0 20px;
  font-weight: 300;
}

.plan-price {
  line-height: 1;
}

.plan-price .price-amount {
  font-size: 32px;
  font-weight: 600;
  color: var(--color-text-primary, #e2e8f0);
  letter-spacing: -0.02em;
}

.plan-price .price-period {
  font-size: 14px;
  font-weight: 300;
  color: rgba(226, 232, 240, 0.35);
}

/* ── Feature Groups ── */
.plan-features-scroll {
  flex: 1;
  margin-bottom: 28px;
}

.plan-feature-group {
  margin-bottom: 14px;
}

.plan-feature-group:last-child {
  margin-bottom: 0;
}

.plan-feature-group-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: rgba(226, 232, 240, 0.55);
  margin-bottom: 4px;
  padding-top: 2px;
}

/* "Everything in X, plus:" style — no bullet group, just label */
.plan-feature-group:first-child:not(:has(ul)) .plan-feature-group-label {
  color: rgba(226, 232, 240, 0.45);
  font-weight: 400;
  font-size: 12px;
  margin-bottom: 8px;
}

/* ── Plan Features ── */
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plan-features li {
  padding: 4px 0 4px 16px;
  color: rgba(226, 232, 240, 0.6);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.55;
  position: relative;
}

.plan-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.4);
}

/* ── CTA Button ── */
.plan-card > .btn {
  display: block;
  text-align: center;
  width: 100%;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s;
  cursor: pointer;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.45);
  background: transparent;
}

.plan-card > .btn:hover {
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(226, 232, 240, 0.7);
}

.plan-card > .btn:disabled {
  cursor: default;
  opacity: 0.6;
}

/* Upgrade buttons — brand style */
.plan-card > .btn-brand {
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.5);
  background: transparent;
}

.plan-card > .btn-brand:hover {
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(226, 232, 240, 0.7);
}

/* Recommended card CTA — filled teal like v2 */
.plan-recommended > .btn-brand {
  background: linear-gradient(135deg, #5eadb8, #4a9ba6);
  border-color: transparent;
  color: #fff;
}

.plan-recommended > .btn-brand:hover {
  opacity: 0.85;
}

/* Secondary (disabled / included) */
.plan-card > .btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.35);
  background: transparent;
}

/* ── Trial Note ── */
.billing-trial-note {
  text-align: center;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.3);
  font-weight: 300;
  padding: 4px 0 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .payment-methods {
    flex-direction: column;
  }

  .billing-status-card {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}
