/* Kissing Bug Map. Everything is scoped under .kbm so it will not fight the theme. Fonts and text color are inherited from the theme. */
.kbm {
  --kbm-line: #d6d3cd;
  --kbm-muted: #5f5f5f;
  --kbm-accent: #500000;
  --kbm-nodata: #ebebeb;
  --kbm-state: #8a8a8a;
  --kbm-panel: #ffffff;
  /* Maroon scale, light to dark, ending at Texas A&M maroon #500000 */
  --kbm-s1: #e6bdb4; --kbm-s2: #d4958a; --kbm-s3: #bd6f64; --kbm-s4: #a24c48;
  --kbm-s5: #863030; --kbm-s6: #6a1414; --kbm-s7: #500000;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}
.kbm *, .kbm *::before, .kbm *::after { box-sizing: border-box; }
.kbm__status { color: var(--kbm-muted); }

.kbm__layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 52rem) { .kbm__layout { grid-template-columns: minmax(0, 1fr); } }

.kbm__rail { border: 1px solid var(--kbm-line); background: var(--kbm-panel); padding: 1rem; display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.kbm__h { margin: 0 0 .5rem; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--kbm-muted); display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.kbm__link { font: inherit; font-size: .8rem; letter-spacing: 0; text-transform: none; color: var(--kbm-accent); background: none; border: 0; padding: 2px 0 2px .6rem; cursor: pointer; text-decoration: underline; }

.kbm__sp { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; cursor: pointer; font-weight: 400; margin: 0; }
.kbm__sp input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--kbm-accent); flex: 0 0 auto; }
.kbm__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.kbm__n { font-variant-numeric: tabular-nums; color: var(--kbm-muted); font-size: .85rem; }
.kbm__sp.off .kbm__name { color: var(--kbm-muted); }

.kbm__range { display: grid; gap: .4rem; }
.kbm__range label { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); align-items: center; gap: .5rem; margin: 0; font-weight: 400; font-size: .85rem; color: var(--kbm-muted); }
.kbm__range input { width: 100%; margin: 0; accent-color: var(--kbm-accent); }
.kbm__ticks { display: flex; justify-content: space-between; font-size: .65rem; color: var(--kbm-muted); padding-left: 3.7rem; padding-right: .4rem; }
.kbm__monthread { font-weight: 700; margin-top: .25rem; min-height: 1.5em; }
.kbm__presets { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }

.kbm__chip { font: inherit; font-size: .8rem; line-height: 1.3; padding: .25rem .6rem; border: 1px solid var(--kbm-line); border-radius: 3px; background: var(--kbm-panel); color: inherit; cursor: pointer; }
.kbm__chip:hover { border-color: var(--kbm-accent); }
.kbm button:focus-visible, .kbm input:focus-visible { outline: 2px solid #1f6fb5; outline-offset: 2px; }

.kbm__main { min-width: 0; display: flex; flex-direction: column; gap: .75rem; }
.kbm__stat { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: baseline; }
.kbm__stat b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.kbm__stat span { color: var(--kbm-muted); }

.kbm__mapwrap { position: relative; border: 1px solid var(--kbm-line); background: var(--kbm-panel); overflow: hidden; }
.kbm__svg { display: block; width: 100%; height: auto; max-height: 80vh; }
.kbm__zoom { position: absolute; top: .6rem; right: .6rem; display: flex; gap: .4rem; }
.kbm__c { fill: var(--kbm-nodata); stroke: #fff; stroke-width: .35; }
.kbm__c.has { cursor: pointer; }
.kbm__c.hl { stroke: #111; stroke-width: 1.4; }
.kbm-s1.kbm__c { fill: var(--kbm-s1); } .kbm-s2.kbm__c { fill: var(--kbm-s2); } .kbm-s3.kbm__c { fill: var(--kbm-s3); }
.kbm-s4.kbm__c { fill: var(--kbm-s4); } .kbm-s5.kbm__c { fill: var(--kbm-s5); } .kbm-s6.kbm__c { fill: var(--kbm-s6); }
.kbm-s7.kbm__c { fill: var(--kbm-s7); }
.kbm__states { fill: none; stroke: var(--kbm-state); stroke-width: .6; pointer-events: none; }

.kbm__legend { position: absolute; left: .6rem; bottom: .6rem; background: var(--kbm-panel); border: 1px solid var(--kbm-line); padding: .5rem .6rem; font-size: .75rem; }
.kbm__legt { color: var(--kbm-muted); margin-bottom: .25rem; }
.kbm__legrow { display: flex; align-items: center; gap: .4rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.kbm__legrow i { display: inline-block; width: 1rem; height: .65rem; border: 1px solid var(--kbm-line); }
.kbm__legrow i.kbm-s1 { background: var(--kbm-s1); } .kbm__legrow i.kbm-s2 { background: var(--kbm-s2); }
.kbm__legrow i.kbm-s3 { background: var(--kbm-s3); } .kbm__legrow i.kbm-s4 { background: var(--kbm-s4); }
.kbm__legrow i.kbm-s5 { background: var(--kbm-s5); } .kbm__legrow i.kbm-s6 { background: var(--kbm-s6); }
.kbm__legrow i.kbm-s7 { background: var(--kbm-s7); }

.kbm__tip { position: fixed; z-index: 99999; pointer-events: none; background: #fff; color: #222; border: 1px solid var(--kbm-line); border-radius: 4px; padding: .5rem .65rem; font-size: .85rem; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); max-width: 15rem; }
.kbm__tip[hidden] { display: none; }
.kbm__th { font-weight: 700; }
.kbm__ts { color: var(--kbm-muted); margin-bottom: .25rem; }
.kbm__tr { display: flex; justify-content: space-between; gap: 1rem; font-variant-numeric: tabular-nums; }
.kbm__tt { border-top: 1px solid var(--kbm-line); margin-top: .25rem; padding-top: .25rem; font-weight: 700; }

