/**
 * Vehicle Search Component - v2.3.1
 * Card layout - consistent mint tow anchor, clean buttons
 */

:root {
    --vs-primary: #0e4552;
    --vs-secondary: #2d7a7a;
    --vs-accent: #3ecf8e;
    --vs-light: #f8fafb;
    --vs-border: #e2e8f0;
    --vs-text: #1a202c;
    --vs-text-muted: #64748b;
    --vs-towing-green: #22c55e;
}

/* Main Layout */
.vehicle-search-v2 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.vs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Mobile Controls - Hidden on desktop */
.vs-mobile-controls {
    display: none;
}

@media (max-width: 991px) {
    .vs-layout {
        grid-template-columns: 1fr;
    }
    
    /* CRITICAL: Allow overflow on all parent containers */
    .vehicle-search-v2,
    .vs-layout,
    .vs-main {
        overflow-x: visible !important;
        overflow-y: visible !important;
    }
    
    /* Hide sidebar on mobile by default */
    .vs-sidebar {
        display: none;
    }
    
    /* Show mobile controls (Option B: Two Rows) */
    .vs-mobile-controls {
        display: block;
        margin-bottom: 0.75rem;
        background: white;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }
    
    .vs-mobile-top-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--vs-border);
    }
    
    .vs-mobile-count {
        font-size: 0.95rem;
        color: var(--vs-text);
    }
    
    .vs-mobile-count strong {
        color: var(--vs-accent);
        font-weight: 700;
    }
    
    .vs-btn-open-filters {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        font-weight: 600;
        background: var(--vs-primary);
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }
    
    .vs-btn-open-filters:active {
        transform: scale(0.98);
    }
    
    .vs-btn-open-filters .filter-badge {
        background: var(--vs-accent);
        color: white;
        font-size: 0.7rem;
        padding: 0.125rem 0.375rem;
        border-radius: 10px;
        font-weight: 700;
    }
    
    .vs-mobile-sort-row {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        background: #f8fafc;
    }
    
    .vs-mobile-sort-row label {
        font-size: 0.8rem;
        color: var(--vs-text-muted);
        flex-shrink: 0;
    }
    
    .vs-mobile-sort-row select {
        flex: 1;
        padding: 0.5rem 0.625rem;
        font-size: 0.85rem;
        border: 1px solid var(--vs-border);
        border-radius: 6px;
        background: white;
    }
}

/* Sidebar */
.vs-sidebar {
    position: sticky;
    top: 1rem;
}

.vs-sidebar .vs-filter-form {
    background: var(--vs-primary);
    border-radius: 12px;
    padding: 1.25rem;
    color: white;
}

.vs-filter-modal-overlay {
    display: none;
}

.vs-close-modal {
    display: none;
}

.vs-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.vs-sidebar-header h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vs-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* =========================================
   Mobile Filter Modal
   ========================================= */
@media (max-width: 991px) {
    .vs-sidebar.modal-open {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        background: transparent;
    }
    
    .vs-sidebar.modal-open .vs-filter-modal-overlay {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
    }
    
    .vs-sidebar.modal-open .vs-filter-form {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
        overflow-y: auto;
        padding: 1rem;
        padding-bottom: 100px; /* space for fixed button */
        animation: slideUp 0.25s ease;
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .vs-sidebar.modal-open .vs-close-modal {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: rgba(255,255,255,0.1);
        border: none;
        border-radius: 50%;
        color: white;
        font-size: 1.1rem;
        cursor: pointer;
    }
    
    .vs-sidebar.modal-open .vs-filter-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 1rem;
        background: var(--vs-primary);
        border-top: 1px solid rgba(255,255,255,0.1);
        margin: 0;
        z-index: 10000;
    }
    
    /* Prevent body scroll when modal open */
    body.filter-modal-active {
        overflow: hidden;
    }
}

