/* Series picker (components/pages/series_picker.py): a modal over the page that adds series of the Data page
   catalogue to an app's inputs. Every rule is scoped under .spk-modal. Tokens as the page kit: panels
   rgba(0,0,0,0.6) on a dark navy, radius 10px, text #e8e8e8, muted #9fb3c8, accent #f0a030. */

.spk-modal { display: none; position: fixed; inset: 0; z-index: 10030; background: rgba(2, 6, 12, 0.66);
             align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; box-sizing: border-box; }
.spk-modal.open { display: flex; }
.spk-modal * { box-sizing: border-box; }
.spk-modal .spk-panel { width: 100%; max-width: 880px; max-height: 88vh; overflow-y: auto; color: #e8e8e8; font-size: 13px;
                        background: linear-gradient(160deg, #0d1620 0%, #13263a 100%); border: 1px solid rgba(255,255,255,0.12);
                        border-radius: 12px; padding: 14px 16px 12px; box-shadow: 0 18px 60px rgba(0,0,0,0.55); }
.spk-modal .spk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.spk-modal .spk-title { color: #cfefff; font-weight: 600; font-size: 1.05rem; }
.spk-modal .spk-sub { color: #9fb3c8; font-size: .74rem; line-height: 1.45; margin-top: 2px; max-width: 700px; }
.spk-modal .spk-x { border: none; background: none; color: #9fb3c8; font-size: 1.1rem; cursor: pointer; padding: 2px 6px; }
.spk-modal .spk-x:hover { color: #f0a030; }
.spk-modal .spk-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin-bottom: 8px; }
.spk-modal .spk-f { min-width: 0; }
.spk-modal .spk-f-ds { flex: 1 1 300px; }
.spk-modal .spk-f-q { flex: 1.3 1 300px; }
.spk-modal .spk-f-wl { flex: 1 1 280px; }
.spk-modal .spk-k { color: #9fb3c8; font-size: .64rem; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 3px; }
.spk-modal .spk-in { width: 100%; height: 32px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.16);
                     background: rgba(0,0,0,0.45); color: #e8e8e8; padding: 0 10px; font-size: .82rem; }
.spk-modal .spk-in:focus { outline: none; border-color: rgba(240,160,48,0.7); }
.spk-modal .Select-control { min-height: 32px; }
.spk-modal .Select-value-label { color: #e8e8e8 !important; }
.spk-modal .Select-menu-outer { z-index: 10040; }
.spk-modal .spk-count { color: #9fb3c8; font-size: .72rem; margin: 2px 0 5px; }
.spk-modal .spk-loadwrap { min-height: 40px; }
.spk-modal .spk-res { border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; background: rgba(0,0,0,0.35);
                      max-height: 46vh; overflow-y: auto; }
.spk-modal .spk-r { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.spk-modal .spk-r:last-child { border-bottom: none; }
.spk-modal .spk-r:hover { background: rgba(255,255,255,0.03); }
.spk-modal .spk-r.off .spk-l { color: #8a9bab; }
.spk-modal .spk-t { flex: 1 1 auto; min-width: 0; }
.spk-modal .spk-l { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spk-modal .spk-m { font-size: .66rem; color: #9fb3c8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spk-modal .spk-add { flex: 0 0 auto; padding: 3px 10px; font-size: .74rem; }
.spk-modal .spk-add i { color: #f0a030; }
.spk-modal .spk-added { flex: 0 0 auto; color: #7fd6a4; font-size: .74rem; }
.spk-modal .spk-why { flex: 0 1 220px; color: #8a9bab; font-size: .66rem; line-height: 1.3; text-align: right;
                      overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.spk-modal .spk-none { color: #9fb3c8; font-size: .76rem; padding: 12px; }
.spk-modal .spk-wlrow { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.07); }
.spk-modal .spk-wladd { height: 32px; }
.spk-modal .spk-wladd i { color: #f0a030; }
.spk-modal .spk-msg { font-size: .74rem; line-height: 1.45; min-height: 1em; margin-top: 4px; }
.spk-modal .spk-ok { color: #bfe8c4; }
.spk-modal .spk-ok i { color: #3fbf7f; }
.spk-modal .spk-bad { color: #ffd0cb; }
.spk-modal .spk-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.spk-modal .spk-local { flex: 0 0 auto; color: #9fb3c8; font-size: .72rem; padding-bottom: 7px; }
.spk-modal .spk-local label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.spk-modal .spk-gotos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.spk-modal .spk-goto { padding: 3px 10px; font-size: .74rem; }
/* wave 3: every dataset at once (the dataset of a row, buttons to narrow), a series the lab already reads */
.spk-modal .spk-dsn { color: #f0c27a; }
.spk-modal .spk-per { align-items: center; margin-top: 4px; }
.spk-modal .spk-per .spk-goto { padding: 2px 8px; font-size: .68rem; }
.spk-modal .spk-by { margin: 0 2px 0 0; }
.spk-modal .spk-in-lab { color: #8fd3c0; }
.spk-modal .spk-in-lab i { color: #3fbf9f; margin-right: 2px; }
.spk-modal .spk-r.spk-builtin { background: rgba(63, 191, 159, 0.05); }

@media (max-width: 640px) {
  .spk-modal { padding: 10px 8px; }
  .spk-modal .spk-panel { max-height: 94vh; padding: 12px 10px 10px; }
  .spk-modal .spk-r { flex-wrap: wrap; }
  .spk-modal .spk-why { flex-basis: 100%; text-align: left; }
}
