/* Freeze Your Rent calculator. Every class is prefixed fyr- so nothing clashes with the theme. */
.fyr-calc {
  --fyr-green: var(--ztr-green, #1F6B4F);
  --fyr-green-dark: var(--ztr-green-dark, #154D39);
  --fyr-ink: var(--ztr-ink, #14202B);
  --fyr-gold: var(--ztr-gold, #D9A21B);
  --fyr-gold-ink: #8A5F00;
  --fyr-cream: var(--ztr-cream, #F7F5EF);
  --fyr-line: #D5D9DD;
  --fyr-muted: #4A5560;
  --fyr-neg: #9B2C1F;
  color: var(--fyr-ink);
  font: inherit;
  max-width: 1140px;
  margin: 0 auto;
}
.fyr-calc *, .fyr-calc *::before, .fyr-calc *::after { box-sizing: border-box; }

/* presets and buttons */
.fyr-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; }
.fyr-presets-label { font-weight: 600; margin-right: 4px; }
.fyr-btn {
  font: inherit; font-size: 0.95rem; font-weight: 600; line-height: 1.2;
  padding: 10px 16px; border-radius: 6px; cursor: pointer;
  border: 2px solid var(--fyr-green); background: #fff; color: var(--fyr-green-dark);
}
.fyr-btn:hover { background: var(--fyr-cream); }
.fyr-btn[aria-pressed="true"] { background: var(--fyr-green); color: #fff; }
.fyr-btn-quiet { border-color: var(--fyr-line); color: var(--fyr-ink); }
.fyr-btn-primary { background: var(--fyr-gold); border-color: var(--fyr-gold); color: var(--fyr-ink); }
.fyr-btn-primary:hover { background: #C38F12; border-color: #C38F12; }
.fyr-btn:focus-visible, .fyr-calc input:focus-visible, .fyr-calc select:focus-visible, .fyr-advanced summary:focus-visible {
  outline: 3px solid var(--fyr-gold); outline-offset: 2px;
}

/* inputs */
.fyr-group { border: 1px solid var(--fyr-line); border-radius: 10px; padding: 16px 20px 8px; margin: 0 0 16px; background: #fff; }
.fyr-group legend, .fyr-advanced summary { font-weight: 700; font-size: 1.1rem; padding: 0 6px; color: var(--fyr-green-dark); }
.fyr-advanced summary { cursor: pointer; padding: 4px 0 12px; }
.fyr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 20px; }
.fyr-field { margin: 0 0 12px; }
.fyr-field[hidden] { display: none; }
.fyr-field label { display: block; font-weight: 600; font-size: 0.92rem; margin: 0 0 4px; }
.fyr-input { display: flex; align-items: stretch; border: 1px solid #8A949E; border-radius: 6px; background: #fff; overflow: hidden; }
.fyr-input:focus-within { border-color: var(--fyr-green); box-shadow: 0 0 0 1px var(--fyr-green); }
.fyr-calc .fyr-input input, .fyr-calc .fyr-input select {
  flex: 1 1 auto; min-width: 0; width: 100%; border: 0; margin: 0; padding: 9px 10px; font: inherit; font-size: 1rem;
  color: var(--fyr-ink); background: transparent; box-shadow: none; border-radius: 0;
}
.fyr-calc .fyr-input input:focus, .fyr-calc .fyr-input select:focus { outline: none; }
.fyr-calc .fyr-input select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 36px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2314202B' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.fyr-affix { display: flex; align-items: center; padding: 0 10px; background: var(--fyr-cream); color: var(--fyr-muted); font-weight: 600; }
.fyr-help { font-size: 0.82rem; color: var(--fyr-muted); margin: 4px 0 0; line-height: 1.4; }

/* results */
.fyr-results { margin-top: 28px; }
.fyr-calc .fyr-h { font-size: 1.45rem; margin: 28px 0 12px; color: var(--fyr-ink); }
.fyr-table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 0.98rem; }
.fyr-table caption { caption-side: bottom; text-align: left; font-size: 0.85rem; color: var(--fyr-muted); padding-top: 8px; }
.fyr-table th, .fyr-table td { padding: 8px 10px; border-bottom: 1px solid var(--fyr-line); text-align: left; vertical-align: top; }
.fyr-table thead th { background: var(--fyr-green-dark); color: #fff; font-weight: 600; border-bottom: 0; }
.fyr-table tbody th { font-weight: 600; }
.fyr-lines td:nth-child(2) { color: var(--fyr-muted); }
.fyr-num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fyr-letter { display: inline-block; min-width: 1.6em; color: var(--fyr-green); font-weight: 700; }
.fyr-total th, .fyr-total td { background: var(--fyr-cream); font-weight: 700; }
.fyr-pos { color: var(--fyr-green-dark); }
.fyr-neg { color: var(--fyr-neg); }
.fyr-flags { margin: 4px 0 8px; }
.fyr-flag { border-left: 4px solid var(--fyr-gold); background: #FBF3DF; padding: 10px 14px; margin: 0 0 8px; border-radius: 0 6px 6px 0; }
.fyr-headline { font-size: 1.2rem; font-weight: 700; color: var(--fyr-green-dark); margin: 0 0 6px; }
.fyr-rentpass { margin: 0 0 14px; }

/* chart */
.fyr-chart-wrap { margin: 18px 0 0; }
.fyr-chart-wrap figcaption { font-size: 0.85rem; color: var(--fyr-muted); margin-top: 4px; }
.fyr-chart { width: 100%; height: auto; display: block; }
.fyr-chart .fyr-grid-line { stroke: #E4E7EA; stroke-width: 1; }
.fyr-chart .fyr-zero { stroke: var(--fyr-ink); stroke-width: 1.5; }
.fyr-chart .fyr-axis { fill: var(--fyr-muted); font-size: 12px; }
.fyr-chart .fyr-zone { font-size: 11px; font-style: italic; }
.fyr-chart .fyr-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fyr-chart .fyr-end { font-size: 12.5px; font-weight: 700; }
.fyr-chart .fyr-s-none { stroke: var(--fyr-green); fill: var(--fyr-green-dark); }
.fyr-chart .fyr-s-half { stroke: #B07D00; fill: var(--fyr-gold-ink); }
.fyr-chart .fyr-s-all { stroke: var(--fyr-ink); fill: var(--fyr-ink); }
.fyr-chart path.fyr-line { fill: none; }
.fyr-chart text.fyr-end { stroke: none; }

.fyr-actions { margin: 20px 0 8px; }

/* tablet and phone */
@media (max-width: 900px) { .fyr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .fyr-grid { grid-template-columns: 1fr; }
  .fyr-group { padding: 12px 14px 4px; }
  .fyr-table { font-size: 0.9rem; }
  .fyr-table th, .fyr-table td { padding: 7px 6px; }
  .fyr-lines td:nth-child(2) { display: none; }
  .fyr-lines thead th:nth-child(2) { display: none; }
  .fyr-compare thead th { font-size: 0.8rem; white-space: normal; }
  .fyr-compare .fyr-num { white-space: normal; }
}

/* print: one or two pages, no site chrome */
@media print {
  #masthead, .site-header, header.site-header, #mobile-header, .site-footer, #colophon, footer, aside, .sidebar,
  #secondary, .fyr-noprint, .fyr-help, .fyr-backlink, #wpadminbar, .kadence-scrollbar-fixer, #kt-scroll-up { display: none !important; }
  html, body { background: #fff !important; }
  /* the page banner prints as dark text on white (this file loads only on calculator pages) */
  .ztr-hero { background: none !important; color: #000 !important; padding: 0 0 6px !important; }
  .ztr-hero h1, .ztr-hero .ztr-lead, .ztr-hero p { color: #000 !important; }
  .ztr-hero h1 { font-size: 18pt !important; margin: 0 0 4px !important; }
  .ztr-hero .ztr-lead { font-size: 10pt !important; }
  .ztr-section { padding: 0 !important; }
  body { font-size: 10.5pt; }
  .fyr-calc { max-width: none; }
  .fyr-group { border: 0; padding: 0; margin: 0 0 6px; }
  .fyr-group legend, .fyr-advanced summary { font-size: 11pt; padding: 0; }
  .fyr-advanced summary { list-style: none; }
  .fyr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
  .fyr-field { margin: 0 0 4px; }
  .fyr-field label { font-size: 8pt; margin: 0; line-height: 1.15; }
  .fyr-input { border: 0; border-bottom: 1px solid #999; border-radius: 0; }
  .fyr-calc .fyr-input input, .fyr-calc .fyr-input select { padding: 1px 2px; font-size: 10pt; -webkit-appearance: none; appearance: none; }
  .fyr-affix { background: none; padding: 0 2px; }
  .fyr-results { margin-top: 8px; }
  .fyr-calc .fyr-h { font-size: 13pt; margin: 10px 0 4px; }
  .fyr-table { font-size: 9pt; }
  .fyr-table th, .fyr-table td { padding: 2px 6px; }
  .fyr-table thead th { background: #fff !important; color: #000; border-bottom: 1.5px solid #000; }
  .fyr-total th, .fyr-total td { background: #fff !important; }
  .fyr-flag { background: #fff; border-left-width: 3px; padding: 3px 8px; margin: 0 0 3px; }
  @page { margin: 0.5in; }
  .fyr-calc, .fyr-calc p, .fyr-calc td, .fyr-calc th, .ztr-hero p { line-height: 1.25 !important; }
  .fyr-grid { gap: 0 10px; }
  .fyr-calc .fyr-h { break-after: avoid; page-break-after: avoid; }
  .fyr-headline { font-size: 11pt; margin: 0 0 2px; }
  .fyr-rentpass { margin: 0 0 4px; }
  .fyr-chart-wrap { margin-top: 6px; }
  .fyr-chart-wrap, .fyr-compare { break-inside: avoid; page-break-inside: avoid; }
  .fyr-table tr { break-inside: avoid; page-break-inside: avoid; }
  .fyr-chart { max-height: 2.7in; width: auto; max-width: 100%; }
  .ztr-small { font-size: 8.5pt !important; line-height: 1.25 !important; margin: 4px 0 0 !important; }
  .fyr-calc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
