/**
 * Frontend Styles - Orange Search Bar Design
 * Houzez Advanced Search Pro - Fixed Version
 * Author: Muhammad Shoaib
 * Version: 1.0.1
 */

/* ========================================
   MAIN CONTAINER - ORANGE BACKGROUND WRAPPER
======================================== */
.hasp-search-wrapper {
    background: linear-gradient(135deg, #ff8c42 0%, #ff6528 100%);
    padding: 15px 0; /* Reduced from extra padding */
    margin: 0;
    width: 100%;
}

/* ========================================
   SEARCH FORM - WHITE INNER CONTAINER
======================================== */
.hasp-search-form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px; /* Compact padding */
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hasp-search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.hasp-field {
    position: relative;
    flex: 0 0 auto;
}

.hasp-field-status {
    flex: 0 0 auto;
}

.hasp-field-select {
    flex: 0 0 auto;
    min-width: 110px;
}

.hasp-field-buttons {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
}

/* ========================================
   STATUS TOGGLE (BUY/RENT)
======================================== */
.hasp-status-toggle {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 3px;
}

.hasp-status-btn {
    margin: 0;
    cursor: pointer;
}

.hasp-status-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hasp-status-btn span {
    display: block;
    padding: 8px 16px;
    text-align: center;
    border-radius: 20px;
    background: transparent;
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.hasp-status-btn.active span,
.hasp-status-btn input:checked + span {
    background: #ffffff;
    color: #ff6528;
}

.hasp-status-btn:hover span {
    background: rgba(255, 255, 255, 0.3);
}

.hasp-status-btn.active:hover span,
.hasp-status-btn input:checked + span:hover {
    background: #ffffff;
    color: #ff5014;
}

/* ========================================
   INPUT FIELDS & SELECTS - WHITE BOXES
======================================== */
.hasp-input,
.hasp-select {
    width: 100%;
    min-width: 100px;
    padding: 10px 12px;
    border: none;
    border-radius: 25px;
    font-size: 13px;
    color: #333;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
    height: 40px;
}

.hasp-input:focus,
.hasp-select:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.hasp-input::placeholder {
    color: #999;
}

.hasp-select {
    cursor: pointer;
    appearance: none;
    padding-right: 35px;
}

/* Dropdown Arrow for Select */
.hasp-field-select {
    position: relative;
}

.hasp-field-select::after {
    content: '▼';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 10px;
    pointer-events: none;
}

/* Remove orange dots separator */
.hasp-select-icon {
    display: none;
}

/* ========================================
   SEARCH BUTTON
======================================== */
.hasp-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    height: 40px;
}

.hasp-btn-search {
    background: #ffffff;
    color: #ff6528;
    min-width: 100px;
}

.hasp-btn-search:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hasp-btn-search:active {
    transform: translateY(0);
}

.hasp-btn-search.loading .hasp-btn-text {
    opacity: 0;
}

.hasp-btn-search.loading .hasp-btn-loader {
    display: block !important;
}

.hasp-btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ========================================
   SPINNER
======================================== */
.hasp-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 101, 40, 0.3);
    border-top-color: #ff6528;
    border-radius: 50%;
    display: inline-block;
    animation: hasp-spin 0.6s linear infinite;
}

@keyframes hasp-spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   RESULTS CONTAINER
======================================== */
.hasp-results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hasp-results-container:not(:empty) {
    margin-top: 30px;
}

.hasp-loading {
    text-align: center;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    margin-top: 20px;
}

.hasp-loading p {
    margin-top: 15px;
    color: #666;
    font-size: 16px;
}

.hasp-results-header {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.hasp-results-count {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.hasp-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* ========================================
   PROPERTY CARD
======================================== */
.hasp-property-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.hasp-property-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.hasp-property-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.hasp-property-content {
    padding: 20px;
}

.hasp-property-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.hasp-property-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hasp-property-title a:hover {
    color: #ff6b35;
}

.hasp-property-price {
    font-size: 22px;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 15px;
}

.hasp-property-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.hasp-property-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.hasp-property-info {
    font-size: 13px;
    color: #999;
}

.hasp-property-info span {
    display: block;
    margin-bottom: 5px;
}

/* ========================================
   NO RESULTS MESSAGE
======================================== */
.hasp-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.hasp-no-results h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.hasp-no-results p {
    font-size: 16px;
    color: #666;
}

/* ========================================
   PAGINATION
======================================== */
.hasp-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.hasp-pagination-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hasp-pagination-btn:hover {
    border-color: #ff6528;
    color: #ff6528;
}

.hasp-pagination-btn.active {
    background: #ff6528;
    border-color: #ff6528;
    color: #ffffff;
}

.hasp-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 1200px) {
    .hasp-search-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hasp-field-select {
        min-width: 100px;
        max-width: 150px;
    }
}

@media (max-width: 768px) {
    .hasp-search-wrapper {
        padding: 10px;
    }
    
    .hasp-search-form {
        padding: 15px;
        border-radius: 20px;
    }
    
    .hasp-search-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hasp-field,
    .hasp-field-status,
    .hasp-field-select,
    .hasp-field-buttons {
        width: 100%;
        flex: 1 1 auto;
        max-width: 100%;
    }
    
    .hasp-field-select::after {
        right: 12px;
    }
    
    .hasp-field-buttons {
        justify-content: center;
        margin-top: 10px;
    }
    
    .hasp-status-toggle {
        justify-content: center;
    }
    
    .hasp-status-btn {
        flex: 1;
    }
    
    .hasp-results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hasp-search-wrapper {
        padding: 8px;
    }
    
    .hasp-search-form {
        padding: 12px;
    }
    
    .hasp-property-card {
        margin-bottom: 15px;
    }
    
    .hasp-input,
    .hasp-select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}