.vs-reset-link {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.vs-reset-link:hover {
    color: white;
}

/* Filter Groups */
.vs-filter-group {
    margin-bottom: 1rem;
}

.vs-filter-group select,
.vs-filter-group input[type="number"],
.vs-filter-group input[type="text"] {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.9rem;
}

.vs-filter-group select option {
    background: var(--vs-primary);
    color: white;
}

.vs-filter-group select:focus,
.vs-filter-group input:focus {
    outline: none;
    border-color: var(--vs-accent);
    background: rgba(255,255,255,0.15);
}

.vs-filter-group input::placeholder {
    color: rgba(255,255,255,0.5);
}

.vs-filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
}

.vs-filter-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin: 1rem 0;
}

/* Range Inputs */
.vs-range-inputs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.vs-range-inputs input {
    width: 45%;
}

.vs-range-sep {
    color: rgba(255,255,255,0.5);
}

.vs-range-hint {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin-top: 0.375rem;
}

/* Toggle Buttons */
.vs-toggle-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.vs-toggle-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    transition: all 0.2s;
}

.vs-toggle-btn:hover,
.vs-toggle-btn.active {
    background: var(--vs-accent);
    border-color: var(--vs-accent);
    color: var(--vs-primary);
}

/* Feature Toggles */
.vs-feature-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.vs-feature-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    transition: all 0.2s;
}

.vs-feature-btn:hover {
    border-color: rgba(255,255,255,0.4);
}

.vs-feature-btn.active {
    background: var(--vs-accent);
    border-color: var(--vs-accent);
    color: var(--vs-primary);
}

/* Accordion Filters */
.vs-filter-accordion {
    margin-bottom: 0.75rem;
}

.vs-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    cursor: pointer;
    user-select: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.vs-accordion-icon {
    transition: transform 0.2s;
    font-size: 0.7rem;
}

.vs-filter-accordion.open .vs-accordion-icon {
    transform: rotate(180deg);
}

.vs-accordion-content {
    display: none;
    padding: 0.5rem 0;
    max-height: 200px;
    overflow-y: auto;
}

.vs-filter-accordion.open .vs-accordion-content {
    display: block;
}

/* Checkboxes */
.vs-checkbox {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.25rem;
    cursor: pointer;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: background-color 0.15s, opacity 0.15s;
}

.vs-checkbox:hover:not(.disabled) {
    background: rgba(255,255,255,0.08);
}

.vs-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--vs-accent);
    flex-shrink: 0;
}

.vs-checkbox-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vs-checkbox-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    min-width: 32px;
    text-align: right;
}

/* Disabled checkbox state */
.vs-checkbox.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.vs-checkbox.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.vs-checkbox.disabled .vs-checkbox-label {
    text-decoration: line-through;
}

/* Feature checkboxes (dually, turbo) */
.vs-checkbox-feature {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.vs-checkbox-feature:hover:not(.disabled) {
    background: rgba(255,255,255,0.15);
    border-color: var(--vs-accent);
}

.vs-checkbox-feature input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--vs-accent);
}

.vs-checkbox-feature input[type="checkbox"]:checked + .vs-feature-label {
    color: var(--vs-accent);
}

.vs-checkbox-feature.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.vs-feature-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.vs-feature-label i {
    font-size: 0.75rem;
}

.vs-feature-toggles {
    display: flex;
    flex-wrap: wrap;
}

/* Empty filter message */
.vs-filter-empty {
    padding: 0.75rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    text-align: center;
    font-style: italic;
}

.vs-clear-option {
    color: rgba(255,255,255,0.6);
    font-style: italic;
}

/* Apply Button */
.vs-filter-actions {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.vs-btn-apply {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--vs-accent) 0%, #2eb87a 100%);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(62, 207, 142, 0.3);
}

.vs-btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 207, 142, 0.4);
}

.vs-btn-apply:active {
    transform: translateY(0);
}

/* Apply button pulse when filters changed on mobile */
.vs-btn-pulse {
    animation: vs-pulse 1.5s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(62, 207, 142, 0.5);
}

@keyframes vs-pulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(62, 207, 142, 0.3); }
    50% { box-shadow: 0 4px 24px rgba(62, 207, 142, 0.6); }
}

/* Keyword Search Input */
.vs-keyword-group {
    margin-bottom: 1.25rem;
}

.vs-keyword-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.vs-keyword-icon {
    position: absolute;
    left: 0.875rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 1;
}

