.map-row {
    height: calc(100vh - 130px);
}

/* The panel is a vertical flex column filling the row's height, split into a
   fixed control bar and a scrolling content area. */
.panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    zoom: 0.75;
}

/* flex: 0 0 auto = take natural height, never grow or shrink → stays pinned. */
.panel-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

.panel-controls .btn {
    padding: 0.15rem 0.2rem;
    font-size: 0.8rem;
}

/* flex: 1 1 auto = absorb the remaining height; min-height:0 lets it shrink
   below its content so overflow-y can actually scroll (a flexbox gotcha). */
.panel-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-top: 0.5rem;
}

.control-group {
    flex: 1 1 0;
    margin-bottom: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* The Network group hosts the longest word (GEOGLOWS) — give it a slightly
   larger share so the text fits; the other two columns split the rest. */
.control-group:first-child {
    flex-grow: 1.35;
}

.control-group:last-child {
    flex: 1 1 100%;    /* base width = whole row -> forced onto its own line */
}

.control-group .form-label {
    margin-bottom: 0;    /* kill Bootstrap's below-label gap, useless in a row */
    font-size: 0.85rem;
}

.control-group .btn-group .btn {
    flex: 1 1 0;
    min-width: 0;
}


/* Selected-gage metadata block */
.gage-name {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Two-column grid: muted labels on the left, values on the right. */
.gage-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.75rem;
    row-gap: 0.35rem;
    margin: 0;
}

.gage-meta dt {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.85rem;
}

.gage-meta dd {
    margin: 0;
    font-size: 0.9rem;
}


/* Guided tour: driver.js caps popovers at 300px, which wraps our titles. */
.driver-popover {
    max-width: 400px;
}

/* The centered welcome step is a proper welcome card: wider, with a
   guaranteed height and the nav buttons pinned to the bottom edge. The
   anchored steps keep driver.js's compact default look. */
.driver-popover.tour-welcome {
    max-width: 520px;
    min-height: 240px;
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
}

.driver-popover.tour-welcome .driver-popover-title {
    font-size: 22px;
    margin-bottom: 12px;
}

.driver-popover.tour-welcome .driver-popover-description {
    font-size: 15px;
}

/* margin-top: auto pushes the footer to the card's bottom, so the
   min-height turns into visible breathing room instead of empty bottom. */
.driver-popover.tour-welcome .driver-popover-footer {
    margin-top: auto;
    padding-top: 20px;
}

.instr-num {
    display: inline-flex;        /* lets it take width/height, and centers content */
    width: 1.5rem;
    height: 1.5rem;              /* equal width + height = square */
    border-radius: 50%;          /* round corners by half → circle */
    align-items: center;         /* center the digit vertically */
    justify-content: center;     /* ...and horizontally */
    background-color: #1a5276;   /* filled circle, like the 4.3 mockup */
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;              /* don't let the circle squish when text is long */

}

.instructions-panel {
    padding-top: 1rem;    /* content starts 1rem below the panel's top edge */
}

.headwater-toggle {
    top: 2.3em;
    right: 0.5em;
}

.headwater-toggle button {
    position: relative;   /* anchors the overlay to the button */
}

.headwater-toggle button.active::after {
    content: '';
    position: absolute;
    inset: 1px;
    border: 2px solid #c00;
    border-radius: 50%;
    background: linear-gradient(45deg,
        transparent 44%, #c00 44%,
        #c00 56%, transparent 56%);
}

.chart-legend-container {
    bottom: 0.5em;
    left: 0.5em;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 0.4em;
}

.legend-row.off {
    opacity: .4;
}

.legend-row.clickable {
    cursor: pointer;
}

.legend-title {
    font-weight: 600;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.65;
    margin-bottom: 0.4em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid rgba(0,0,0,0.15);
}


.legend-row.clickable:hover {
    background: rgba(0,0,0,0.06);
    border-radius: 3px; 
}


.legend-swatch {
    display: inline-block;
    width: 0.7em;
    height: 0.7em;
    border-radius: 50%;
    border: 1px solid #fff;
}

.legend-line {
    display: inline-block;
    width: 1.3em;
    height: 0.5em;
    border: 1px solid #fff;
}

.btn-light-blue {
  background-color: #b8dffd;
  color: #073f94;
  border: 1px solid #073f94;
}


.btn-light-blue:hover {
  background-color: #94b0c7;
  color: #072e68;
}

#nwm-id-input, 
#geo-id-input {
    color: #1a1a1a;       
    font-style: normal;    
    font-size: 20px;       
    font-weight: bold;
    text-align: center;
    flex: 1 1 0;
}


#nwm-id-input::placeholder, 
#geo-id-input::placeholder {
    font-size: 18.5px;
    color: #9e9e9e; 
    font-style: italic;        
    font-weight: normal;
    text-align: left;
    flex: 1 1 0;
}

#log-nwm,
#log-geo {
    flex: 1 1 0;
}

#nwm-id-input.is-invalid,
#geo-id-input.is-invalid {
    background-image: none;
    padding-right: 0.75rem;
}

#log-nwm.armed,
#log-geo.armed {
    background-color: #198754;
    color: #fff;
    border-color: #146c43;
}

#toast-cont{
    top: 64px;
    left: 96px;
}

#verified-toast{
    min-width: 340px;
    background-color: #fff;
    border: 1px solid #146c43;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

#verified-toast .toast-header{
    background-color: #198754;
    border-bottom-color: #146c43;
    color: #fff;
}

#verified-toast-label{
    font-size: 17px;
    font-weight: bold;
}

#verified-toast .toast-body{
    font-size: 15px;
    color: #1a1a1a;
}
