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

/* ========================================
   MAIN CONTAINER - FULL WIDTH ORANGE BAR
======================================== */
.hasp-search-wrapper {
    background: linear-gradient(90deg, #ff9a56 0%, #ff7a3d 100%);
    padding: 18px 0;
    margin: 0;
    width: 100%;
    box-shadow: 0 2px 10px rgba(255, 122, 61, 0.2);
}

/* ========================================
   SEARCH FORM CONTAINER
======================================== */
.hasp-search-form {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

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

/* ========================================
   FIELD CONTAINERS
======================================== */
.hasp-field,
.hasp-field-status,
.hasp-field-select,
.hasp-field-buttons {
    position: relative;
    flex: 0 1 auto;
}

.hasp-field-status {
    min-width: 140px;
}

.hasp-field-select {
    min-width: 120px;
    max-width: 180px;
    flex: 1;
}

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

/* ========================================
   STATUS TOGGLE (BUY/RENT)
======================================== */
.hasp-status-toggle {
    display: flex;
    gap: 0;
    background: #ffffff;
    border-radius: 25px;
    padding: 3px;
    height: 44px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

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

.hasp-status-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 20px;
    border-radius: 22px;
    background: transparent;
    color: #666;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.hasp-status-btn.active span,
.hasp-status-btn input:checked + span {
    background: linear-gradient(90deg, #ff9a56 0%, #ff7a3d 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(255, 122, 61, 0.3);
}

.hasp-status-btn:hover span {
    color: #ff7a3d;
}

.hasp-status-btn.active:hover span,
.hasp-status-btn input:checked + span:hover {
    background: linear-gradient(90deg, #ff8c42 0%, #ff6528 100%);
}

/* ========================================
   DROPDOWN SELECTS & INPUT FIELDS
======================================== */
.hasp-select,
.hasp-input {
    width: 100%;
    height: 44px;
    padding: 0 40px 0 16px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    color: #333;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    outline: none;
    cursor: pointer;
    appearance: none;
    font-weight: 500;
}

.hasp-input {
    cursor: text;
}

.hasp-select:hover,
.hasp-input:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hasp-select:focus,
.hasp-input:focus {
    box-shadow: 0 0 0 3px rgba(255, 122, 61, 0.2);
}

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

/* Dropdown Arrow */
.hasp-field-select::after {
    content: '▼';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 10px;
    pointer-events: none;
    z-index: 1;
}

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

/* ========================================
   SEARCH BUTTON
======================================== */
.hasp-btn-search {
    height: 44px;
    padding: 0 32px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    background: #ffffff;
    color: #ff7a3d;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    min-width: 110px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hasp-btn-search:hover {
    background: #ff7a3d;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(255, 122, 61, 0.3);
    transform: translateY(-1px);
}

.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: 18px;
    height: 18px;
    border: 2px solid rgba(255, 122, 61, 0.3);
    border-top-color: #ff7a3d;
    border-radius: 50%;
    display: inline-block;
    animation: hasp-spin 0.8s linear infinite;
}

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

/* ========================================
   LOADING CONTAINER
======================================== */
.hasp-loading {
    text-align: center;
    padding: 50px;
    background: #ffffff;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

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

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

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

.hasp-results-header {
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    border-radius: 12px;
    border-left: 4px solid #ff7a3d;
}

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

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

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

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

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

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

.hasp-property-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 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: #ff7a3d;
}

.hasp-property-price {
    font-size: 24px;
    font-weight: 700;
    color: #ff7a3d;
    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;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

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

/* ========================================
   NO RESULTS MESSAGE
======================================== */
.hasp-no-results {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

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

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

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

.hasp-pagination-btn:hover {
    border-color: #ff7a3d;
    color: #ff7a3d;
    transform: translateY(-2px);
}

.hasp-pagination-btn.active {
    background: linear-gradient(90deg, #ff9a56 0%, #ff7a3d 100%);
    border-color: #ff7a3d;
    color: #ffffff;
}

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

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 1200px) {
    .hasp-search-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .hasp-field-select {
        min-width: calc(25% - 10px);
        max-width: calc(25% - 10px);
    }
    
    .hasp-field-status {
        min-width: 140px;
    }
}

@media (max-width: 768px) {
    .hasp-search-wrapper {
        padding: 15px 10px;
    }
    
    .hasp-search-form {
        padding: 0 15px;
    }
    
    .hasp-search-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .hasp-field,
    .hasp-field-status,
    .hasp-field-select,
    .hasp-field-buttons {
        width: 100%;
        max-width: 100%;
        min-width: 100%;
    }
    
    .hasp-status-toggle {
        width: 100%;
    }
    
    .hasp-btn-search {
        width: 100%;
    }
    
    .hasp-results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hasp-search-wrapper {
        padding: 12px 8px;
    }
    
    .hasp-search-form {
        padding: 0 10px;
    }
    
    .hasp-select,
    .hasp-input,
    .hasp-btn-search {
        font-size: 16px; /* Prevent zoom on iOS */
        height: 48px;
    }
    
    .hasp-status-toggle {
        height: 48px;
    }
    
    .hasp-status-btn span {
        height: 42px;
    }
}
