html, body { height: 100%; overflow: hidden; }

.panel { overflow-x: hidden; }
.table-wrap { overflow-x: hidden; }
table { min-width: 0; width: 100%; table-layout: fixed; }
th, td { text-align: center; }
label { text-align: center; }


    .dash-split{

  width: calc(100vw - 40px);
  margin-left: calc(50% - 50vw + 20px);
  margin-right: calc(50% - 50vw + 20px);

  display:flex;
  gap:12px;
  margin-top:0;
  padding:0 8px;
  box-sizing:border-box;
}


main.main{
  padding-top: 3px !important;
  padding-bottom: 3px !important;
}
.dash-sidebar, .dash-main{
  flex:1 1 auto;
  min-width:0;
  height: calc(100vh - 108px);
  overflow-y:auto;
  overflow-x:hidden;
  box-sizing:border-box;
}
@media (min-width: 981px) {
      .dash-sidebar, .dash-main {
        max-height: calc(100vh - 108px);
        overflow: auto;
        padding-right: 6px;
      }
    }
    @media (max-width: 980px) {

      html, body { height: 100%; overflow: hidden; }


      .dash-split{
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
      }


      .dash-sidebar{
        flex: 0 0 330px;
        min-width: 330px;
        max-width: 330px;
        height: calc(100vh - 108px);
        max-height: calc(100vh - 108px);
        overflow-y: auto;
      }
      .dash-main{
        flex: 0 0 920px;
        min-width: 920px;
        height: calc(100vh - 108px);
        max-height: calc(100vh - 108px);
      }


      .dash-sidebar, .dash-main{ padding-bottom: calc(140px + env(safe-area-inset-bottom)); }


      .btn-wide { width: 100%; min-width: 0; }


      .dash-sidebar .grid.grid-row1{ grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
      .dash-sidebar .grid.grid-row1 > div{ min-width: 0; }
      .dash-sidebar .grid.grid-row1 .date-field{ grid-column: 1 / -1; }

      .dash-sidebar input[type="date"]{ width: 100%; min-width: 0; max-width: calc(100% - 2px); box-sizing: border-box; display: block; }
    }

.dash-sidebar{
  flex:0 0 330px;
  min-width:290px;
  max-width:420px;
  height: calc(100vh - 108px);
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:6px;
  box-sizing:border-box;
}


.sidebar-divider{
  height:1px;
  background:#e8eaee;
  margin:12px 0;
}

.sidebar-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.sidebar-actions form{ margin:0; }


.sidebar-actions form.bulk-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
  align-items:end;
  width:100%;
}
.sidebar-actions form.bulk-grid .span-2{ grid-column: 1 / -1; }
.sidebar-actions form.bulk-grid .field{ display:flex; flex-direction:column; }
.sidebar-actions form.bulk-grid button{ width:100%; }
.sidebar-actions form.reset-form{ display:block; width:100%; }
.sidebar-actions form.create-tag-form{ display:block; width:100%; }
.sidebar-actions .create-tag-block{ width:100%; }

.admin-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
  align-items:end;
  width:100%;
}
.admin-grid .span-2{ grid-column: 1 / -1; }
.admin-grid .field{ display:flex; flex-direction:column; }
.admin-grid button{ width:100%; }


.sidebar-actions label{ font-size:12px; margin-bottom:4px; }
.sidebar-actions select,
.sidebar-actions input[type="text"],
.sidebar-actions .btn,
.sidebar-actions .btn-secondary,
.sidebar-actions button{
  height:34px;
  border-radius:10px;
}

.sidebar-actions .btn,
.sidebar-actions .btn-secondary{
  padding:0 12px;
  font-size:13px;
}

.sidebar-actions input[type="text"]{
  padding:6px 8px;
  font-size:13px;
}

