/* Lane i-insights: buyer math, FSA base acres, the acre breakdown, "Good to know" chips, and benchmarks on a land
   listing's page. Markup from i-insights.php, the popover from i-insights.js. */

/* ---------- Good to know ---------- */

/* Short facts from the write-up, a quiet row under the title's location line: wash chips with an icon, set in the
   14 px label size. They aren't buttons, so they stay smaller than a tap target. */
body .gl-lp .gl-i-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
body .gl-lp .gl-i-chip { display: inline-flex; align-items: center; gap: 6px; min-width: 0; margin: 0; padding: 5px 10px; border-radius: var(--gl-radius); background: var(--gl-wash);
  font-size: 14px; line-height: 1.35; color: var(--gl-ink); }
body .gl-lp .gl-i-chip .gl-i { width: 16px; height: 16px; color: var(--gl-navy); }

/* ---------- Buyer math ---------- */

/* The second half of the "Acres and buyer math" group, under the acre bar's key: up to three figures in a row, each
   over its label, with hairlines between them like the key facts. Under 360 px, rows of label and figure. Flatsome
   sets every dl to 90% opacity, so this one is set back to full. */
body .gl-lp .gl-i-math-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 0 0; padding: 0; border-top: 1px solid var(--gl-rule); opacity: 1; }
body .gl-lp .gl-i-math-rows--n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body .gl-lp .gl-i-math-rows--n1 { grid-template-columns: minmax(0, 1fr); }
body .gl-lp .gl-i-math-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 16px 0; border-left: 1px solid var(--gl-rule); }
body .gl-lp .gl-i-math-item:first-child { padding-left: 0; border-left: 0; }
body .gl-lp .gl-i-math-item dt { margin: 0; font-size: 14px; font-weight: 400; line-height: 1.35; color: var(--gl-muted); text-transform: none; letter-spacing: 0; }
body .gl-lp .gl-i-math-item dd { order: -1; margin: 0; font-size: 22px; font-weight: 600; line-height: 1.15; color: var(--gl-navy); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }

