/* Apply core table styles to BOTH new tables */
#adminRestaurantsTableHeader, #adminRestaurantsTableBody { 
    table-layout: fixed; 
    width: 100%; 
    min-width: 900px; 
    border-collapse: collapse; 
    margin: 0 auto;
}

#adminRestaurantsTableHeader th, #adminRestaurantsTableBody td { 
    box-sizing: border-box; 
    white-space: nowrap;      
    overflow: hidden;
    text-overflow: ellipsis; 
}

#adminRestaurantsTableBody tbody tr { transition: background-color 0.2s ease; }
#adminRestaurantsTableBody tbody tr:hover { background-color: rgba(255, 255, 255, 0.05); }

#adminRestaurantsTableHeader th { 
    position: relative; 
    user-select: none; 
    color: #dedede; 
    font-weight: 600; 
    font-size: 13px;
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    text-align: center;
    padding: 18px 15px; 
}

.status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-width: 1px;
    border-style: solid;
}

.status-pill.active    { background: rgba(16, 185, 129, 0.15); color: #10b981; border-color: rgba(16, 185, 129, 0.3); }
.status-pill.demo      { background: rgba(59, 130, 246, 0.15); color: #3b82f6; border-color: rgba(59, 130, 246, 0.3); }
.status-pill.expired   { background: rgba(239, 68, 68, 0.15); color: #ef4444; border-color: rgba(239, 68, 68, 0.3); }
.status-pill.suspended { background: rgba(0, 0, 0, 0.6); color: #ffffff; border-color: rgba(255, 255, 255, 0.2); }
.status-pill.support   { background: rgba(249, 115, 22, 0.15); color: #f97316; border-color: rgba(249, 115, 22, 0.3); }

/* ========================================== */
/* SLIDER CSS */
/* ========================================== */
.status-slider-container {
    position: relative;
    display: inline-flex;
    background-color: #343434df;
    border: 1px solid #555;
    border-radius: 30px;
    padding: 4px;
    margin: 0 auto 25px auto;
    box-sizing: border-box;
    overflow: hidden;
}

.slider-pill {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    border-radius: 26px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.3s ease, border-color 0.3s ease;
    z-index: 1;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.slider-pill.bg-all       { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }
.slider-pill.bg-demo      { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.3); }
.slider-pill.bg-active    { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.3); }
.slider-pill.bg-suspended { background: rgba(0, 0, 0, 0.6);       border-color: rgba(255, 255, 255, 0.2); }
.slider-pill.bg-expired   { background: rgba(239, 68, 68, 0.15);  border-color: rgba(239, 68, 68, 0.3); }
.slider-pill.bg-support   { background: rgba(249, 115, 22, 0.15); border-color: rgba(249, 115, 22, 0.3); } 

.slider-pill.bg-contacted   { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.3); }
.slider-pill.bg-uncontacted { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.3); }
.slider-pill.bg-stale       { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.3); }

.slider-pill.bg-restaurant { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }
.slider-pill.bg-company    { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }

.slider-tab {
    position: relative;
    z-index: 2;
    background: transparent;
    border: none;
    color: #888;
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: color 0.3s ease;
    outline: none;
}

.slider-tab.active-slider-tab[data-status="all"]       { color: #ffffff; }
.slider-tab.active-slider-tab[data-status="prospect"]  { color: #a855f7; }
.slider-tab.active-slider-tab[data-status="demo"]      { color: #3b82f6; }
.slider-tab.active-slider-tab[data-status="active"]    { color: #10b981; }
.slider-tab.active-slider-tab[data-status="suspended"] { color: #ffffff; }
.slider-tab.active-slider-tab[data-status="expired"]   { color: #ef4444; }
.slider-tab.active-slider-tab[data-status="support"]   { color: #f97316; } 

.slider-tab.active-slider-tab[data-contact="all"]         { color: #ffffff; }
.slider-tab.active-slider-tab[data-contact="contacted"]   { color: #10b981; }
.slider-tab.active-slider-tab[data-contact="uncontacted"] { color: #ef4444; }
.slider-tab.active-slider-tab[data-contact="stale"]       { color: #f59e0b; }

.slider-tab.active-slider-tab[data-view="restaurant"] { color: #ffffff; }
.slider-tab.active-slider-tab[data-view="company"]    { color: #ffffff; }

.status-pill.prospect    { background: rgba(168, 85, 247, 0.15); color: #a855f7; border-color: rgba(168, 85, 247, 0.3); }
.slider-pill.bg-prospect { background: rgba(168, 85, 247, 0.15); border-color: rgba(168, 85, 247, 0.3); }

/* Base UI elements */
.sort-icon {
    position: absolute;
    display: inline-block; 
    width: 12px; 
    height: 12px; 
    margin-left: 6px;
    top: 50%;
    margin-top: -6px;
    opacity: 0; 
    transition: transform 0.2s ease, opacity 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain; 
    background-repeat: no-repeat; 
    background-position: center;
}

.sortable.active .sort-icon { opacity: 1; }
.sortable.active.desc .sort-icon { transform: rotate(180deg); }

.search-filter-container {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box; 
    padding: 0 10px;
}

.modern-input { flex: 1 1 auto; min-width: 180px; max-width: 250px; box-sizing: border-box; }


/* --- UPDATED SEARCH CLASSES --- */
.search-input-wrapper {
    position: relative; 
    flex: 1 1 auto; 
    min-width: 180px; 
    max-width: 250px;
}

.modern-input { 
    width: 100%; 
    box-sizing: border-box; 
}

.search-clear-btn {
    position: absolute; 
    right: 12px; 
    top: 50%; 
    transform: translateY(-50%); 
    background: transparent; 
    border: none; 
    color: #888; 
    cursor: pointer; 
    padding: 4px; 
    display: none; /* Hidden by default when input is empty */
    align-items: center; 
    justify-content: center;
    transition: color 0.2s ease; 
    outline: none;
}

.search-clear-btn:hover { 
    color: #fff; 
}



/* ========================================== */
/* CUSTOM LOCATION DROPDOWN CSS               */
/* ========================================== */

/* Fix Stacking Context */
#filters-section { z-index: 110 !important; }

.custom-loc-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Darkened the background and removed the blur */
    background: rgba(0, 0, 0, 0.65); 
    z-index: 105; /* Covers the search bar & table, but sits below the location wrapper (106) */
    display: none;
}

.location-dropdown-wrapper {
    position: relative; 
    flex: 0 1 auto; 
    z-index: 106; /* Elevated above the overlay */
}

.custom-loc-trigger {
    background-color: #343434df;
    border: 1px solid #555;
    border-radius: 30px;
    color: #fff;
    padding: 10px 20px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-width: 160px; 
    max-width: 220px;
    box-sizing: border-box;
    outline: none;
    transition: all 0.2s;
}
.custom-loc-trigger:focus, .custom-loc-trigger.open { background-color: #060606 !important; border-color: #3b82f6 !important; }

.custom-loc-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background-color: rgba(42, 42, 42, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    width: 260px;
    display: none;
    flex-direction: column;
    padding: 8px 0;
    /* Fixed messy alignment */
    text-align: left; 
}

.custom-loc-dropdown::-webkit-scrollbar { width: 6px; }
.custom-loc-dropdown::-webkit-scrollbar-track { background: transparent; }
.custom-loc-dropdown::-webkit-scrollbar-thumb { background: #555; border-radius: 6px; }
.custom-loc-dropdown::-webkit-scrollbar-thumb:hover { background: #777; }

.custom-loc-group {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 16px 6px;
    text-align: left; /* Fixed messy alignment */
}

.custom-loc-item {
    padding: 10px 16px;
    color: #dedede;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Fixed messy alignment */
    gap: 10px;
    text-align: left; /* Fixed messy alignment */
}
.custom-loc-item:hover { background: rgba(255,255,255,0.07); }
.custom-loc-item.selected { color: #3b82f6; font-weight: 600; background: rgba(59,130,246,0.1); }

.admin-table-header-wrapper::-webkit-scrollbar { display: none; }
.admin-table-header-wrapper { -ms-overflow-style: none; scrollbar-width: none; }








/* Custom Checkboxes for Venue Facilities */
.custom-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #dedede;
    font-size: 13px;
    font-weight: 500;
    user-select: none;
}

.custom-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox-box {
    width: 16px;
    height: 16px;
    background: rgba(0, 0, 0, 0.3); /* Darker unchecked background */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Subtler border */
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.custom-checkbox-label:hover .custom-checkbox-box {
    border-color: rgba(255, 255, 255, 0.3);
}

.custom-checkbox-input:checked ~ .custom-checkbox-box {
    /* background: #2563eb;
    border-color: #2563eb; */
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);

    /* #3b82f6 */
    background: #3b82f6; 
    border-color: #3b83f6a0;
}

.custom-checkbox-box svg {
    opacity: 0;
    width: 11px; /* Slightly scaled down to fit the thicker stroke */
    height: 11px;
    stroke: #fff;
    stroke-width: 4.5; /* Thicker check mark */
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: opacity 0.2s ease;
    margin-top: 1px;
}

.custom-checkbox-input:checked ~ .custom-checkbox-box svg {
    opacity: 1;
}










/* The actual Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px; /* Smaller width */
    height: 24px; /* Smaller height */
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1); /* Subtle dark mode off state */
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: .3s;
    border-radius: 24px;
    box-sizing: border-box;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #9ca3af; /* Greyish off-state handle */
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

input:checked + .slider {
    background-color: #3b82f6; /* Apple/Modern Blue */
    border-color: #3b82f6;
}

input:checked + .slider:before {
    transform: translateX(20px);
    background-color: #ffffff; /* Strong white handle */
}