.dash-sidebar .card{ padding:12px; margin-bottom:12px; }
.dash-sidebar h2{ margin:0 0 8px 0; font-size:16px; }
.dash-sidebar label{ font-size:12px; margin-bottom:4px; text-align:left; }
.dash-sidebar .muted{ font-size:12px; }
.dash-sidebar input:not([type="checkbox"]):not([type="radio"]),
.dash-sidebar select{
  height:34px;
  padding:6px 8px;
  font-size:13px;
  border-radius:10px;
  width:100%;
  box-sizing:border-box;
}
.dash-sidebar input[type="checkbox"],
.dash-sidebar input[type="radio"]{
  width:14px;
  height:14px;
  margin:0;
  vertical-align:middle;
}
.dash-sidebar .grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:8px;
}
.dash-sidebar .wide-span{ grid-column: 1 / -1; }
.dash-sidebar .grid-2{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:8px;
}
@media (max-width: 860px){
  .grid-2{ grid-template-columns: 1fr; }
}
.dash-sidebar .actions{ gap:8px; }


.dash-sidebar .dropdown > summary{
  height:34px;
  padding:6px 8px;
  font-size:13px;
}


.dash-sidebar .dropdown > summary{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap:10px;
}
.dash-sidebar .dropdown.has-selection > summary{
  justify-content: center;
}
.dash-sidebar .dropdown.has-selection > summary span:not(.hint){
  width:100%;
  text-align:center;
  font-weight: 700;
}

.dash-sidebar .dropdown > summary .hint{ max-width: 62%; }
.dash-sidebar .dropdown-panel{ max-height:220px; }


.dropdown-actions{
  display:flex;
  align-items:center;
  gap:2px;
  flex-wrap:wrap;
}
.dropdown-actions .link-btn{
  display:inline-flex;
  align-items:center;
  line-height:1;
  font-size:12px;
  padding:2px 4px;
}


.dropdown-panel ul{ list-style:none; margin:8px 0 0; padding:0; }
.dropdown-panel li{ margin:0; padding:0; }
.dropdown-panel label{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  text-align:left;
  font-size:13px;
  line-height:1.25;
  padding:4px 2px;
}
.dropdown-panel input[type="checkbox"]{
  width:14px !important;
  height:14px !important;
  margin:0;
  flex:0 0 14px;
}
.dropdown-panel label input{ margin-top:0; }


.dash-main .table-container{
  max-height: calc(100vh - 200px);
  overflow-y:auto;
  overflow-x:hidden;
}
.dash-main table{
  min-width:0;
  table-layout: fixed;
}
.dash-main th, .dash-main td{
  padding:8px 8px;
  font-size:13px;
}

.dash-main td.col-word{ font-weight:600; }

#resultsTable input[type="checkbox"]{ width:14px; height:14px; margin:0; vertical-align:middle; }
.dash-main th.col-word{ width:18%; }
.dash-main th.col-tag1, .dash-main th.col-tag2, .dash-main th.col-tag3{ width:12%; }
.dash-main th.col-count{ width:9%; }
.dash-main th.col-per60, .dash-main th.col-per1000{ width:11%; }
.dash-main th.col-edit{ width:72px; }
.dash-main th.col-select{ width:28px; }

.col-word, .col-tag{ white-space: normal; word-break: break-word; }
.col-num{ white-space: nowrap; }



  body { scrollbar-width: none; -ms-overflow-style: none; overflow-x: hidden; }
  body::-webkit-scrollbar { width: 0; height: 0; }


  .dash-sidebar .grid > div > label,
  .dash-sidebar .grid-2 > div > label,
  .dash-sidebar .row > div > label { text-align: center; }
  .dash-sidebar li label { text-align: left; }


  .dash-main table th, .dash-main table td { text-align: center; }