@media (max-width: 699px) {
  body .gl-lp .gl-i-math-item { padding: 10px 10px 0; }
  body .gl-lp .gl-i-math-item dd { font-size: 20px; }
}
@media (max-width: 359px) {
  body .gl-lp .gl-i-math-rows, body .gl-lp .gl-i-math-rows--n2 { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  body .gl-lp .gl-i-math-item, body .gl-lp .gl-i-math-item:first-child { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0;
    border-left: 0; border-bottom: 1px solid var(--gl-rule); }
  body .gl-lp .gl-i-math-item:last-child { border-bottom: 0; }
  body .gl-lp .gl-i-math-item dt { color: var(--gl-ink); }
  body .gl-lp .gl-i-math-item dd { order: 0; flex: none; font-size: 17px; line-height: 1.35; }
}

/* ---------- FSA base acres ---------- */

/* A small table in the Farm facts row: crop names, then the figures right-aligned in columns. */
body .gl-lp .gl-ff-row table.gl-i-base { width: auto; min-width: min(100%, 320px); max-width: 100%; margin: 0; border-collapse: collapse; font-size: 16px; }
body .gl-lp .gl-ff-row table.gl-i-base :is(th, td) { padding: 6px 20px 6px 0 !important; border: 0 !important; border-bottom: 1px solid var(--gl-rule) !important; vertical-align: baseline; text-align: right;
  line-height: 1.4; font-variant-numeric: tabular-nums lining-nums; background: none; }
body .gl-lp .gl-ff-row table.gl-i-base :is(th, td):last-child { padding-right: 0 !important; }
body .gl-lp .gl-ff-row table.gl-i-base thead th { padding-top: 0 !important; font-size: 14px !important; font-weight: 400; color: var(--gl-muted) !important; text-transform: none; letter-spacing: 0; }
body .gl-lp .gl-ff-row table.gl-i-base :is(thead th:first-child, tbody th) { text-align: left; }
body .gl-lp .gl-ff-row table.gl-i-base tbody th { font-size: 16px !important; font-weight: 400; color: var(--gl-ink) !important; }
body .gl-lp .gl-ff-row table.gl-i-base td { font-size: 16px !important; font-weight: 600; color: var(--gl-ink) !important; }
body .gl-lp .gl-ff-row table.gl-i-base tbody tr:last-child :is(th, td) { border-bottom: 0 !important; }
/* restyle.css rules each write-up table's rows. The last row here ends on the facts row's own rule, so it has none. */
body .gl-lp .gl-ff-row table.gl-i-base:not(#gl-i-none) tbody tr:last-child { border-bottom: 0 !important; }
/* d-listings.js stacks every write-up table of three or more columns on a phone (gl-d-stack), with !important rules
   under an ID (#main). This one has three short columns that fit at 320 px, so it stays a table. :not(#gl-i-none)
   always matches and gives these rules an ID's weight. */
body .gl-lp table.gl-i-base.gl-d-stack:not(#gl-i-none) { display: table !important; width: auto !important; }
body .gl-lp table.gl-i-base.gl-d-stack:not(#gl-i-none) thead { position: static; display: table-header-group !important; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
body .gl-lp table.gl-i-base.gl-d-stack:not(#gl-i-none) tbody { display: table-row-group !important; width: auto !important; }
body .gl-lp table.gl-i-base.gl-d-stack:not(#gl-i-none) tr { display: table-row !important; padding: 0; border-bottom: 0 !important; }
body .gl-lp table.gl-i-base.gl-d-stack:not(#gl-i-none) :is(th, td) { display: table-cell !important; width: auto !important; padding: 6px 20px 6px 0 !important;
  border: 0 !important; border-bottom: 1px solid var(--gl-rule) !important; text-align: right !important; }
body .gl-lp table.gl-i-base.gl-d-stack:not(#gl-i-none) :is(th, td):last-child { padding-right: 0 !important; }
body .gl-lp table.gl-i-base.gl-d-stack:not(#gl-i-none) thead th { padding-top: 0 !important; }
body .gl-lp table.gl-i-base.gl-d-stack:not(#gl-i-none) :is(thead th:first-child, tbody th) { text-align: left !important; }
body .gl-lp table.gl-i-base.gl-d-stack:not(#gl-i-none) tbody tr:last-child :is(th, td) { border-bottom: 0 !important; }
body .gl-lp table.gl-i-base.gl-d-stack:not(#gl-i-none) td::before { content: none !important; }
body .gl-lp .gl-i-unit { white-space: nowrap; }
/* On a phone the table runs the row's full width, so its figures end on the same edge as the rest of the facts. */
@media (max-width: 699px) {
  body .gl-lp .gl-ff-row table.gl-i-base, body .gl-lp table.gl-i-base.gl-d-stack:not(#gl-i-none) { width: 100% !important; min-width: 0; }
}
body .gl-lp .gl-i-base-note { margin: 6px 0 0 !important; font-size: 14px !important; font-weight: 400; line-height: 1.45; color: var(--gl-muted) !important; }

/* "What is this?" on its own line under the table and its notes, so it never shares a line with the table's column
   headings. Its 8 px side padding hangs into the margin, so its icon lines up with the crop names. */
body .gl-lp .gl-sec--facts p.gl-i-what-line { margin: 4px 0 -8px !important; line-height: 1; }
html:not(.gl-js) body .gl-lp p.gl-i-what-line { display: none; }

/* "What is this?": a text button with an info icon, 44 px tall. The script opens the popover. Without the script the
   button doesn't show, and the explanation shows as a note instead. */
body .gl-lp .gl-i-what { display: none; align-items: center; gap: 6px; min-height: 44px; margin: 0 0 0 -8px; padding: 0 8px; border: 0; border-radius: var(--gl-radius); background: none;
  color: var(--gl-navy); font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: 0; text-transform: none; white-space: nowrap; box-shadow: none; cursor: pointer; }
.gl-js body .gl-lp .gl-i-what { display: inline-flex; }
body .gl-lp .gl-i-what .gl-i { width: 18px; height: 18px; }
@media (hover: hover) { body .gl-lp .gl-i-what:hover { background: var(--gl-wash); } }
body .gl-lp .gl-i-what[aria-expanded="true"] { background: var(--gl-wash); }

/* The popover has h-extras.css's CSR2 popover look (.gl-x-pop). The same values are set here, so it keeps that look
   when that part changes. */
.gl-i-pop { position: fixed; z-index: 1000; box-sizing: border-box; padding: 12px 16px; border: 1px solid var(--gl-rule); border-radius: var(--gl-radius); background: #fff;
  box-shadow: 0 6px 24px rgba(16, 29, 69, .16); color: var(--gl-ink); font-size: 15px; font-weight: 400; line-height: 1.5; text-align: left; white-space: normal; text-transform: none; letter-spacing: 0; }
.gl-i-pop[hidden] { display: none; }
/* The script moves the popover just after the Farm facts list, where restyle.css's rule for notes in that section
   would set its text smaller and muted. */
.gl-i-pop p, body .gl-lp .gl-sec--facts .gl-i-pop p { margin: 0 !important; font-size: 15px !important; font-weight: 400; line-height: 1.5; color: var(--gl-ink) !important; }
.gl-i-pop:focus { outline: none; }
.gl-i-pop:focus-visible { outline: 3px solid #5b7bd5; outline-offset: 2px; }
html:not(.gl-js) body .gl-lp .gl-i-pop[hidden] { display: block; position: static; margin: 8px 0 0; padding: 0; border: 0; box-shadow: none; }
html:not(.gl-js) body .gl-lp .gl-i-pop p { font-size: 14px !important; color: var(--gl-muted) !important; }

/* ---------- Acres and buyer math, and benchmarks ---------- */

body .gl-lp .gl-i-block { margin: 24px 0 0; }
body .gl-lp .gl-sec--facts .gl-i-block > .gl-sub { margin: 0 !important; }

/* The acre bar: the listing's acres on one scale with the largest of the taxable and FSA acres. Navy is the tillable
   or cropland part and the wash is the rest. Taxable and FSA acres that differ from the listing's acres follow as thin
   gray bars on the same scale, each with its own label and figure. */
body .gl-lp .gl-i-ac { display: grid; gap: 10px; margin: 16px 0 0; }
body .gl-lp .gl-i-ac-row { display: grid; grid-template-columns: 10em minmax(0, 1fr) 6em; align-items: center; column-gap: 16px; }
body .gl-lp .gl-i-ac-label { font-size: 14px; line-height: 1.3; color: var(--gl-muted); }
body .gl-lp .gl-i-ac-fig { font-size: 16px; font-weight: 600; line-height: 1.3; text-align: right; color: var(--gl-ink); font-variant-numeric: tabular-nums lining-nums; }
body .gl-lp .gl-i-ac-track { position: relative; display: flex; height: 20px; min-width: 0; }
body .gl-lp .gl-i-ac-fill { flex: none; height: 100%; border-radius: var(--gl-radius) 0 0 var(--gl-radius); background: var(--gl-navy); }
body .gl-lp .gl-i-ac-fill:last-child { border-radius: var(--gl-radius); }
body .gl-lp .gl-i-ac-rest { flex: none; box-sizing: border-box; height: 100%; border: 1px solid var(--gl-field); border-left: 0; border-radius: 0 var(--gl-radius) var(--gl-radius) 0; background: var(--gl-wash); }
body .gl-lp .gl-i-ac-row--ref .gl-i-ac-track { height: 8px; }
body .gl-lp .gl-i-ac-ref { flex: none; height: 100%; border-radius: 2px; background: var(--gl-field); }
body .gl-lp .gl-i-ac-row--ref .gl-i-ac-fig { font-weight: 400; }
body .gl-lp .gl-i-ac-key { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 0 calc(10em + 16px); font-size: 14px; line-height: 1.4; color: var(--gl-ink); font-variant-numeric: tabular-nums lining-nums; }
body .gl-lp .gl-i-ac-key-item { display: inline-flex; align-items: center; gap: 6px; }
body .gl-lp .gl-i-ac-key strong { font-weight: 600; }
body .gl-lp .gl-i-ac-swatch { flex: none; box-sizing: border-box; width: 12px; height: 12px; border-radius: 2px; }
body .gl-lp .gl-i-ac-swatch--fill { background: var(--gl-navy); }
body .gl-lp .gl-i-ac-swatch--rest { border: 1px solid var(--gl-field); background: var(--gl-wash); }

/* Each benchmark: a thin rule from the lowest to the highest figure, a short gray tick for each listing, and a tall
   navy mark for this one. The figures are in the text above it and at its ends. */
body .gl-lp .gl-i-bm-row { margin: 16px 0 0; }
body .gl-lp .gl-i-bm-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 16px; margin: 0 0 4px; font-size: 15px; line-height: 1.4; color: var(--gl-ink); }
body .gl-lp .gl-i-bm-label { font-weight: 600; }
body .gl-lp .gl-i-bm-mine { color: var(--gl-muted); font-variant-numeric: tabular-nums lining-nums; }
body .gl-lp .gl-i-bm-mine strong { font-weight: 600; color: var(--gl-navy); }
/* The lowest figure, the rule, and the highest figure share a line. On a phone the words "Low" and "High" are read
   out but not shown, so the rule keeps its width. */
body .gl-lp .gl-sec--facts p.gl-i-bm-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0; font-size: 14px !important;
  line-height: 1.4; color: var(--gl-muted) !important; font-variant-numeric: tabular-nums lining-nums; }
body .gl-lp .gl-i-bm-end { white-space: nowrap; }
@media (max-width: 699px) {
  body .gl-lp .gl-i-bm-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
body .gl-lp .gl-i-bm-track { position: relative; display: block; height: 20px; margin: 0 4px; }
body .gl-lp .gl-i-bm-track::before { content: ""; position: absolute; left: -4px; right: -4px; top: 9px; height: 2px; background: var(--gl-rule); }
body .gl-lp .gl-i-bm-tick { position: absolute; top: 4px; width: 2px; height: 12px; margin-left: -1px; background: var(--gl-field); }
body .gl-lp .gl-i-bm-mark { position: absolute; top: 0; width: 6px; height: 20px; margin-left: -3px; border-radius: 2px; background: var(--gl-navy); }
body .gl-lp .gl-sec--facts .gl-i-bench-body > p.gl-i-bm-note { margin: 16px 0 0; font-size: 14px !important; line-height: 1.45; color: var(--gl-muted) !important; }

@media (max-width: 699px) {
  /* The benchmarks wait behind their heading, as the legal description does (restyle.css), and i-insights.js makes
     the heading a button with the same look as that one's. */
  .gl-js body .gl-lp .gl-i-bench.is-folded .gl-i-bench-body { display: none; }
  body .gl-lp .gl-sec--facts .gl-i-bench-head:has(.gl-i-bench-toggle) { padding: 0; }
  body .gl-i-bench-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; margin: 0; padding: 0; border: 0;
    background: none; color: var(--gl-ink); font: inherit; font-size: 18px; font-weight: 600; text-align: left; letter-spacing: 0; text-transform: none; box-shadow: none; cursor: pointer; }
  body .gl-i-bench-toggle .gl-i { flex: none; color: var(--gl-navy); transition: transform var(--gl-fast); }
  body .gl-i-bench-toggle[aria-expanded="true"] .gl-i { transform: rotate(180deg); }

  /* The label and figure share a line, and the bar runs the full width under them. */
  body .gl-lp .gl-i-ac-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  body .gl-lp .gl-i-ac-track { grid-column: 1 / -1; grid-row: 2; }
  body .gl-lp .gl-i-ac-key { margin: 0; }
}

/* ---------- Printing ---------- */

/* Paper keeps the base acres table, the acre bar, and the buyer math. The chips and benchmarks are for browsing. */
@media print {
  body .gl-i-chips, body .gl-i-bench, body .gl-i-what, body .gl-i-pop { display: none !important; }
  body .gl-lp .gl-i-math-rows { display: flex; flex-wrap: wrap; gap: 0 14pt; margin-top: 4pt; border-top: 0; }
  body .gl-lp .gl-i-math-item, body .gl-lp .gl-i-math-item:first-child { flex-direction: row; align-items: baseline; gap: 5pt; padding: 0; border: 0; }
  body .gl-lp .gl-i-math-item dd { order: 0; font-size: 10.5pt; color: #000; }
  body .gl-lp .gl-i-math-item dt { font-size: 9pt; }
  body .gl-lp .gl-ff-row table.gl-i-base:not(#gl-i-none) :is(thead th, tbody th, td) { padding: 1pt 12pt 1pt 0 !important; font-size: 9.5pt !important; }
  body .gl-lp .gl-i-unit { color: inherit !important; }
  body .gl-lp .gl-i-base-note { font-size: 9pt !important; }
  body .gl-lp .gl-i-block { margin-top: 8pt; break-inside: avoid; }
  body .gl-lp .gl-i-ac { gap: 4pt; margin-top: 4pt; }
  body .gl-lp .gl-i-ac-label, body .gl-lp .gl-i-ac-key { font-size: 9pt; }
  body .gl-lp .gl-i-ac-fig { font-size: 9.5pt; }
  /* Bootstrap's print rules clear every background, so on paper the bars are drawn with borders, which always print. */
  body .gl-lp .gl-i-ac-track { height: 10pt; }
  body .gl-lp .gl-i-ac-fill { box-sizing: border-box; height: 10pt; border-top: 10pt solid #182a61; }
  body .gl-lp .gl-i-ac-rest { border: 1pt solid #8a909c; border-left: 0; }
  body .gl-lp .gl-i-ac-row--ref .gl-i-ac-track { height: 5pt; }
  body .gl-lp .gl-i-ac-ref { box-sizing: border-box; height: 5pt; border-top: 5pt solid #8a909c; }
  body .gl-lp .gl-i-ac-swatch--fill { width: 8pt; height: 8pt; border: 4pt solid #182a61; }
}
