/**
 * Unique Beds Filter - Mobile Styles (Checkbox Version)
 * 
 * Styles for mobile sidebar filter with custom checkbox dropdowns
 */

/* Mobile Sidebar */
.ubf-mobile-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 320px;
    max-width: 90%;
    background: #fff;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.ubf-mobile-sidebar.ubf-sidebar-left {
    left: 0;
    transform: translateX(-100%);
}

.ubf-mobile-sidebar.ubf-sidebar-right {
    right: 0;
    left: auto;
    transform: translateX(100%);
}

.ubf-mobile-sidebar.active {
    transform: translateX(0);
}

/* Sidebar Header */
.ubf-mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f8f8;
}

.ubf-mobile-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.ubf-mobile-sidebar-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.ubf-mobile-sidebar-close:hover {
    color: #000;
}

/* Sidebar Content */
.ubf-mobile-sidebar-content {
    padding: 20px;
}

.ubf-mobile-filter-group {
    margin-bottom: 25px;
}

.ubf-mobile-filter-group:last-child {
    margin-bottom: 0;
}

/* Mobile Price Label - Show on mobile */
.ubf-mobile-sidebar .ubf-price-label {
    display: block !important;
    font-weight: 600;
    font-size: 15px;
    color: #333;
    margin-bottom: 10px;
}

/* Mobile Custom Dropdown Adjustments */
.ubf-mobile-sidebar .ubf-custom-dropdown {
    width: 100%;
}

.ubf-mobile-sidebar .ubf-dropdown-toggle {
    padding: 12px 15px;
    font-size: 15px;
}

.ubf-mobile-sidebar .ubf-dropdown-panel {
    position: relative;
    margin-top: 10px;
    box-shadow: none;
    border: 1px solid #ddd;
}

.ubf-mobile-sidebar .ubf-checkbox-option {
    padding: 12px 15px;
}

.ubf-mobile-sidebar .ubf-checkbox-label {
    font-size: 15px;
}

.ubf-mobile-sidebar .ubf-dropdown-options {
    max-height: 250px;
}

/* Mobile Overlay */
.ubf-mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ubf-mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Loading States */
.ubf-mobile-sidebar .ubf-filter-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.ubf-mobile-sidebar .ubf-loading-spinner {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
}

.ubf-mobile-sidebar .ubf-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #333;
    border-radius: 50%;
    animation: ubf-spin 0.6s linear infinite;
}

.ubf-mobile-sidebar .ubf-button-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Scrollbar Styling for Sidebar */
.ubf-mobile-sidebar::-webkit-scrollbar {
    width: 8px;
}

.ubf-mobile-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.ubf-mobile-sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.ubf-mobile-sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Prevent Body Scroll when Sidebar Open */
body.ubf-sidebar-open {
    overflow: hidden;
}

/* Animation for Right Sidebar */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Desktop Override - Hide Mobile Elements */
@media (min-width: 769px) {
    .ubf-mobile-sidebar,
    .ubf-mobile-sidebar-overlay {
        display: none !important;
    }
}

/* Tablet Adjustments */
@media (max-width: 768px) and (min-width: 481px) {
    .ubf-mobile-sidebar {
        width: 350px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .ubf-mobile-sidebar {
        width: 100%;
        max-width: 100%;
    }
    
    .ubf-mobile-sidebar-header {
        padding: 15px;
    }
    
    .ubf-mobile-sidebar-content {
        padding: 15px;
    }
    
    .ubf-mobile-filter-group {
        margin-bottom: 20px;
    }
}