.bulk-actions, .tag-admin, .tag-overrides { text-align: center; }
.bulk-actions .field, .tag-admin .field, .tag-overrides .field { text-align: center; }
.bulk-actions label, .tag-admin label, .tag-overrides label { text-align: center; }
.bulk-actions select, .tag-admin select, .tag-overrides select { text-align-last: center; }

    .results-title-row{
      display:flex;
      align-items:baseline;
      justify-content:space-between;
      gap:12px;
      flex-wrap:wrap;
    }
    .results-meta{
      display:flex;
      gap:14px;
      flex-wrap:wrap;
      font-size:13px;
      color:#667085;
    }
    .results-meta strong{ color:#111; font-weight:700; }


    .dash-main{
      overflow:hidden !important;
      display:flex;
      flex-direction:column;
      min-width: 0;
    }
    .dash-main .card{
      display:flex;
      flex-direction:column;
      min-height:0;
      height:100%;
    }


    .dash-main .card.empty-state{
      align-items:center;
      justify-content:center;
      text-align:center;
    }
    .dash-main .card.empty-state .empty-state-text{
      font-size: 1.15rem;
      font-weight: 600;
      margin: 0;
    }
.dash-main .table-container{
      flex:1;
      min-height:0;
      max-height:none;
    }


    .site-footer{
      position:fixed;
      left:0;
      right:0;
      bottom:0;
      z-index:50;
	  background:rgba(247,248,250,0.96);
	  border-top:1px solid #e8eaee;
	  backdrop-filter: saturate(180%) blur(10px);
    }

	.site-footer{ padding:4px 0; }
	.site-footer .container{ padding:0 !important; }
	.site-footer .muted{ font-size:12px; line-height: 1.1; }
	.site-footer .x-link{ padding:0; }
	.site-footer .x-icon{ width:22px; height:22px; }


	.dash-split{ padding-bottom:8px; }


	.left-footer{ padding:10px 12px !important; }
	.pagination-bar{
	  display:flex;
	  align-items:center;
	  justify-content:space-between;
	  gap:10px;
	  margin-top:0;
	  padding:8px 10px;
	  border:1px solid #eee;
	  border-radius:12px;
	  background:#fafafa;
	}
	.pager{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
	.pagination-btn{
	  display:inline-flex;
	  align-items:center;
	  justify-content:center;
	  padding:6px 9px;
	  border:1px solid #e5e7eb;
	  border-radius:10px;
	  background:#fff;
	  color:#111;
	  font-size:12px;
	  min-width:32px;
	  height:30px;
	  text-decoration:none;
	}
	.pagination-btn:hover{ background:#f3f4f6; }
	.pagination-btn.is-active{ background:#111; color:#fff; border-color:#111; }
	.per-page-form{ display:flex; align-items:center; gap:8px; }
	.per-page-label{ display:flex; align-items:center; gap:8px; font-size:12px; color:#667085; white-space:nowrap; }
	.per-page-form select{ height:30px; font-size:12px; padding:4px 6px; border-radius:10px; }
	.per-page-form button{ height:30px; padding:6px 10px; font-size:12px; border-radius:10px; }


		.dash-pagination{
		  font-size:12px;
		}
		.dash-pagination .btn-secondary,
		.dash-pagination span[style*="background:#111"],
		.dash-pagination span[style*="background: #111"]{
		  padding:5px 8px !important;
		  border-radius:9px !important;
		  font-size:12px !important;
		}
		.dash-pagination select{
		  height:30px !important;
		  font-size:12px !important;
		  padding:4px 6px !important;
		  border-radius:10px !important;
		  width:92px;
		}
		.dash-pagination button{
		  height:30px !important;
		  padding:6px 10px !important;
		  font-size:12px !important;
		  border-radius:10px !important;
		}




.toggle-group{ display:grid; gap:6px; }
.toggle-row{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  margin:0;
  font-size:12px;
  line-height:1.1;
  text-align:left;
}
.toggle-row span{ font-size:12px; }

.create-tag-title{ font-size:14px; font-weight:600; margin:0 0 4px 0; }


.btn-wide{ width:100% !important; min-width:0 !important; }




.tag-frame{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 3px 8px 3px;
  border:1.5px solid var(--tag-color, #d0d5dd);
  border-radius:999px;
  line-height: 1.05;
  box-sizing:border-box;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  text-align:center;
  vertical-align:middle;
}




.dash-main > .card{

  padding: 12px 18px;
}
.dash-main .table-toolbar{
  margin-bottom: 6px;
}
.dash-main .dash-pagination{
  margin-top: 6px !important;
}


.dash-main .table-toolbar #downloadCsvBtn,
.dash-main .table-toolbar #copyCsvBtn{
  height: 32px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1;
  border-radius: 10px;
}


.dash-main .dash-pagination .btn-secondary,
.dash-main .dash-pagination button,
.dash-main .dash-pagination select{
  height: 28px !important;
}
.dash-main .dash-pagination .btn-secondary,
.dash-main .dash-pagination span[style*="background:#111"],
.dash-main .dash-pagination span[style*="background: #111"]{
  padding: 4px 7px !important;
}
.dash-main .dash-pagination button{
  padding: 5px 9px !important;
}
.dash-main .dash-pagination select{
  padding: 3px 6px !important;
}




.dash-sidebar h2,
.dash-sidebar h3{
  font-size: 1.17em;
  line-height: 1.2;
}




    .speech-count-link {
      background: none;
      border: none;
      padding: 0;
      margin: 0;
      cursor: pointer;
      color: inherit;
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    .speech-modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.35);
      z-index: 9999;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
    }


    .speech-modal-backdrop[hidden] {
      display: none !important;
    }

    .speech-modal {
      width: min(900px, 100%);
      max-height: 80vh;
      overflow: auto;
      background: #fff;
      border: 1px solid #e5e7eb;
      border-radius: 14px;
      box-shadow: 0 18px 50px rgba(0,0,0,0.18);
    }

    .speech-modal-header {
      position: sticky;
      top: 0;
      background: #fff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 14px;
      border-bottom: 1px solid #eee;
    }

    .speech-modal-title {
      font-size: 14px;
      font-weight: 700;
      margin: 0;
    }

    .speech-modal-close {
      background: #f3f4f6;
      border: 1px solid #e5e7eb;
      border-radius: 10px;
      padding: 6px 10px;
      cursor: pointer;
      font-size: 13px;
    }

    .speech-modal-body {
      padding: 12px 14px;
    }

    .speech-list-table {
      width: 100%;
      border-collapse: collapse;
    }

    .speech-list-table th,
    .speech-list-table td {
      border-bottom: 1px solid #eee;
      padding: 8px 8px;
      text-align: left;
      font-size: 13px;
      vertical-align: top;
      white-space: nowrap;
    }

    .speech-list-table td:last-child {
      white-space: normal;
    }


      @media (hover: none) and (pointer: coarse) and (max-width: 980px){
        #speechListOpen{
          pointer-events:none;
          cursor: default;
          text-decoration: none;
          opacity: 0.95;
        }
      }


/* ---- Polymarket view toggle ---- */
.dash-main .card.poly-only{ display:none !important; }
.view-poly .dash-main .card.poly-only{ display:flex !important; }
.view-poly .dash-main .card.word-only{ display:none !important; }
.dash-main .table-container{ overflow-y:auto !important; overflow-x:hidden !important; }

/* Polymarket table: tighter columns */
#polyResultsCard th.col-count, #polyResultsCard td.col-count{ width:52px; }
#polyResultsCard th.col-per60, #polyResultsCard td.col-per60{ width:72px; }
#polyResultsCard th.col-per1000, #polyResultsCard td.col-per1000{ width:92px; }
#polyResultsCard th.col-word, #polyResultsCard td.col-word{ max-width:240px; }
#polyResultsCard td.col-word{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#polyResultsCard td.col-pm{ max-width:520px; }


/* Polymarket table: make numeric columns tighter and Polymarket column wider */
#polyResultsTable th, #polyResultsTable td{
  padding:5px 6px;
  font-size:12px;
}
#polyResultsTable th.col-count, #polyResultsTable td.col-count{ width:40px; }
#polyResultsTable th.col-speeches, #polyResultsTable td.col-speeches{ width:58px; }
#polyResultsTable th.col-per60, #polyResultsTable td.col-per60{ width:56px; }
#polyResultsTable th.col-per1000, #polyResultsTable td.col-per1000{ width:64px; }
#polyResultsTable th.col-word, #polyResultsTable td.col-word{ width:150px; }
#polyResultsTable th.col-pm, #polyResultsTable td.col-pm{ width:auto; }
#polyResultsCard td.col-pm{ max-width:1100px; }


/* Polymarket pagination bar: more compact */
#polyPagination{
  margin-top:6px !important;
  gap:6px !important;
  padding-top:4px;
}
#polyPagination .pager{
  display:flex;
  align-items:center;
  gap:6px;
}
#polyPagination .pager button{
  padding:4px 10px;
  font-size:12px;
}
#polyPagination form{
  gap:6px !important;
}
#polyPagination select{
  height:28px;
  padding:4px 6px;
  font-size:12px;
}
#polyPagination .btn-secondary{
  padding:4px 10px;
  font-size:12px;
}

