/* ============================================
   SIDEBAR LAYOUT - Clean Modern Design
   Based on Alvas.co aesthetic
   ============================================ */

.alvasco-search-sidebar {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 0;
}

.alvasco-search-sidebar .alvasco-search-form {
    display: flex;
    flex-direction: column;
}

/* ============================================
   COLLAPSIBLE SECTIONS
   ============================================ */

.alvasco-sidebar-section {
    border-bottom: 1px solid #f0f0f0;
}

.alvasco-sidebar-section:last-of-type {
    border-bottom: none;
}

/* Section Title (Clickable) */
.sidebar-section-title {
    margin: 0;
    padding: 18px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.sidebar-section-title:hover {
    background: #f9f9f9;
}

/* Toggle Icon */
.sidebar-section-title .toggle-icon {
    font-size: 12px;
    color: #999999;
    transition: transform 0.3s ease;
}

/* Collapsed State */
.alvasco-sidebar-section.collapsed .sidebar-section-content {
    display: none;
}

.alvasco-sidebar-section.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

/* Section Content */
.sidebar-section-content {
    padding: 0 24px 20px 24px;
}

/* Radio Button Filter Options */
.sidebar-filter-option {
    display: flex;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.sidebar-filter-option:hover {
    background: #f9f9f9;
    margin: 0 -10px;
    padding: 10px 10px;
    border-radius: 4px;
}

.sidebar-filter-option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ff6b35;
    /* Square checkbox style */
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid #d0d0d0;
    border-radius: 2px;
    position: relative;
    background: #ffffff;
    transition: all 0.2s ease;
}

.sidebar-filter-option input[type="radio"]:checked {
    background: #ff6b35;
    border-color: #ff6b35;
}

.sidebar-filter-option input[type="radio"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
}

.sidebar-filter-option input[type="radio"]:hover {
    border-color: #ff6b35;
}

.sidebar-filter-option span {
    font-size: 14px;
    color: #333333;
}

.sidebar-section-content select,
.sidebar-section-content input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 15px;
    color: #333333;
    background: #ffffff;
    transition: all 0.2s ease;
}

.sidebar-section-content select:focus,
.sidebar-section-content input[type="text"]:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Submit Button */
.alvasco-sidebar-submit {
    padding: 24px;
    border-top: 1px solid #f0f0f0;
}

.alvasco-sidebar-submit button {
    width: 100%;
    padding: 14px 20px;
    background: #ff6b35;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alvasco-sidebar-submit button:hover {
    background: #e6522a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

/* ============================================
   NON-COLLAPSIBLE SIDEBAR (Original)
   ============================================ */

/* Hide the row wrappers in sidebar mode */
.alvasco-search-sidebar .alvasco-search-row {
    display: contents;
}

/* Each filter field is a full-width section */
.alvasco-search-sidebar .alvasco-search-field {
    width: 100%;
    margin: 0;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.alvasco-search-sidebar .alvasco-search-field:last-of-type {
    border-bottom: none;
}

/* Labels */
.alvasco-search-sidebar .alvasco-search-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 10px;
    text-transform: none;
}

/* Inputs and Selects */
.alvasco-search-sidebar .alvasco-search-field input[type="text"],
.alvasco-search-sidebar .alvasco-search-field select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 15px;
    color: #333333;
    background: #ffffff;
    transition: all 0.2s ease;
}

.alvasco-search-sidebar .alvasco-search-field input[type="text"]:focus,
.alvasco-search-sidebar .alvasco-search-field select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Search Button */
.alvasco-search-sidebar .alvasco-search-submit {
    padding: 24px;
    border-top: 1px solid #f0f0f0;
    margin: 0;
}

.alvasco-search-sidebar button[type="submit"] {
    width: 100%;
    padding: 14px 20px;
    background: #ff6b35;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alvasco-search-sidebar button[type="submit"]:hover {
    background: #e6522a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

/* Active Filters Indicator */
.alvasco-search-sidebar .alvasco-search-field.has-value label::after {
    content: '●';
    color: #ff6b35;
    margin-left: 8px;
    font-size: 12px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .alvasco-search-sidebar {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .alvasco-search-sidebar .alvasco-search-field,
    .alvasco-sidebar-section {
        padding: 16px 20px;
    }
    
    .sidebar-section-title {
        padding: 16px 20px;
    }
    
    .sidebar-section-content {
        padding: 0 20px 16px 20px;
    }
    
    .alvasco-search-sidebar .alvasco-search-submit,
    .alvasco-sidebar-submit {
        padding: 20px;
    }
}

/* Clean scrollbar for sidebar */
.alvasco-search-sidebar::-webkit-scrollbar {
    width: 6px;
}

.alvasco-search-sidebar::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.alvasco-search-sidebar::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.alvasco-search-sidebar::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}
