/** =========================================================
 *  CORE NAV GRID + HEADINGS
 *  ====================================================== **/

/* Push menu onto new line */
#{$wrap} {
    clear: both;
}

/* Force inline layout between text and arrow (Mega Menu) */
.mega-menu-link {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35em; /* adds space between text and arrow */
}
/* Move the arrow/indicator to the LEFT of the text */
.mega-menu-link .mega-indicator {
    order: -1;
}

.ptu-reps-nav { width:100%; max-width:100%; box-sizing:border-box; }
.ptu-reps-grid { display:grid; grid-template-columns:repeat(4,minmax(200px,1fr)); gap:16px; }
@media (max-width:1100px){
    .ptu-reps-grid { grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }
}
.ptu-col { min-width:0; }

.ptu-head {
    font-weight:700;
    margin:6px 0 8px;
    letter-spacing:.02em;
    font-size:13px;
    opacity:.9;
    display:inline-block;
    text-decoration: none;
}
.ptu-head:hover { color:#333; }
.ptu-head.mt { margin-top:18px; }

/** =========================================================
 *  LISTS
 *  ====================================================== **/

.ptu-list { list-style:none; margin:0; padding:0; }
.ptu-list li { break-inside: avoid; margin:1px 0; }
.ptu-list a {
    display:block;
    padding:5px 6px;
    text-decoration:none;
    border-radius:6px;
    line-height:1.25;
    color:inherit;
    transition:background .15s ease, color .15s ease;
}
.ptu-list a:hover { background:rgba(0,0,0,.06); }
.ptu-list a:focus { outline:2px solid rgba(0,0,0,.25); outline-offset:2px; }
.is-active > a { font-weight:500; background:rgba(0,0,0,.08); }

/* Multi-column for long static lists */
.ptu-list.ptu-cols { columns:2; column-gap:20px; }
@media (max-width:1200px){ .ptu-list.ptu-cols { columns:1; } }

/** =========================================================
 *  SCROLLBOXES (general purpose)
 *  ====================================================== **/

.ptu-scrollbox {
    max-height:350px;
    overflow:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-gutter:stable;        /* gutter only on scroll side */
    padding:0;
    margin:0;
    padding-inline-end:6px;         /* tiny right gutter for scrollbar */
}
.ptu-scrollbox .ptu-list{ padding:0; margin:0; }
.ptu-scrollbox .ptu-list.ptu-cols{ columns:2; column-gap:20px; }
@media (max-width:1200px){ .ptu-scrollbox .ptu-list.ptu-cols{ columns:1; } }

/* WebKit scrollbar styling */
.ptu-scrollbox::-webkit-scrollbar{ width:8px; }
.ptu-scrollbox::-webkit-scrollbar-track{ background:rgba(0,0,0,0.06); }
.ptu-scrollbox::-webkit-scrollbar-thumb{ background:rgba(0,0,0,0.25); border-radius:8px; }
.ptu-scrollbox::-webkit-scrollbar-thumb:hover{ background:rgba(0,0,0,0.35); }

/** =========================================================
 *  V2: CHAINED DROPDOWNS
 *  ====================================================== **/

.ptu-reps-select-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.ptu-select {
    flex: 1 1 200px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
}

/** =========================================================
 *  V2: FILTER PANELS (Cities / ISDs)
 *  ====================================================== **/

.ptu-reps-filter-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

/* Search bar always spans full width */
.ptu-reps-filter-panel .ptu-filter-input {
    width: 100%;
    max-width: 100%;
}

/* Scrollbox: lock to 300px height, scroll vertically */
.ptu-reps-filter-panel .ptu-scrollbox {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 6px; /* avoid scrollbar overlap */
}

/* Default: 3-column grid */
.ptu-reps-filter-panel .ptu-scrollbox ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Tablet: drop to 2 columns */
@media screen and (max-width: 1023px) {
    .ptu-reps-filter-panel .ptu-scrollbox ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: drop to 1 column */
@media screen and (max-width: 767px) {
    .ptu-reps-filter-panel .ptu-scrollbox ul {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Links inside filter lists */
.ptu-reps-filter-panel .ptu-list li a {
    display: block;
    padding: 4px 6px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.15s ease;
}
.ptu-reps-filter-panel .ptu-list li a:hover {
    background: rgba(0, 0, 0, 0.08);
}

.ptu-reps-filter-panel .is-active {
    font-weight: 700;
    background: rgba(0,0,0,0.12);
}
.ptu-reps-filter-panel .is-active a {
    color: #000;
}

/* Federal link should look like a select by default */
.ptu-federal-link {
    display: inline-block;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Hover like a select */
.ptu-federal-link:hover {
    background: rgba(0,0,0,0.05);
}

/* Active/selected state */
.ptu-federal-link.is-active {
    font-weight: 500;
    background: rgba(255, 165, 0, 0.15); /* soft orange background */
    border-color: #ffa500;
    color: #d46a00; /* darker orange text */
}