/* Polymarket pill: common frame around outcome + odds */
.pm-pill{
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  gap:6px;
  padding:2px 6px;
  border:1px solid #d0d5dd;
  border-radius:10px;
  background:#f9fafb;
  margin-left:auto;
  max-width: 100%;
}
.pm-pill .pm-outcome{
  font-weight:600;
  font-size:12px;
  color:#111827;
  max-width: 260px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  border:none;
  background:transparent;
  padding:0;
}
.pm-odds-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:2px 6px;
  border-radius:8px;
  font-weight:700;
  font-size:11px;
  text-decoration:none;
  border:1px solid transparent;
  white-space:nowrap;
}
.pm-odds-btn.yes{
  background:#ecfdf3;
  color:#027a48;
  border-color:#abefc6;
}
.pm-odds-btn.no{
  background:#fef3f2;
  color:#b42318;
  border-color:#fecdca;
}

.poly-only{ display:none; }
.view-poly .poly-only{ display:block; }
.view-poly .word-only{ display:none !important; }
.view-toggle{
  display:flex;
  width:100%;
  border:1px solid #d0d5dd;
  border-radius:12px;
  background:#f2f4f7;
  padding:2px;
  gap:2px;
}
.view-toggle-btn{
  flex:1;
  border:0;
  background:transparent;
  padding:8px 10px;
  border-radius:10px;
  font-weight:600;
  font-size:13px;
  cursor:pointer;
  color:#475467;
}
.view-toggle-btn.is-active.view-toggle-word{
  background:#fff;
  color:#111827;
  box-shadow: 0 1px 2px rgba(16,24,40,.08);
}
.view-toggle-btn.is-active.view-toggle-poly{
  background:#1570ef;
  color:#fff;
  box-shadow: 0 1px 2px rgba(16,24,40,.08);
}

