/* Saved filter sets (scripts/tmb-saved-filters.js, 2026-11-24): the Saved
   menu and Save button in the matchup panel and Player Stats' rail, and the
   Save dialog on all three pages. */
.tsf-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.tsf-hint { font-size: 0.74rem; color: var(--tmb-gray-600); }
.tsf-menu-wrap { position: relative; flex: 1 1 auto; min-width: 0; }
.tsf-menu-btn, .tsf-save-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
    font-size: 0.74rem; font-weight: 600; color: var(--tmb-gray-900); cursor: pointer;
    background: var(--tmb-gray-100); border: 1px solid var(--tmb-gray-300); border-radius: 8px; box-shadow: none;
}
.tsf-menu-btn { width: 100%; }
.tsf-menu-btn span:first-of-type { flex: 1 1 auto; text-align: left; }
.tsf-menu-btn:hover, .tsf-save-btn:hover { background: var(--tmb-gray-300); }
.tsf-menu-btn i.fa-bookmark { color: var(--tmb-switch-on); font-size: 0.7rem; }
.tsf-caret { font-size: 0.6rem; color: var(--tmb-gray-600); }
.tsf-count { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--tmb-switch-on); color: white; font-size: 0.66rem; line-height: 16px; text-align: center; }
.tsf-save-btn { flex: 0 0 auto; }
.tsf-save-btn i { font-size: 0.62rem; }
.tsf-menu {
    position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; min-width: 200px;
    max-height: 260px; overflow-y: auto; padding: 4px; background: var(--tmb-surface, white);
    border: 1px solid var(--tmb-gray-300); border-radius: 8px; box-shadow: 0 6px 18px var(--tmb-black-15);
}
.tsf-empty { padding: 8px; font-size: 0.74rem; color: var(--tmb-gray-600); }
.tsf-item { display: flex; align-items: center; border-radius: 6px; }
/* front.css gives every button a grey background and a 3px bottom margin, both
   !important: these two take neither (Zach: the name and the trash can alone). */
.tsf-load, .tsf-del, .tsf-del:hover { background: none !important; margin-bottom: 0 !important; }
.tsf-load { border-radius: 6px; }
.tsf-load:hover { background: var(--tmb-gray-300) !important; }
.tsf-load { flex: 1 1 auto; min-width: 0; padding: 6px 8px; text-align: left; font-size: 0.78rem; color: var(--tmb-gray-900); background: none; border: 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsf-del { flex: 0 0 auto; width: 24px; height: 24px; margin-right: 2px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: none; color: var(--tmb-gray-500); cursor: pointer; font-size: 0.72rem; }
.tsf-del:hover { color: var(--tmb-red); }

/* The dialog */
.tsf-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.tsf-backdrop { position: absolute; inset: 0; background: var(--tmb-black-45); }
.tsf-box { position: relative; width: 100%; max-width: 440px; background: var(--tmb-surface, white); border-radius: 14px; box-shadow: 0 18px 48px var(--tmb-black-30); overflow: hidden; }
.tsf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 4px; }
.tsf-head h4 { margin: 0; padding: 0; border: 0; font-size: 1.1rem; font-weight: 700; color: var(--tmb-gray-900); }
.tsf-head h4::after, .tsf-head h4::before { display: none !important; content: none !important; }
.tsf-modal .tsf-x {
    width: 32px; height: 32px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%; background: var(--tmb-gray-100); color: var(--tmb-gray-700); cursor: pointer; font-size: 0.9rem; padding: 0;
}
.tsf-modal .tsf-x:hover { background: var(--tmb-gray-300); color: var(--tmb-gray-900); }
.tsf-body { padding: 12px 20px 4px; }
.tsf-label { display: block; margin: 0 0 6px; font-size: 0.8rem; font-weight: 600; color: var(--tmb-gray-900); }
.tsf-body input[type="text"] {
    width: 100%; height: 40px; padding: 0 12px; font-size: 0.95rem; color: var(--tmb-gray-900);
    background: var(--tmb-surface, white); border: 1px solid var(--tmb-gray-400); border-radius: 8px; box-shadow: none;
}
.tsf-body input[type="text"]:focus { outline: none; border-color: var(--tmb-switch-on); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tmb-switch-on) 18%, transparent); }
.tsf-k { margin: 16px 0 6px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--tmb-gray-600); }
.tsf-sum { border: 1px solid var(--tmb-gray-300); border-radius: 8px; background: var(--tmb-gray-100); }
.tsf-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; font-size: 0.82rem; color: var(--tmb-gray-700); }
.tsf-row + .tsf-row { border-top: 1px solid var(--tmb-gray-300); }
.tsf-row b { color: var(--tmb-gray-900); font-weight: 600; text-align: right; }
.tsf-none { color: var(--tmb-gray-600); font-style: italic; }
.tsf-note { margin: 8px 0 0; font-size: 0.72rem; color: var(--tmb-gray-600); }
.tsf-err { margin: 10px 0 0; padding: 8px 12px; font-size: 0.8rem; color: var(--tmb-red-700); background: var(--tmb-danger-bg-light); border: 1px solid color-mix(in srgb, var(--tmb-red) 35%, transparent); border-radius: 8px; }
.tsf-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px 18px; }
.tsf-modal .tsf-cancel, .tsf-modal .tsf-save { height: 36px; padding: 0 18px; font-size: 0.85rem; font-weight: 600; border-radius: 999px; cursor: pointer; opacity: 1; box-shadow: none; }
/* !important: front.css's global button rules outrank a class alone. */
.tsf-modal .tsf-cancel { color: var(--tmb-gray-700) !important; background: var(--tmb-surface, white) !important; border: 1px solid var(--tmb-gray-300) !important; }
.tsf-modal .tsf-cancel:hover { background: var(--tmb-gray-100) !important; }
.tsf-modal .tsf-save { color: white !important; background: var(--tmb-switch-on) !important; border: 1px solid var(--tmb-switch-on) !important; }
.tsf-modal .tsf-save:hover { background: color-mix(in srgb, var(--tmb-switch-on), black 12%) !important; }
.tsf-modal .tsf-save:disabled { opacity: 0.6; cursor: default; }

/* The ⓘ beside "How close" (TMB.oppSets.tolInfo(), tmb-common.js). The
   rails clip what runs past their edges, so the text is placed on the whole
   "How close" row (the icon itself is static): exactly the panel's width,
   opening upward (the row sits low in a pinned rail). front.css's
   .info-tooltip is the rest (and the phone sheet). */
.tmb-tol-info { white-space: nowrap; margin-left: 2px; font-size: 0.85em; color: var(--tmb-gray-600); font-weight: 400; cursor: help; }
.tmb-tol-info:focus .tooltip-text { display: block; opacity: 1; }
@media (min-width: 769px) {
    .ps-opp-count:has(.tmb-tol-info), .mfd-frow:has(.tmb-tol-info), .psb-frow:has(.tmb-tol-info) { position: relative; }
    .tmb-tol-info { position: static; }
    .tmb-tol-info .tooltip-text { white-space: normal; top: auto; bottom: calc(100% + 6px); left: 0; right: 0; margin-left: 0; width: auto; max-width: none; font-size: 0.75rem; text-transform: none; letter-spacing: normal; }
}

/* Player Stats rail, Nearest: the How many on each slider takes the row. */
.psb-dimn { flex: 1; min-width: 60px; margin: 0; }
.psb-dimn-v { font-size: 0.72rem; color: var(--tmb-gray-700); white-space: nowrap; }