.vs-keyword-input,
.vs-sidebar .vs-keyword-input,
.vs-filter-form .vs-keyword-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 2.5rem;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    background: rgba(255,255,255,0.12) !important;
    color: white !important;
    font-size: 0.9rem;
    transition: border-color 0.2s, background 0.2s;
}

.vs-keyword-input:focus,
.vs-sidebar .vs-keyword-input:focus {
    outline: none;
    border-color: var(--vs-accent);
    background: rgba(255,255,255,0.18) !important;
}

.vs-keyword-input::placeholder {
    color: rgba(255,255,255,0.5) !important;
}

.vs-keyword-clear {
    position: absolute;
    right: 0.5rem;
    background: rgba(255,255,255,0.15);
    border: none;
    color: rgba(255,255,255,0.7);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.2s, color 0.2s;
    padding: 0;
}

.vs-keyword-clear:hover {
    background: rgba(255,255,255,0.25);
    color: white;
}


/* =========================================
   Page Header (H1 + Description)
   ========================================= */
.vs-page-header {
    margin-bottom: 0.75rem;
}
.vs-page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--vs-text);
    margin: 0 0 0.25rem;
    line-height: 1.3;
}
.vs-page-desc {
    font-size: 0.85rem;
    color: var(--vs-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* =========================================
   Results Bar (count + pills + sort)
   ========================================= */
.vs-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.vs-results-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}
.vs-results-count {
    font-size: 0.88rem;
    color: var(--vs-text);
    white-space: nowrap;
}
.vs-results-count strong { color: var(--vs-accent); font-weight: 700; }
.vs-bar-sep { color: var(--vs-border); font-size: 0.85rem; }
.vs-active-pills {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.vs-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    background: var(--vs-primary);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}
.vs-pill-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    font-size: 0.6rem;
    line-height: 1;
    transition: background 0.15s;
}
.vs-pill-x:hover { background: rgba(255,255,255,0.4); color: white; }
.vs-clear-link {
    font-size: 0.75rem;
    color: var(--vs-text-muted);
    text-decoration: none;
}
.vs-clear-link:hover { color: var(--vs-primary); }
.vs-results-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}
.vs-results-right label {
    font-size: 0.82rem;
    color: var(--vs-text-muted);
    margin: 0;
}
.vs-results-right select {
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--vs-border);
    border-radius: 6px;
    font-size: 0.82rem;
    background: white;
    color: var(--vs-text);
}

/* =========================================
   Desktop Card Layout (Towing Anchor)
   ========================================= */
.vs-card {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--vs-border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.15s;
}
.vs-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Towing anchor block (left) - matches RV Search GVWR style */
.vs-card-towing {
    width: 85px;
    min-width: 85px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.4rem;
    text-align: center;
}
.vs-card-tow-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--vs-primary);
    line-height: 1.1;
}
.vs-card-tow-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--vs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.15rem;
}

/* Card body (middle) */
.vs-card-body {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    gap: 1rem;
    min-width: 0;
}
.vs-card-info {
    flex: 1;
    min-width: 0;
}
.vs-card-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--vs-text);
    text-decoration: none;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vs-card-title:hover { color: var(--vs-primary); }