.view-toggle-btn.view-toggle-poly:not(.is-active){
  background:#e7f0ff !important;
  color:#1d4ed8 !important;
}
.view-toggle-btn:not(.is-active):hover{
  background:rgba(16,24,40,.04);
}

.dash-sidebar .text-input{
  height:34px;
  padding:6px 8px;
  font-size:13px;
  border-radius:10px;
  width:100%;
  box-sizing:border-box;
  border:1px solid #d0d5dd;
}

.pm-links{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.pm-line{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  font-size:12px;
}
.pm-event{
  color:#111827;
  text-decoration:none;
  font-weight:600;
}
.pm-event:hover{ text-decoration:underline; }
.pm-outcome{
  border:1px solid #d0d5dd;
  border-radius:999px;
  padding:2px 8px;
  background:#fff;
  font-weight:600;
}
.pm-odds-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:2px 8px;
  border-radius:8px;
  font-weight:700;
  font-size:12px;
  text-decoration:none;
  border:1px solid transparent;
}
.pm-odds-btn.yes{
  background:#12b76a;
  border-color:#12b76a;
  color:#fff;
}
.pm-odds-btn.no{
  background:#f04438;
  border-color:#f04438;
  color:#fff;
}
.pm-odds-btn:hover{ filter:brightness(0.98); }

.view-poly #polyResultsCard{
  display:flex;
  flex-direction:column;
}
.view-poly #polyResultsCard .table-container{
  flex:1;
  min-height:0;
}



/* ---- view safety + poly scroll hardening ---- */
[hidden]{ display:none !important; }
#polyResultsCard{ height:100%; min-height:0; }
#polyResultsCard .table-container{ flex:1 1 auto; min-height:0; overflow-y:auto !important; overflow-x:hidden !important; }

#polyResultsCard .dash-table th, #polyResultsCard .dash-table td { padding:6px 8px; font-size:12px; }

