/**
 * Alvasco Pro - Slide-Up Mobile Filter Panel (Logomark Style)
 * Version: 5.4.0
 */

/* ========================================
   TRIGGER BUTTON (visible on mobile only)
   ======================================== */

.alvasco-filter-trigger {
    display: none; /* Hidden by default, shown on mobile */
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    
    background: #1a3a5c; /* Alvasco brand navy */
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    
    box-shadow: 0 4px 12px rgba(26, 58, 92, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    
    display: flex;
    align-items: center;
    gap: 8px;
}

.alvasco-filter-trigger:hover {
    background: #152f49;
    box-shadow: 0 6px 16px rgba(26, 58, 92, 0.4);
    transform: translateX(-50%) translateY(-2px);
}

.alvasco-filter-trigger:active {
    transform: translateX(-50%) translateY(0);
}

.alvasco-filter-trigger svg {
    width: 18px;
    height: 18px;
}

/* Show trigger on mobile */
@media (max-width: 768px) {
    .alvasco-search-slideup .alvasco-filter-trigger {
        display: flex;
    }
}

/* Hide ALL slideup elements on desktop */
@media (min-width: 1024px) {
    .alvasco-filter-trigger {
        display: none !important;
    }
    .alvasco-slideup-panel {
        display: none !important;
    }
    .alvasco-filter-backdrop {
        display: none !important;
    }
}


/* ========================================
   BACKDROP OVERLAY
   ======================================== */

.alvasco-filter-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1044;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.alvasco-filter-backdrop.show {
    display: block;
    opacity: 1;
}


/* ========================================
   SLIDE-UP PANEL
   ======================================== */

.alvasco-slideup-panel {
    position: fixed;
    top: 0; /* Changed from 60px - cover full screen */
    left: 0;
    right: 0;
    bottom: 0;
    
    background: #fff;
    z-index: 99999999; /* Higher than everything - site header, cart, modals */
    
    transform: translateY(100%); /* Hidden by default */
    transition: transform 0.35s ease-in-out;
    
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.alvasco-slideup-panel.open {
    transform: translateY(0); /* Slide up */
}

/* Hide shopping cart when panel is open */
body.alvasco-filter-open .xoo-wsc-basket {
    display: none !important;
}

/* Also hide any other high z-index overlays */
body.alvasco-filter-open .xoo-qv-modal,
body.alvasco-filter-open .xoo-wsc-modal {
    display: none !important;
}

/* Only show on mobile */
@media (min-width: 769px) {
    .alvasco-slideup-panel {
        display: none !important;
    }
}


/* ========================================
   HEADER
   ======================================== */

.alvasco-slideup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
    background: #fff;
}

.alvasco-slideup-title {
    font-size: 17px;
    font-weight: 600;
    color: #1a3a5c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alvasco-slideup-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s;
}

.alvasco-slideup-close:hover {
    background: #f8f9fa;
    color: #495057;
}

.alvasco-slideup-close:active {
    background: #e9ecef;
}


/* ========================================
   CONTENT (Left Nav + Right Options)
   ======================================== */

.alvasco-slideup-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #fff;
}


/* ========================================
   LEFT NAVIGATION
   ======================================== */

.alvasco-slideup-nav {
    width: 130px;
    flex-shrink: 0;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
}

.alvasco-slideup-nav li {
    padding: 12px 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    color: #6c757d;
    border-left: 3px solid transparent;
    transition: all 0.15s;
    user-select: none;
}

.alvasco-slideup-nav li:hover {
    background: #e9ecef;
    color: #495057;
}

.alvasco-slideup-nav li.active {
    border-left-color: #1a3a5c;
    background: #fff;
    color: #1a3a5c;
    font-weight: 600;
}


/* ========================================
   RIGHT OPTIONS AREA
   ======================================== */

.alvasco-slideup-options {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    background: #fff;
}

.alvasco-chip-group {
    display: none;
}

.alvasco-chip-group.active {
    display: block;
}


/* ========================================
   CHIP/TAG STYLES
   ======================================== */

.alvasco-chip {
    display: inline-block;
    margin: 0 6px 8px 0;
    cursor: pointer;
    user-select: none;
}

/* Hide chips with empty or zero-count */
.alvasco-chip:has(.filter-count:contains("(0)")) {
    display: none;
}

.alvasco-chip input {
    display: none; /* Hidden checkbox */
}

.alvasco-chip span {
    display: inline-block;
    padding: 6px 12px;
    border: 1.6px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    color: #495057;
    background: #fff;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.alvasco-chip:hover span {
    border-color: #1a3a5c;
    background: rgba(26, 58, 92, 0.02);
}

.alvasco-chip input:checked + span {
    border-color: #1a3a5c;
    background: rgba(26, 58, 92, 0.08);
    color: #1a3a5c;
    font-weight: 500;
}

.alvasco-chip .filter-count {
    opacity: 0.7;
    font-size: 13px;
}


/* ========================================
   FOOTER (Sticky)
   ======================================== */

.alvasco-slideup-footer {
    display: flex;
    padding: 12px 16px;
    border-top: 1px solid #dee2e6;
    flex-shrink: 0;
    gap: 12px;
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.alvasco-slideup-show {
    flex: 1;
    background: #1a3a5c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.alvasco-slideup-show:hover {
    background: #152f49;
}

.alvasco-slideup-show:active {
    transform: scale(0.98);
}

.alvasco-slideup-show .result-count {
    font-weight: 700;
}

.alvasco-slideup-clear {
    flex: 0;
    background: none;
    border: none;
    color: #dc3545;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.15s;
}

.alvasco-slideup-clear:hover {
    background: rgba(220, 53, 69, 0.08);
    color: #c82333;
}

.alvasco-slideup-clear:active {
    background: rgba(220, 53, 69, 0.12);
}


/* ========================================
   RESPONSIVE TWEAKS
   ======================================== */

@media (max-width: 360px) {
    .alvasco-slideup-nav {
        width: 110px;
    }
    
    .alvasco-slideup-nav li {
        font-size: 10px;
        padding: 10px 8px;
    }
    
    .alvasco-chip span {
        font-size: 13px;
        padding: 5px 10px;
    }
}


/* ========================================
   SUBCATEGORY CHIPS (Hidden by default)
   ======================================== */

.alvasco-chip.subcategory-chip {
    display: none; /* Hidden until parent selected */
}

.alvasco-chip.subcategory-chip.visible {
    display: inline-block;
}


/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