.vs-card-subtitle {
    font-size: 0.78rem;
    color: var(--vs-text-muted);
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge pills */
.vs-card-pills, .vs-mcard-pills {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}
.vs-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.4;
}
.vs-pill i { font-size: 0.6rem; }
.vs-pill.diesel { background: #ecfdf5; color: #059669; }
.vs-pill.hybrid { background: #f0fdf4; color: #16a34a; }
.vs-pill.electric { background: #eff6ff; color: #2563eb; }
.vs-pill.turbo { background: #faf5ff; color: #7c3aed; }
.vs-pill.dually { background: #fff7ed; color: #c2410c; }
.vs-pill.fourwd { background: #f0f9ff; color: #0284c7; }
.vs-pill.config { background: #f1f5f9; color: var(--vs-text-muted); }

/* Stats group (right side of body) */
.vs-card-stats {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}
.vs-card-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 55px;
    text-align: center;
}
.vs-stat-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--vs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.vs-stat-val {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--vs-text);
    line-height: 1.2;
}

/* Actions column (right edge) */
.vs-card-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.65rem;
}
.vs-card-btn {
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    border: 1.5px solid var(--vs-accent);
    background: white;
    color: var(--vs-accent);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-family: inherit;
}
.vs-card-btn:hover {
    background: var(--vs-accent);
    color: white;
}
.vs-card-btn.active {
    border-color: var(--vs-accent);
    color: white;
    background: var(--vs-primary);
    cursor: default;
}
.vs-card-btn.secondary {
    border-color: var(--vs-border);
    color: var(--vs-text-muted);
    font-size: 0.7rem;
}
.vs-card-btn.secondary:hover {
    border-color: var(--vs-primary);
    color: var(--vs-primary);
    background: #f0f9ff;
}
.vs-card-btn .action-icon { font-size: 0.72rem; }
.vs-card-btn .action-icon.success { color: var(--vs-accent); }
.vs-card-btn .action-icon.secondary { opacity: 0.7; }

/* =========================================
   Mobile Card
   ========================================= */
.vs-mcard { display: none; }

/* =========================================
   Pagination
   ========================================= */
.vs-pagination {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--vs-border);
}
.vs-pagination .pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}
.vs-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.4rem;
    border: 1px solid var(--vs-border);
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--vs-text);
    text-decoration: none;
    background: white;
}
.vs-pagination .page-link:hover { background: #f8fafc; }
.vs-pagination .active .page-link {
    background: var(--vs-primary);
    color: white;
    border-color: var(--vs-primary);
}
.vs-pagination .disabled .page-link {
    opacity: 0.4;
    pointer-events: none;
}

/* Empty / Welcome State */
.vs-empty-state, .vs-welcome-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--vs-text-muted);
}
.vs-empty-icon, .vs-welcome-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.4; }
.vs-empty-state h3, .vs-welcome-state h3 { font-size: 1.1rem; color: var(--vs-text); margin-bottom: 0.5rem; }
.vs-empty-state p, .vs-welcome-state p { font-size: 0.85rem; margin-bottom: 1rem; }
.vs-btn-primary {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--vs-primary);
    color: white;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
}
.vs-btn-primary:hover { background: #0a3c47; color: white; }

/* Toast */
.vs-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--vs-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    z-index: 10000;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.vs-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   RESPONSIVE - Mobile (≤991px)
   ========================================= */
@media (max-width: 991px) {
    /* Hide desktop-only */
    .vs-card { display: none !important; }
    .vs-results-bar { display: none !important; }

    /* Show mobile elements */
    .vs-mcard { display: block; }

    /* Page header mobile */
    .vs-page-header {
        padding: 0 0.75rem;
        margin-bottom: 0.5rem;
    }
    .vs-page-title { font-size: 1.15rem; }
    .vs-page-desc { font-size: 0.8rem; }

    /* Results container */
    .vs-results-container {
        padding: 0 0.75rem;
    }

    /* Mobile Card */
    .vs-mcard {
        background: #fff;
        border: 1px solid var(--vs-border);
        border-radius: 8px;
        margin-bottom: 0.5rem;
        overflow: hidden;
    }
    .vs-mcard-top {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        padding: 0.65rem 0.75rem;
        overflow: hidden;
    }
    .vs-mcard-info {
        min-width: 0;
        overflow: hidden;
    }
    .vs-mcard-title {
        display: block;
        font-size: 0.88rem;
        font-weight: 700;
        color: var(--vs-text);
        text-decoration: none;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .vs-mcard-title:hover { color: var(--vs-primary); }
    .vs-mcard-pills {
        display: flex;
        gap: 0.25rem;
        margin-top: 0.2rem;
        flex-wrap: wrap;
    }
    .vs-mcard-add {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        flex-shrink: 0;
        border: 1px solid var(--vs-border);
        border-radius: 6px;
        background: white;
        color: var(--vs-primary);
        text-decoration: none;
        font-size: 0.85rem;
        line-height: 1;
        box-sizing: border-box;
    }
    .vs-mcard-add .action-icon { display: flex; align-items: center; justify-content: center; }
    .vs-mcard-add .action-icon.success { color: var(--vs-accent); }
    .vs-mcard-add.active {
        background: var(--vs-primary);
        color: white;
        border-color: var(--vs-accent);
    }

    /* Mobile Stat Bar */
    .vs-mcard-stats {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        border-top: 1px solid var(--vs-border);
        background: #f8fafc;
    }
    .vs-mcard-stat {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.4rem 0.25rem;
        text-align: center;
    }
    .vs-mcard-stat + .vs-mcard-stat {
        border-left: 1px solid var(--vs-border);
    }
    .vs-mstat-label {
        font-size: 0.58rem;
        font-weight: 700;
        color: var(--vs-text-muted);
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }
    .vs-mstat-val {
        font-size: 0.82rem;
        font-weight: 700;
        color: var(--vs-text);
        line-height: 1.2;
    }
    .vs-mstat-val.vs-accent { color: var(--vs-accent); }

    /* Mobile pagination */
    .vs-pagination { padding: 0.75rem; }

    /* Mobile empty state */
    .vs-empty-state, .vs-welcome-state { padding: 2rem 0.75rem; }
}

/* =========================================
   Small Mobile (≤480px)
   ========================================= */
@media (max-width: 480px) {
    .vs-mcard-title { font-size: 0.82rem; }
    .vs-mstat-val { font-size: 0.78rem; }
    .vs-pill { font-size: 0.62rem; padding: 0.08rem 0.35rem; }
}
/* =========================================
   Inline Feature Toggles (Dually/Turbo)
   Clean minimal pill toggles
   ========================================= */ */
.vs-feature-toggles-inline {
    display: flex;
    gap: 0.375rem;
}

.vs-pill-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.625rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    transition: all 0.15s ease;
    user-select: none;
}

.vs-pill-toggle:hover:not(.disabled) {
    border-color: var(--vs-accent);
    color: rgba(255,255,255,0.9);
}

.vs-pill-toggle.active {
    background: var(--vs-accent);
    border-color: var(--vs-accent);
    color: var(--vs-primary);
    font-weight: 500;
}

.vs-pill-toggle.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.vs-pill-toggle input[type="checkbox"] {
    display: none;
}

.vs-pill-toggle .pill-count {
    font-size: 0.65rem;
    opacity: 0.6;
}

/* =========================================
   Dual Range Slider - Single Track, Two Thumbs
   ========================================= */
.vs-dual-slider {
    padding: 0.5rem 0;
}

.vs-slider-track {
    position: relative;
    height: 6px;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    margin: 1rem 0 0.5rem 0;
}

.vs-slider-range {
    position: absolute;
    height: 100%;
    background: var(--vs-accent);
    border-radius: 3px;
    pointer-events: none;
    top: 0;
}

/* Both range inputs stack on same track */
.vs-slider-thumb {
    position: absolute;
    width: 100%;
    height: 6px;
    top: 0;
    left: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
    padding: 0;
    touch-action: none;
}

/* Webkit thumb styling */
.vs-slider-thumb::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--vs-accent);
    cursor: grab;
    pointer-events: auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    margin-top: -11px;
    position: relative;
    z-index: 2;
    touch-action: none;
}

.vs-slider-thumb::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0,0,0,0.35);
}

.vs-slider-thumb::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

/* Firefox thumb styling */
.vs-slider-thumb::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--vs-accent);
    cursor: grab;
    pointer-events: auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    touch-action: none;
}

.vs-slider-thumb::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.vs-slider-thumb::-moz-range-track {
    background: transparent;
    border: none;
}

.vs-slider-thumb:focus {
    outline: none;
}

/* Value display below slider */
.vs-slider-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.85);
    font-variant-numeric: tabular-nums;
}

.vs-slider-values span:first-child,
.vs-slider-values span:last-child {
    min-width: 50px;
}

.vs-slider-values span:first-child {
    text-align: left;
}

.vs-slider-values span:last-child {
    text-align: right;
}

.vs-slider-sep {
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
}

