/* calculator.css — Styles for the FeeWorth Annual Fee Calculator page
   Self-contained. Only loaded/used by calculator.html.
   Uses calc- prefix to avoid collisions with landing/app styles. */

/* ── Base ── */
.calc { background: #fff; color: #1a2332; line-height: 1.6; -webkit-font-smoothing: antialiased; font-family: 'Inter', -apple-system, system-ui, sans-serif; }
.calc *, .calc *::before, .calc *::after { box-sizing: border-box; }
.calc-container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Hide particle canvas */
body:has(.calc) #bg { display: none; }

/* ── Nav ── */
.calc-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e8ecf0; padding: 16px 0;
}
.calc-nav .calc-container { display: flex; align-items: center; justify-content: space-between; }
.calc-nav-logo {
  font-family: 'Georgia', serif; font-size: 1.6rem; font-style: italic;
  color: #2d4a3e; font-weight: 700; letter-spacing: -0.5px; text-decoration: none;
}
.calc-nav-cta {
  background: #1a6b5a; color: #fff; padding: 10px 24px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; transition: background 0.2s, transform 0.15s;
  cursor: pointer; border: none; font-family: inherit; text-decoration: none;
}
.calc-nav-cta:hover { background: #145a4b; transform: translateY(-1px); }

/* ── Hero ── */
.calc-hero { padding: 60px 0 40px; text-align: center; }
.calc-hero h1 {
  font-family: 'Georgia', serif; font-size: 2.8rem; line-height: 1.15;
  font-weight: 700; color: #1a2332; margin-bottom: 16px; letter-spacing: -1px;
}
.calc-hero-sub {
  font-size: 1.15rem; color: #4a5568; line-height: 1.7;
  max-width: 600px; margin: 0 auto 28px;
}
.calc-btn-primary {
  background: #1a6b5a; color: #fff; padding: 16px 36px; border-radius: 10px;
  font-weight: 700; font-size: 1.05rem; border: none; cursor: pointer;
  transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; font-family: inherit;
}
.calc-btn-primary:hover { background: #145a4b; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,107,90,0.25); }
.calc-btn-primary:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }

/* ── Fee Check Tool ── */
.calc-tool { padding: 40px 0 60px; }
.calc-tool-box {
  max-width: 680px; margin: 0 auto;
  background: #fff; border: 1px solid #e8ecf0; border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.06); overflow: hidden;
}
.calc-tool-header {
  background: #f8faf9; padding: 20px 28px; border-bottom: 1px solid #e8ecf0;
  display: flex; align-items: center; gap: 12px;
}
.calc-tool-icon {
  width: 40px; height: 40px; background: #e6f5f0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: #1a6b5a; flex-shrink: 0;
}
.calc-tool-title { font-weight: 700; font-size: 1.1rem; color: #1a2332; }
.calc-tool-subtitle { font-size: 0.85rem; color: #8a94a6; }
.calc-tool-body { padding: 28px; }

/* Search box */
.calc-search-wrap { position: relative; margin-bottom: 16px; }
.calc-search {
  width: 100%; padding: 14px 16px 14px 44px; border: 2px solid #e8ecf0; border-radius: 10px;
  font-size: 1rem; font-family: inherit; color: #1a2332; background: #fff;
  outline: none; transition: border-color 0.2s;
}
.calc-search:focus { border-color: #1a6b5a; }
.calc-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #8a94a6; pointer-events: none;
}
.calc-search-results {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  background: #fff; border: 1px solid #e8ecf0; border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.1); max-height: 280px; overflow-y: auto;
  margin-top: 4px;
}
.calc-search-item {
  padding: 12px 16px; cursor: pointer; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid #f0f2f5; transition: background 0.15s;
}
.calc-search-item:last-child { border-bottom: none; }
.calc-search-item:hover { background: #f0faf6; }
.calc-search-card-chip {
  width: 44px; height: 28px; border-radius: 4px; flex-shrink: 0;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 2px 4px;
  color: #fff; font-size: 0.5rem; font-weight: 700;
}
.calc-search-name { font-weight: 600; font-size: 0.95rem; color: #1a2332; }
.calc-search-meta { font-size: 0.8rem; color: #8a94a6; }
.calc-search-empty { padding: 20px; text-align: center; color: #8a94a6; font-size: 0.9rem; }

/* Selected card header */
.calc-card-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
  padding-bottom: 16px; border-bottom: 1px solid #f0f2f5;
}
.calc-card-art {
  width: 72px; height: 46px; border-radius: 6px;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 4px 6px;
  color: #fff; font-size: 0.55rem; font-weight: 700;
}
.calc-card-name { font-size: 1.2rem; font-weight: 700; color: #1a2332; }
.calc-card-issuer { font-size: 0.85rem; color: #8a94a6; }
.calc-change-btn {
  margin-left: auto; font-size: 0.82rem; color: #1a6b5a; font-weight: 600;
  cursor: pointer; background: none; border: none; font-family: inherit;
  padding: 6px 12px; border-radius: 6px; transition: background 0.15s;
}
.calc-change-btn:hover { background: #e6f5f0; }

/* Metrics row */
.calc-metrics {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 24px;
}
.calc-metric {
  text-align: center; padding: 14px 8px; border-radius: 10px;
  background: #f9fafb; border: 1px solid #e8ecf0;
}
.calc-metric-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.8px;
  color: #8a94a6; margin-bottom: 4px; font-weight: 600;
}
.calc-metric-value { font-size: 1.4rem; font-weight: 800; }
.calc-metric-value-fee { color: #1a2332; }
.calc-metric-value-used { color: #1a6b5a; }
.calc-net-box {
  background: #e6f5f0; border: 1px solid #c8e6dc; border-radius: 10px;
  padding: 14px 8px; text-align: center;
}
.calc-net-positive { color: #1a6b5a; }
.calc-net-negative { color: #dc2626; }

/* Benefits list */
.calc-benefits-label {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.8px;
  color: #8a94a6; font-weight: 600; margin-bottom: 10px;
}
.calc-benefit-row {
  display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f2f5;
  gap: 12px; cursor: pointer; transition: background 0.15s; margin: 0 -8px; padding-left: 8px; padding-right: 8px;
  border-radius: 6px;
}
.calc-benefit-row:hover { background: #f9fafb; }
.calc-benefit-row:last-child { border-bottom: none; }
.calc-benefit-check {
  width: 22px; height: 22px; border-radius: 6px; border: 2px solid #d0d5dd;
  flex-shrink: 0; position: relative; transition: all 0.15s;
}
.calc-benefit-check.checked { background: #1a6b5a; border-color: #1a6b5a; }
.calc-benefit-check.checked::after {
  content: ""; position: absolute; top: 3px; left: 6px;
  width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.calc-benefit-name { font-weight: 600; font-size: 0.92rem; color: #1a2332; flex: 1; }
.calc-benefit-tag {
  font-size: 0.72rem; padding: 3px 8px; border-radius: 4px;
  font-weight: 600; white-space: nowrap;
}
.calc-benefit-tag-travel { background: #e6f5f0; color: #1a6b5a; }
.calc-benefit-tag-dining { background: #fff3e6; color: #c67a00; }
.calc-benefit-tag-entertainment { background: #f0e6ff; color: #7c3aed; }
.calc-benefit-tag-statement { background: #e6f0ff; color: #2563eb; }
.calc-benefit-tag-status { background: #fef3cd; color: #92400e; }
.calc-benefit-tag-protection { background: #f0f0f0; color: #555; }
.calc-benefit-tag-awards { background: #fce8eb; color: #991b1b; }
.calc-benefit-value { font-weight: 700; font-size: 0.9rem; color: #1a6b5a; white-space: nowrap; }

/* Verdict */
.calc-verdict {
  margin-top: 24px; padding: 20px; border-radius: 12px; text-align: center;
}
.calc-verdict-keep { background: #e6f5f0; border: 1px solid #c8e6dc; }
.calc-verdict-cancel { background: #fef2f2; border: 1px solid #fecaca; }
.calc-verdict-icon { margin-bottom: 8px; }
.calc-verdict-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.calc-verdict-keep .calc-verdict-title { color: #1a6b5a; }
.calc-verdict-cancel .calc-verdict-title { color: #dc2626; }
.calc-verdict-desc { font-size: 0.9rem; color: #4a5568; }

/* Save prompt */
.calc-save-prompt {
  margin-top: 20px; padding: 16px; background: #f8faf9; border-radius: 10px;
  text-align: center; border: 1px solid #e8ecf0;
}
.calc-save-prompt p { font-size: 0.9rem; color: #4a5568; margin-bottom: 12px; }
.calc-save-btn {
  background: #1a6b5a; color: #fff; padding: 10px 24px; border-radius: 8px;
  font-weight: 600; font-size: 0.9rem; border: none; cursor: pointer;
  font-family: inherit; transition: background 0.2s;
}
.calc-save-btn:hover { background: #145a4b; }

/* Monthly benefits section */
.calc-monthly-label {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.8px;
  color: #8a94a6; font-weight: 600; margin: 20px 0 10px; padding-top: 16px;
  border-top: 1px solid #f0f2f5;
}

/* ── How It Works ── */
.calc-how { padding: 60px 0; }
.calc-section-label {
  text-align: center; font-size: 0.82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: #1a6b5a; margin-bottom: 12px;
}
.calc-section-title {
  text-align: center; font-family: 'Georgia', serif; font-size: 2rem;
  font-weight: 700; color: #1a2332; margin-bottom: 40px; letter-spacing: -0.5px;
}
.calc-steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.calc-step { text-align: center; }
.calc-step-number {
  width: 48px; height: 48px; background: #1a6b5a; color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem; margin: 0 auto 16px;
}
.calc-step-title { font-size: 1.05rem; font-weight: 700; color: #1a2332; margin-bottom: 8px; }
.calc-step-desc { font-size: 0.92rem; color: #64748b; line-height: 1.6; max-width: 280px; margin: 0 auto; }

/* ── Popular Cards ── */
.calc-popular { padding: 60px 0; background: #f8faf9; }
.calc-cards-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.calc-card-tile {
  background: #fff; border: 1px solid #e8ecf0; border-radius: 12px; padding: 20px 16px;
  text-align: center; cursor: pointer; transition: all 0.2s;
}
.calc-card-tile:hover { border-color: #c8e6dc; box-shadow: 0 8px 24px rgba(26,107,90,0.08); transform: translateY(-2px); }
.calc-card-tile-art {
  width: 56px; height: 36px; border-radius: 5px; margin: 0 auto 12px;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 3px 5px;
  color: #fff; font-size: 0.5rem; font-weight: 700;
}
.calc-card-tile-name { font-weight: 700; font-size: 0.92rem; color: #1a2332; margin-bottom: 4px; }
.calc-card-tile-fee { font-size: 0.85rem; color: #8a94a6; }

/* ── Why Calculator ── */
.calc-why { padding: 60px 0; }
.calc-why p { max-width: 700px; margin: 0 auto; text-align: center; font-size: 1.05rem; color: #4a5568; line-height: 1.7; }

/* ── FAQ ── */
.calc-faq { padding: 60px 0; background: #f8faf9; }
.calc-faq-list { max-width: 700px; margin: 0 auto; }
.calc-faq-item { margin-bottom: 16px; }
.calc-faq-q {
  font-weight: 700; font-size: 1rem; color: #1a2332; margin-bottom: 6px;
  padding: 16px 20px; background: #fff; border: 1px solid #e8ecf0; border-radius: 10px;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  transition: border-color 0.2s; width: 100%; text-align: left; font-family: inherit;
}
.calc-faq-q:hover { border-color: #c8e6dc; }
.calc-faq-q[aria-expanded="true"] { border-radius: 10px 10px 0 0; border-bottom-color: transparent; }
.calc-faq-a {
  font-size: 0.95rem; color: #4a5568; line-height: 1.7; padding: 0 20px 16px;
  background: #fff; border: 1px solid #e8ecf0; border-top: none; border-radius: 0 0 10px 10px;
  display: none;
}
.calc-faq-a.open { display: block; }
.calc-faq-arrow { transition: transform 0.2s; color: #8a94a6; flex-shrink: 0; }
.calc-faq-q[aria-expanded="true"] .calc-faq-arrow { transform: rotate(180deg); }

/* ── Footer ── */
.calc-footer {
  padding: 40px 0; border-top: 1px solid #e8ecf0; text-align: center;
}
.calc-footer-logo {
  font-family: 'Georgia', serif; font-size: 1.2rem; font-style: italic;
  color: #2d4a3e; font-weight: 700; margin-bottom: 12px;
}
.calc-footer-links {
  display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; flex-wrap: wrap;
}
.calc-footer-links a {
  font-size: 0.85rem; color: #64748b; transition: color 0.2s; text-decoration: none;
}
.calc-footer-links a:hover { color: #1a6b5a; }
.calc-footer-disclosure {
  font-size: 0.78rem; color: #8a94a6; max-width: 600px; margin: 0 auto; line-height: 1.5;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .calc-hero h1 { font-size: 2rem; }
  .calc-steps { grid-template-columns: 1fr; }
  .calc-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .calc-metrics { grid-template-columns: 1fr; }
  .calc-section-title { font-size: 1.6rem; }
}
@media (max-width: 480px) {
  .calc-cards-grid { grid-template-columns: 1fr; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .calc-btn-primary, .calc-card-tile, .calc-nav-cta, .calc-faq-arrow {
    transition: none !important; transform: none !important;
  }
}

/* ── Focus states ── */
.calc-btn-primary:focus-visible, .calc-nav-cta:focus-visible, .calc-save-btn:focus-visible,
.calc-faq-q:focus-visible, .calc-search:focus-visible {
  outline: 2px solid #1a6b5a; outline-offset: 2px;
}
