/* ============================
   Pricing Section Plugin CSS
   ============================ */

#pricing-section-wrapper {
  --ps-primary: #1a3f6f;
  --ps-primary-fg: #ffffff;
  --ps-hero-bg: #1a3364;
  --ps-popular: #f57c00;
  --ps-check: #4caf50;
  --ps-save-bg: #e8f5e9;
  --ps-save-fg: #2e7d32;
  --ps-border: #e2e8f0;
  --ps-muted: #64748b;
  --ps-card-bg: #ffffff;
  --ps-bg: #f8fafc;
  --ps-text: #1e293b;
  --ps-radius: 16px;

  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ps-text);
  line-height: 1.5;
  box-sizing: border-box;
}

#pricing-section-wrapper *, #pricing-section-wrapper *::before, #pricing-section-wrapper *::after {
  box-sizing: border-box;
}

/* Hero */
.ps-hero { background: var(--ps-hero-bg); padding: 64px 16px 128px; text-align: center; }
.ps-hero__title { font-size: 2.5rem; font-weight: 700; color: var(--ps-primary-fg); margin: 0; }
.ps-hero__title em { font-style: italic; }
.ps-hero__subtitle { margin-top: 12px; font-size: 0.875rem; color: rgba(255,255,255,0.7); }

/* Controls bar */
.ps-controls-outer { max-width: 1280px; margin: -80px auto 0; padding: 0 16px; position: relative; z-index: 10; }
.ps-controls { max-width: 780px; margin: 0 auto; background: var(--ps-card-bg); border: 1px solid var(--ps-border); border-radius: var(--ps-radius); padding: 16px 24px; display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
.ps-toggle-group { display: flex; align-items: center; gap: 12px; }
.ps-toggle-label { font-size: 0.875rem; font-weight: 500; color: var(--ps-muted); transition: color 0.2s; }
.ps-toggle-label[data-active="yearly"].active,
.ps-toggle-label[data-active="monthly"].active { color: var(--ps-text); }

/* Toggle switch */
.ps-toggle-switch { width: 44px; height: 24px; background: var(--ps-primary); border: none; border-radius: 12px; position: relative; cursor: pointer; transition: background 0.2s; padding: 0; }
.ps-toggle-switch__thumb { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: white; border-radius: 50%; transition: transform 0.2s; }
.ps-toggle-switch[data-yearly="true"] .ps-toggle-switch__thumb { transform: translateX(20px); }
.ps-toggle-switch[data-yearly="false"] .ps-toggle-switch__thumb { transform: translateX(0); }

.ps-save-badge { background: var(--ps-save-bg); color: var(--ps-save-fg); font-size: 0.75rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; }
.ps-divider { width: 1px; height: 24px; background: var(--ps-border); }

/* Checkboxes */
.ps-checkboxes { display: flex; align-items: center; gap: 24px; }
.ps-checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 500; cursor: pointer; user-select: none; }
.ps-checkbox { display: none; }
.ps-checkbox-custom { width: 18px; height: 18px; border: 2px solid var(--ps-border); border-radius: 4px; display: flex; align-items: center; justify-content: center; transition: all 0.15s; flex-shrink: 0; }
.ps-checkbox:checked + .ps-checkbox-custom { background: var(--ps-primary); border-color: var(--ps-primary); }
.ps-checkbox:checked + .ps-checkbox-custom::after { content: '✓'; color: white; font-size: 12px; font-weight: 700; }
.ps-tm { color: var(--ps-popular); font-size: 0.65em; }
.ps-info-icon { color: var(--ps-muted); opacity: 0.5; cursor: help; font-size: 0.85em; position: relative; }
.ps-info-icon:hover::after { content: attr(data-tooltip); position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%); background: var(--ps-text); color: white; padding: 8px 12px; border-radius: 8px; font-size: 0.75rem; font-weight: 400; width: 240px; text-align: left; z-index: 100; box-shadow: 0 4px 12px rgba(0,0,0,0.15); line-height: 1.4; }

/* Cards grid */
.ps-cards { max-width: 1280px; margin: 40px auto 0; padding: 0 16px 80px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1100px) { .ps-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .ps-cards { grid-template-columns: 1fr; }
  .ps-hero__title { font-size: 1.75rem; }
  .ps-controls { flex-direction: column; gap: 16px; }
  .ps-divider { width: 100%; height: 1px; }
  .ps-checkboxes { flex-direction: column; gap: 12px; }
}

