/* Chart of nuclides page (/chart/): a full-page tool under the fixed nav.
   --nav-h is set from the nav's real height by chart-page.js. */
.icon-page { position: fixed; top: var(--nav-h, 56px); left: 0; right: 0; bottom: 0;
             padding: 6px 12px 10px; background: #fff; }
#main-container, .icon-layout, .icon-main { height: 100%; }
.icon-layout { display: block; padding: 0; }
.icon-main { display: flex; flex-direction: column; position: relative; min-height: 0; }

/* one line above the chart on wide screens; wraps only on narrow ones */
.icon-toolbar { display: flex; flex-wrap: nowrap; gap: 6px 12px; align-items: center; margin-bottom: 6px; min-height: 40px; }
@media (max-width: 1199px) { .icon-toolbar { flex-wrap: wrap; } }
.icon-field { display: flex; align-items: center; gap: 6px; font-size: .9rem; flex-shrink: 0; white-space: nowrap; }
.icon-field select { width: 250px; }
.icon-check { flex-shrink: 0; font-size: .9rem; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.icon-search { position: relative; display: flex; gap: 4px; }
.icon-search input { width: 130px; }

.icon-chart { width: 100%; flex: 1 1 auto; min-height: 0;
              border: 1px solid #ddd; border-radius: 6px; background: #fff; position: relative; }
.icon-chart svg { display: block; width: 100%; height: 100%; }

.icon-legend { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 8px; font-size: .8rem; color: #333;
               white-space: nowrap; min-width: 0; flex: 0 1 auto; overflow: hidden; }
@media (max-width: 1199px) { .icon-legend { flex-wrap: wrap; } }
.icon-value { font-size: .9rem; color: #222; white-space: nowrap; margin-left: auto; flex-shrink: 0;
              max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.icon-legend svg { overflow: visible; }
.icon-legend .tick text { font-size: 10px; }
.icon-legend-label { font-weight: 600; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.icon-swatch { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.icon-swatch i { display: inline-block; width: 11px; height: 11px; border: 1px solid rgba(0,0,0,.25); border-radius: 2px; }

.icon-side { font-size: .9rem; }
.icon-info-panel { border-radius: 6px; }
.icon-info-content h4 { font-size: 1.25rem; margin: 0 0 .25rem; }
.icon-info-content p { margin: 0 0 .15rem; }
.icon-props dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 10px; margin: .5rem 0; }
.icon-props dt { font-weight: 500; color: #444; }
.icon-props dd { margin: 0; overflow-wrap: anywhere; }
.icon-props .icon-props-head { grid-column: 1 / -1; margin-top: .5rem; font-weight: 700; color: #178c6b;
                               border-bottom: 1px solid #e3e3e3; }
.icon-copy { margin-top: .25rem; }
.icon-sources { margin-top: 1rem; font-size: .82rem; color: #444; }
.icon-sources summary { cursor: pointer; font-weight: 600; }
.icon-sources ul { padding-left: 1.1rem; margin: .4rem 0; }

/* ICoN search autocomplete list */
.icon-ac-list { position: absolute; z-index: 20; top: 100%; left: 0; min-width: 260px; background: #fff;
                border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.12);
                font-size: .85rem; max-height: 260px; overflow: auto; }
.icon-ac-item { padding: 4px 8px; cursor: pointer; }
.icon-ac-item.icon-ac-active, .icon-ac-item:hover { background: #eef6f3; }

/* ICoN's InfoPanel, floating over the lower-left corner of the chart. It
   animates open; select(..., {zoom: true}) zooms when the height transition
   ends, so the panel needs one. */
#info-panel { transition: height .3s ease; position: absolute; left: 14px; bottom: 14px; width: 250px;
              z-index: 5; background: rgba(255, 255, 255, .97); border-radius: 6px;
              box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
#info-panel .icon-info-content { padding: 8px 12px; }
.icon-copy { text-transform: none; letter-spacing: 0; }
/* closed (before the first selection, or after ICoN collapses it to 0px) */
#info-panel { height: 0; overflow: hidden; }
#info-panel:not([style*="height: 200px"]) { box-shadow: none; background: transparent; }

/* Fission yield explorer: Y(A)/Y(Z) panel above the chart */
.fy-picker { display: flex; align-items: center; gap: 4px; flex-shrink: 0; font-size: .9rem; white-space: nowrap; }
.fy-picker select { width: auto; }
.fy-page .icon-legend svg { overflow: visible; }
.fy-panel { flex: 0 0 34%; min-height: 180px; border: 1px solid #ddd; border-radius: 6px; margin-bottom: 6px; position: relative; }
.btn-group .btn.active { background: #6c757d; color: #fff; }

/* Overlays menu */
.icon-overlays { flex-shrink: 0; }
.icon-overlays .dropdown-menu { width: 330px; font-size: .85rem; }
.icon-ov-row { display: flex; gap: 6px; align-items: center; margin: 4px 0; }
.icon-ov-sub { margin: 0 0 6px 22px; }
.icon-ov-sub select { width: auto; display: inline-block; margin-left: 6px; }
.icon-ov-note { font-size: .75rem; color: #666; margin: 2px 0 0; line-height: 1.3; }
.icon-chart .overlays-layer { pointer-events: none; }   /* clicks reach the cells */