/* Polymarket compact pill overrides */
.pm-event-link{
  display:block;
  flex:1;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  color:#344054;
  text-decoration:none;
}
.pm-event-link:hover{ text-decoration:underline; }
.pm-pill{ display:inline-flex; align-items:center; gap:6px; border:1px solid #e5e7eb; border-radius:10px; padding:2px 6px; background:#fff; max-width:520px; }
.pm-outcome{ font-size:12px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:240px; }
.pm-odds-btn{ display:inline-flex; align-items:center; justify-content:center; font-size:11px; padding:2px 6px; border-radius:8px; text-decoration:none; line-height:1.2; border:1px solid transparent; white-space:nowrap; }
.pm-odds-btn.yes{ background:#e7f8ef; border-color:#b7ebc6; color:#107a3a; }
.pm-odds-btn.no{ background:#ffeaea; border-color:#ffc0c0; color:#b42318; }


.view-toggle .toggle-btn.poly-btn{ background:#dbeafe; color:#1d4ed8; border-color:#c7ddff; }
.view-toggle .toggle-btn.is-active.poly-btn{ background:#2563eb; color:#fff; border-color:#2563eb; }


/* ---- PATCH: Polymarket cell alignment + compact poly pagination ---- */
/* (safe CSS-only tweaks; does not alter template tags / JS logic) */

/* 1) Ensure Polymarket event title is left-aligned inside the column */
#polyResultsTable th.col-pm,
#polyResultsTable td.col-pm{
  text-align:left !important;
}
#polyResultsTable td.col-pm .pm-line{
  width:100%;
  justify-content:space-between;
  flex-wrap:nowrap;
}
#polyResultsTable td.col-pm .pm-event-link{
  text-align:left;
  flex:1 1 auto;
  min-width:0;
}

/* 2) Make the Polymarket pagination/per-page panel more compact */
#polyPagination.pagination-bar{
  padding:6px 8px !important;
  gap:8px !important;
  border-radius:10px !important;
}
#polyPagination .pager{
  gap:4px !important;
}
#polyPagination form{
  gap:6px !important;
  flex-wrap:nowrap !important;
}
#polyPagination form label{
  white-space:nowrap !important;   /* prevent "Per page" from wrapping */
}
#polyPagination select{
  height:28px !important;
  padding:3px 6px !important;
}
#polyPagination button,
#polyPagination .btn-secondary{
  height:28px !important;
  padding:4px 8px !important;
}

/* If viewport is truly narrow, allow wrapping so it doesn't overflow */
@media (max-width: 520px){
  #polyResultsTable td.col-pm .pm-line{ flex-wrap:wrap; }
  #polyPagination form{ flex-wrap:wrap !important; }
}



/* --- Polymarket view tweaks (alignment + compact controls) --- */
#polyResultsCard .pm-line{
  flex-wrap:nowrap !important;
  justify-content:space-between;
  gap:10px;
}
#polyResultsCard .pm-event-link{
  text-align:left;
}
#polyResultsCard .pm-pill{
  margin-left:auto !important;
}

/* Make Polymarket CSV buttons match Single Word sizing */
#polyResultsCard #polyDownloadCsvBtn,
#polyResultsCard #polyCopyCsvBtn{
  padding:0 10px !important;
  font-size:12px !important;
  height:28px !important;
  line-height:28px !important;
}

/* Compact Polymarket pagination + prevent 'Per page' from wrapping */
#polyPagination{
  margin-top:4px !important;
  gap:6px !important;
  padding-top:2px !important;
  flex-wrap:nowrap !important;
}
#polyPagination form{
  gap:6px !important;
  flex-wrap:nowrap !important;
}
#polyPagination label{
  white-space:nowrap !important;
  display:inline-block !important;
}
#polyPagination select{
  height:26px !important;
  padding:2px 6px !important;
  font-size:12px !important;
}
#polyPagination .pager button,
#polyPagination .btn-secondary{
  padding:3px 8px !important;
  font-size:12px !important;
}

/* Allow wrapping on narrow screens */
@media (max-width: 700px){
  #polyPagination{ flex-wrap:wrap !important; }
  #polyPagination form{ flex-wrap:wrap !important; }
  #polyResultsCard .pm-line{ flex-wrap:wrap !important; }
}

