/**
 * Frontend Styles - Horizontal Orange Theme
 * Houzez Advanced Search Pro
 * Author: Muhammad Shoaib
 */

/* ========================================
   SEARCH WRAPPER
======================================== */
.hasp-search-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

/* ========================================
   SEARCH FORM - HORIZONTAL LAYOUT
======================================== */
.hasp-search-form {
    background: linear-gradient(90deg, #ff8c42 0%, #ff6528 100%);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(255, 101, 40, 0.3);
    padding: 15px 25px;
    margin-bottom: 30px;
}

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

.hasp-field {
    position: relative;
}

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

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

.hasp-field-buttons {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    margin-left: auto;
}

/* ========================================
   STATUS TOGGLE (BUY/RENT) - ORANGE BUTTONS
======================================== */
.hasp-status-toggle {
    display: flex;
    gap: 8px;
}

.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: 10px 24px;
    text-align: center;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    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: #ffffff;
    color: #ff6528;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

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

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

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

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

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

.hasp-select-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff6528;
    font-size: 18px;
    pointer-events: none;
    font-weight: bold;
}

/* ========================================
   BUTTONS - ORANGE THEME
======================================== */
.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;
}

.hasp-btn-advance {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.hasp-btn-advance:hover {
    background: rgba(255, 255, 255, 0.5);
}

.hasp-btn-search {
    background: #ffffff;
    color: #ff6528;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

.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 - ORANGE
======================================== */
.hasp-spinner {
    width: 18px;
    height: 18px;
    border: 3px 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); }
}

/* ========================================
   ADVANCED ROW - SECOND LINE
======================================== */
.hasp-advanced-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.hasp-field-keyword-wide {
    flex: 1;
    min-width: 200px;
}

/* ========================================
   RESULTS CONTAINER
======================================== */
.hasp-results-container {
    margin-top: 30px;
}

.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;
    }
    
    .hasp-field-select {
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    .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;
    }
    
    .hasp-field-buttons {
        margin-left: 0;
        flex-direction: column;
    }
    
    .hasp-status-toggle {
        flex-direction: row;
    }
    
    .hasp-status-btn {
        flex: 1;
    }
    
    .hasp-advanced-row {
        flex-direction: column;
    }
    
    .hasp-results-grid {
        grid-template-columns: 1fr;
    }
}

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