/**
 * Property Archive Styles
 * 
 * @package Hostaway
 */

/* Archive Container */
.hostaway-archive-container {
    color: var(--hostaway-text-color);
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Archive Header — single source (also used by active-filters.php) */
.archive-header {
    text-align: center;
}

.post-type-archive-property .hostaway-archive-container .archive-header {
    margin-bottom: 0;
}

.archive-title {
    font-size: 2.5rem;
    color: var(--hostaway-heading-color);
    margin: 0 0 15px;
    font-weight: 700;
}

.archive-description {
    font-size: 1.125rem;
    color: var(--hostaway-color-text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Archive Layout */
.archive-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 1024px) {
    .archive-layout {
        grid-template-columns: 1fr;
    }
    
    .archive-sidebar {
        order: -1;
    }
}

/* Top Filters */
.archive-top-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--hostaway-shadow);
}

.results-count {
    font-size: 1rem;
    font-weight: 600;
    color: var(--hostaway-heading-color);
}

.view-toggle {
    display: flex;
    gap: 8px;
}

.view-btn {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--hostaway-border-color);
    border-radius: 6px;
    cursor: pointer;
    color: var(--hostaway-color-text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    background: var(--hostaway-bg-light);
    border-color: var(--hostaway-primary-color);
    color: var(--hostaway-primary-color);
}

.view-btn.active {
    background: var(--hostaway-primary-color);
    border-color: var(--hostaway-primary-color);
    color: white;
}

/* Loading Spinner */
.hostaway-loading {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    margin: 30px 0;
}

.spinner {
    border: 4px solid var(--hostaway-border-color);
    border-top-color: var(--hostaway-primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hostaway-loading p {
    color: var(--hostaway-color-text-muted);
    font-size: 1rem;
    margin: 0;
}

/* Sidebar */
.archive-sidebar {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--hostaway-shadow);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.archive-sidebar::-webkit-scrollbar {
    width: 6px;
}

.archive-sidebar::-webkit-scrollbar-track {
    background: var(--hostaway-bg-light);
    border-radius: 3px;
}

.archive-sidebar::-webkit-scrollbar-thumb {
    background: var(--hostaway-border-color);
    border-radius: 3px;
}

.archive-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--hostaway-color-text-subtle);
}

.sidebar-widget {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--hostaway-border-color);
}

.sidebar-widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--hostaway-heading-color);
    margin: 0 0 20px;
}

/* Active Filters */
.active-filters-widget {
    background: var(--hostaway-bg-light);
    border-radius: 8px;
    padding: 20px !important;
    border: 1px solid var(--hostaway-border-color);
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--hostaway-text-color);
    border: 1px solid var(--hostaway-border-color);
}

.remove-filter {
    background: transparent;
    border: none;
    color: var(--hostaway-color-danger);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.remove-filter:hover {
    background: var(--hostaway-color-primary-soft);
}

.clear-all-btn {
    width: 100%;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--hostaway-border-color);
    border-radius: 6px;
    color: var(--hostaway-text-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-all-btn:hover {
    background: var(--hostaway-bg-light);
    border-color: var(--hostaway-primary-color);
    color: var(--hostaway-primary-color);
}

/* Search Form */
.search-input-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 1px solid var(--hostaway-border-color);
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--hostaway-primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--hostaway-primary-color);
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.search-btn:hover {
    background: var(--hostaway-secondary-color);
}

/* Filter Inputs */
.price-range-filter {
    display: grid;
    gap: 15px;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--hostaway-color-text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--hostaway-border-color);
    border-radius: 6px;
    font-size: 0.9375rem;
    transition: all 0.3s;
    background: white;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--hostaway-primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Button Group Filter */
.button-group-filter {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.filter-btn {
    padding: 10px 12px;
    background: white;
    border: 1px solid var(--hostaway-border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--hostaway-text-color);
    transition: all 0.3s;
    text-align: center;
}

.filter-btn:hover {
    border-color: var(--hostaway-primary-color);
    color: var(--hostaway-primary-color);
}

.filter-btn.active {
    background: var(--hostaway-primary-color);
    border-color: var(--hostaway-primary-color);
    color: white;
}

/* Checkbox List */
.checkbox-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checkbox-list li {
    margin-bottom: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--hostaway-text-color);
    transition: color 0.2s;
}

.checkbox-label:hover {
    color: var(--hostaway-primary-color);
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--hostaway-primary-color);
}

.checkbox-text {
    flex: 1;
}

.checkbox-text .count {
    color: var(--hostaway-color-text-subtle);
    font-size: 0.875rem;
}

.no-terms {
    color: var(--hostaway-color-text-subtle);
    font-size: 0.875rem;
    margin: 0;
    font-style: italic;
}

/* Listing cards: see propertieshot.css (hostaway-properties-hot) */

/* Buttons — archive overrides only (base in foundation) */
.hostaway-archive .bizdex-hostaway-btn.btn-primary:hover,
.hostaway-archive .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--hostaway-primary-color) 30%, transparent);
}

.hostaway-archive .bizdex-hostaway-btn.btn-secondary,
.hostaway-archive .btn-secondary {
    background: var(--hostaway-color-surface, var(--hostaway-color-surface));
    color: var(--hostaway-color-text, var(--hostaway-color-text));
    border: 1px solid var(--hostaway-color-border, var(--hostaway-color-border));
}

.hostaway-archive .bizdex-hostaway-btn.btn-secondary:hover,
.hostaway-archive .btn-secondary:hover {
    background: var(--hostaway-color-surface-muted, var(--hostaway-color-surface-muted));
    border-color: var(--hostaway-primary-color);
    color: var(--hostaway-primary-color);
}

/* Pagination */
.archive-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.archive-pagination a,
.archive-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--hostaway-border-color);
    border-radius: 6px;
    color: var(--hostaway-text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.archive-pagination a:hover {
    background: var(--hostaway-primary-color);
    border-color: var(--hostaway-primary-color);
    color: white;
}

.archive-pagination .current {
    background: var(--hostaway-primary-color);
    border-color: var(--hostaway-primary-color);
    color: white;
}

.archive-pagination .dots {
    border: none;
    pointer-events: none;
}

/* No Properties Found */
.no-properties-found {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
}

.no-results-icon {
    margin: 0 auto 20px;
    color: var(--hostaway-color-border-strong);
}

.no-properties-found h2 {
    font-size: 1.75rem;
    color: var(--hostaway-heading-color);
    margin: 0 0 10px;
}

.no-properties-found p {
    color: var(--hostaway-color-text-muted);
    font-size: 1.0625rem;
    margin: 0 0 25px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hostaway-archive-container {
        padding: 20px 15px;
    }
    
    .archive-title {
        font-size: 2rem;
    }
    
    .archive-top-filters {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .view-toggle {
        justify-content: center;
    }
    
    .archive-sidebar {
        padding: 20px;
    }
    
    .widget-title {
        font-size: 1rem;
    }
    
    .sidebar-widget {
        margin-bottom: 25px;
        padding-bottom: 25px;
    }
    
    .button-group-filter {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .button-group-filter {
        grid-template-columns: repeat(2, 1fr);
    }
}