/* ---- Polymarket view tweaks: extra-compact pagination + fixed odds pill width ---- */
#polyPagination{
  margin-top:4px !important;
  gap:6px !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
}
#polyPagination form{
  gap:6px !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
}
#polyPagination label{
  white-space:nowrap !important;
  font-size:11px !important;
  line-height:1 !important;
}
#polyPagination select{
  height:22px !important;
  padding:0 8px !important;
  font-size:11px !important;
}
#polyPagination button{
  height:22px !important;
  padding:0 8px !important;
  font-size:11px !important;
  line-height:1 !important;
}
#polyPagerBtns{
  display:flex !important;
  gap:6px !important;
  align-items:center !important;
}
#polyPagerBtns button{
  height:22px !important;
  padding:0 8px !important;
  font-size:11px !important;
  line-height:1 !important;
}

/* Keep odds buttons visually consistent row-to-row */
.pm-odds-btn{
  min-width:64px !important;
  justify-content:center !important;
  font-variant-numeric: tabular-nums;
}

/* Allow wrapping only on very narrow screens */
@media (max-width: 720px){
  #polyPagination{ flex-wrap:wrap !important; }
  #polyPagination form{ flex-wrap:wrap !important; justify-content:flex-end; }
}


/* --- Polymarket pagination: ultra-compact (v6) --- */
#polyPagination.pagination-bar{
  padding:2px 6px !important;
  gap:6px !important;
  margin-top:6px !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  border-radius:10px !important;
}
#polyPagination{ overflow-x:auto; }
#polyPagination #polyPagerBtns{ display:flex; gap:4px !important; align-items:center; }
#polyPagination form{
  display:flex !important;
  align-items:center !important;
  gap:6px !important;
  flex-wrap:nowrap !important;
  margin:0 !important;
}
#polyPagination label{ white-space:nowrap !important; margin:0 !important; line-height:1 !important; }
#polyPagination select, #polyPagination button{
  height:20px !important;
  padding:0 8px !important;
  font-size:12px !important;
  line-height:18px !important;
}
#polyPagination .btn-secondary, #polyPagination .btn-primary{
  height:20px !important;
  padding:0 10px !important;
  border-radius:8px !important;
}
/* Keep the bar single-row; allow horizontal scroll instead of wrapping */
#polyPagination::-webkit-scrollbar{ height:6px; }
#polyPagination::-webkit-scrollbar-thumb{ background:#d0d5dd; border-radius:10px; }

/* Ensure event title is left and pill is right in polymarket column */
#polyResultsTable td.col-pm{ text-align:left !important; }
#polyResultsTable td.col-pm .pm-line{ justify-content:space-between !important; flex-wrap:nowrap !important; gap:8px !important; }
#polyResultsTable td.col-pm .pm-event-link{ text-align:left !important; }



/* --- Share buttons (Polymarket view) --- */
.pm-signal-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:space-between;
}
.pm-signal-text{min-width:0;}
.pm-row-share-btn{
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(255,255,255,0.06);
  color:#d9e6ff;
  padding:4px 6px;
  border-radius:8px;
  line-height:0;
  cursor:pointer;
}
.pm-row-share-btn:hover{background:rgba(255,255,255,0.10);}
.pm-row-share-btn svg{display:block;}
/* Share modal sizing */
.share-modal{width:min(980px,100%);max-height:92vh;}
.share-modal .speech-modal-body{display:flex;flex-direction:column;align-items:center;}
#shareImg{width:800px;max-width:100%;height:auto;max-height:70vh;object-fit:contain;}

/* Polymarket signal marquee (for long names) */
.pm-signal-wrap { display:flex; align-items:center; gap:8px; }
.pm-signal-clip { flex: 1; min-width: 0; overflow: hidden; }
.pm-signal-text { display: inline-block; white-space: nowrap; }
.pm-signal-text.is-overflow { will-change: transform; }
.pm-signal-wrap:hover .pm-signal-text.is-overflow {
  animation: pmMarquee var(--pm-marquee-duration, 10s) linear infinite;
}
@keyframes pmMarquee {
  0%, 10% { transform: translateX(0); }
  90%, 100% { transform: translateX(calc(-1 * var(--pm-marquee-distance, 0px))); }
}
