/**
 * Gnarly Booking Engine - Copyright (c) 2025 Brand Wars LLC
 * Licensed under proprietary license. See LICENSE.txt for details.
 */

/* Radio options for sorting */
.hostapi-sort-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.hostapi-radio-option {
    display: flex;
    align-items: center;
}

.hostapi-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #343a40;
}

.hostapi-radio {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.hostapi-listings-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Style for the filter button */
#hostapi-listings-header #hostapi-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    height: 64px;
}

#hostapi-listings-header .hostapi-filter-button:hover {
    background-color: #f8f9fa;
}

.hostapi-filter-button i {
    font-size: 14px;
    margin-right: 6px;
}

.hostapi-sort-dropdown, .hostapi-filter-button {
    display: inline-block;
    vertical-align: middle;
}

/* Filter Dialog */
.hostapi-filter-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* Modal Content */
.hostapi-filter-dialog-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    animation: hostModalFadeIn 0.3s;
}

@keyframes hostModalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal Header */
.hostapi-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
}

.hostapi-filter-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #212529;
}

.hostapi-filter-close {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    margin: 0;
    line-height: 1;
}

/* Modal Body */
.hostapi-filter-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 130px);
}

/* Filter Sections */
.hostapi-filter-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e9ecef;
}

.hostapi-filter-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.hostapi-filter-section h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

.hostapi-filter-section h4 {
    margin: 16px 0 12px 0;
    font-size: 16px;
    font-weight: 500;
    color: #343a40;
}

/* Footer */
.hostapi-filter-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid #e9ecef;
}

.hostapi-modal-open {
    overflow: hidden;
}

/* Price Slider */
.hostapi-price-slider-container {
    padding: 10px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.hostapi-price-slider {
    margin-bottom: 20px;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.hostapi-price-inputs {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.hostapi-price-input {
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

.hostapi-price-input label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #6c757d;
}

.hostapi-price-input input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Option Buttons (Bedrooms, Beds, Bathrooms) */
.hostapi-filter-options {
    margin-bottom: 16px;
}

.hostapi-option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hostapi-option-button {
    padding: 8px 16px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: black;
}

.hostapi-option-button:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

.hostapi-option-button.active {
    background-color: #212529;
    color: white;
    border-color: #212529;
}

/* Checkbox Grid (Cities, Amenities) */
.hostapi-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.hostapi-checkbox-item {
    display: flex;
    align-items: center;
}

.hostapi-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #343a40;
}

.hostapi-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

/* Button Styles */
.hostapi-reset-button {
    padding: 8px 16px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #343a40;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hostapi-reset-button:hover {
    background-color: #f8f9fa;
}

.hostapi-apply-button {
    padding: 8px 20px;
    background-color: #0d6efd;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hostapi-apply-button:hover {
    background-color: #0b5ed7;
}

/* NoUiSlider custom styles */
.noUi-connect {
    background-color: #0d6efd;
}

.noUi-handle {
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    cursor: grab;
    width: 20px !important;
    height: 20px !important;
    right: -10px !important;
}

.noUi-handle:after, 
.noUi-handle:before {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 575px) {
    .hostapi-checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .hostapi-price-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .hostapi-option-buttons {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 5px;
    }
}

/* Add these media queries at the end of your CSS file */

/* Mobile Styles */
@media (max-width: 767px) {
    .hostapi-filter-dialog-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .hostapi-filter-body {
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .hostapi-option-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .hostapi-option-button {
        padding: 8px 0;
        font-size: 13px;
    }
    
    .hostapi-checkbox-grid {
        display: flex;
        flex-wrap: wrap;
    }
    
    .hostapi-checkbox-item {
        width: 100%;
        margin-bottom: 8px;
    }
    
    /* Make filter button full width and increase height */
      .hostapi-filter-button {
        width: 100%;
        height: 50px; /* Increased from 40px */
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 15px;
      }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 991px) {
    .hostapi-filter-dialog-content {
        width: 90%;
        max-width: 700px;
    }
}

/* Fix for filter button on smaller screens */
@media (max-width: 575px) {
    .hostapi-listings-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hostapi-sort-dropdown {
        margin-top: 10px;
        margin-right: 0;
    }
    
    .hostapi-filter-button {
        margin-bottom: 10px;
    }
}