/* Card */
.ps-card { background: var(--ps-card-bg); border: 1px solid var(--ps-border); border-radius: var(--ps-radius); position: relative; display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(0,0,0,0.04); transition: box-shadow 0.2s; }
.ps-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.ps-card--popular { border: 2px solid var(--ps-popular); box-shadow: 0 4px 16px rgba(245,124,0,0.12); }
.ps-card__badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--ps-popular); color: white; font-size: 0.8125rem; font-weight: 600; padding: 5px 20px; border-radius: 999px; white-space: nowrap; }
.ps-card__header { padding: 24px 24px 0; padding-top: 32px; }
.ps-card__name { font-size: 1.25rem; font-weight: 700; margin: 0; }

/* Select dropdown */
.ps-select-wrap { margin-top: 16px; position: relative; }
.ps-select { width: 100%; padding: 10px 36px 10px 14px; border: 1px solid var(--ps-border); border-radius: 8px; font-size: 0.875rem; background: white; appearance: none; cursor: pointer; color: var(--ps-text); font-family: inherit; }
.ps-select-wrap::after { content: '▾'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ps-muted); }
.ps-static-label { width: 100%; padding: 10px 14px; border: 1px solid var(--ps-border); border-radius: 8px; font-size: 0.875rem; background: var(--ps-bg); color: var(--ps-text); }

/* Pricing */
.ps-price-area { margin-top: 20px; padding: 0 24px; }
.ps-price-row { display: flex; align-items: baseline; gap: 4px; }
.ps-currency { font-size: 0.875rem; color: var(--ps-muted); }
.ps-amount { font-size: 2.5rem; font-weight: 700; color: var(--ps-text); }
.ps-period { font-size: 0.875rem; color: var(--ps-muted); }
.ps-yearly-total { font-size: 0.75rem; color: var(--ps-muted); margin-left: 8px; }
.ps-per-user { font-size: 0.75rem; color: var(--ps-muted); margin-top: 4px; }
.ps-billed { font-size: 0.75rem; color: var(--ps-muted); margin-top: 4px; }
.ps-enterprise-text { font-size: 1.1rem; font-weight: 700; margin: 0; }
.ps-enterprise-sub { font-size: 0.875rem; color: var(--ps-muted); margin-top: 4px; }
.ps-enterprise-sub a { color: var(--ps-popular); text-decoration: none; font-weight: 500; }
.ps-enterprise-sub a:hover { text-decoration: underline; }

/* CTA */
.ps-cta-area { padding: 20px 24px 0; }
.ps-cta { display: block; width: 100%; padding: 12px; border-radius: 999px; font-size: 0.875rem; font-weight: 600; text-align: center; cursor: pointer; transition: all 0.2s; text-decoration: none; border: 2px solid var(--ps-primary); background: transparent; color: var(--ps-primary); font-family: inherit; }
.ps-cta:hover { background: var(--ps-primary); color: white; }
.ps-cta--popular { background: var(--ps-popular); border-color: var(--ps-popular); color: white; }
.ps-cta--popular:hover { opacity: 0.9; background: var(--ps-popular); color: white; }
.ps-cta-sub { text-align: center; font-size: 0.75rem; color: var(--ps-muted); margin-top: 8px; }

/* Features */
.ps-features { padding: 16px 24px 24px; border-top: 1px solid var(--ps-border); margin-top: 20px; flex: 1; }
.ps-feature-section { margin-top: 16px; }
.ps-feature-section:first-child { margin-top: 0; }
.ps-feature-title { font-size: 0.875rem; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.ps-feature-icon { width: 16px; height: 16px; display: inline-flex; }
.ps-feature-list { list-style: none; margin: 0; padding: 0; }
.ps-feature-item { display: flex; align-items: flex-start; gap: 10px; font-size: 0.8125rem; padding: 5px 0; }
.ps-feature-icon-check { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; color: var(--ps-check); }
.ps-feature-icon-x { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; color: var(--ps-border); }
.ps-feature-text--disabled { opacity: 0.4; }
.ps-promo-tag { margin-left: auto; background: var(--ps-save-bg); color: var(--ps-save-fg); font-size: 0.625rem; font-weight: 600; padding: 2px 6px; border-radius: 4px; flex-shrink: 0; }
