/* ==========================================================================
   Sheraz Smart Search - AI Property Search Page
   Plugin: sheraz-ai-search
   Prefix: sheraz-ss- (to avoid CSS conflicts)
   ========================================================================== */

/* Container */
.sheraz-ss-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: inherit;
}

/* ---------- Hero / Search Section ---------- */
.sheraz-ss-hero {
    text-align: center;
    padding: 40px 0 30px;
}

.sheraz-ss-hero h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px;
    line-height: 1.3;
}

.sheraz-ss-hero p {
    font-size: 1.05rem;
    color: #64748b;
    margin: 0 0 28px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Search bar */
.sheraz-ss-search-bar {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
    border: 2px solid #e2e8f0;
    transition: border-color 0.2s;
}

.sheraz-ss-search-bar:focus-within {
    border-color: #2563eb;
    box-shadow: 0 2px 16px rgba(37, 99, 235, 0.15);
}

.sheraz-ss-input {
    flex: 1;
    padding: 16px 20px;
    font-size: 1.05rem;
    border: none;
    outline: none;
    background: #fff;
    color: #1e293b;
    font-family: inherit;
}

.sheraz-ss-input::placeholder {
    color: #94a3b8;
}

.sheraz-ss-btn {
    padding: 16px 28px;
    background: #2563eb;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    white-space: nowrap;
}

.sheraz-ss-btn:hover {
    background: #1d4ed8;
}

.sheraz-ss-btn:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.sheraz-ss-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Example queries */
.sheraz-ss-examples {
    margin-top: 16px;
    font-size: 0.875rem;
    color: #94a3b8;
}

.sheraz-ss-examples span {
    color: #64748b;
}

.sheraz-ss-example-link {
    color: #2563eb;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.sheraz-ss-example-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ---------- Status Messages ---------- */
.sheraz-ss-loading {
    text-align: center;
    padding: 60px 20px;
}

.sheraz-ss-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: sheraz-ss-spin 0.8s linear infinite;
}

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

.sheraz-ss-loading p {
    margin-top: 16px;
    color: #64748b;
    font-size: 1rem;
}

.sheraz-ss-error,
.sheraz-ss-empty {
    text-align: center;
    padding: 50px 20px;
}

.sheraz-ss-error p,
.sheraz-ss-empty p {
    color: #64748b;
    font-size: 1.05rem;
    margin: 0 0 16px;
}

.sheraz-ss-retry-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s;
}

.sheraz-ss-retry-btn:hover {
    background: #1d4ed8;
}

/* ---------- Banners ---------- */
.sheraz-ss-warning-banner {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #92400e;
    font-size: 0.95rem;
}

.sheraz-ss-warning-banner button {
    background: none;
    border: none;
    color: #92400e;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 0 0 16px;
    line-height: 1;
}

.sheraz-ss-fallback-banner {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 20px;
    color: #0c4a6e;
    font-size: 0.95rem;
}

/* ---------- Results Summary ---------- */
.sheraz-ss-results-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}

.sheraz-ss-results-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.sheraz-ss-results-summary {
    font-size: 0.95rem;
    color: #64748b;
    font-style: italic;
}

/* ---------- Property Cards Grid ---------- */
.sheraz-ss-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.sheraz-ss-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s, transform 0.2s;
}

.sheraz-ss-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
}

/* Card photo */
.sheraz-ss-card-photo {
    position: relative;
    width: 100%;
    padding-top: 66.66%;
    background: #f1f5f9;
    overflow: hidden;
}

.sheraz-ss-card-photo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sheraz-ss-card-photo .sheraz-ss-no-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* AI Score Badge */
.sheraz-ss-score-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    backdrop-filter: blur(4px);
}

.sheraz-ss-score-high {
    background: rgba(22, 163, 74, 0.9);
}

.sheraz-ss-score-medium {
    background: rgba(217, 119, 6, 0.9);
}

.sheraz-ss-score-low {
    background: rgba(107, 114, 128, 0.85);
}

/* Card body */
.sheraz-ss-card-body {
    padding: 16px;
}

.sheraz-ss-card-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
}

.sheraz-ss-card-address {
    font-size: 0.95rem;
    color: #475569;
    margin: 0 0 10px;
    line-height: 1.4;
}

.sheraz-ss-card-details {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: #64748b;
    margin: 0 0 10px;
    flex-wrap: wrap;
}

.sheraz-ss-card-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sheraz-ss-card-details .sheraz-ss-separator {
    color: #cbd5e1;
}

.sheraz-ss-card-type {
    display: inline-block;
    padding: 2px 8px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #475569;
    font-weight: 500;
}

/* AI reason */
.sheraz-ss-card-ai-reason {
    font-size: 0.85rem;
    color: #2563eb;
    font-style: italic;
    margin: 8px 0 0;
    line-height: 1.4;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

/* View listing link */
.sheraz-ss-card-link {
    display: block;
    text-align: center;
    padding: 12px 16px;
    background: #f8fafc;
    color: #2563eb;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-top: 1px solid #e2e8f0;
    transition: background 0.2s, color 0.2s;
}

.sheraz-ss-card-link:hover {
    background: #2563eb;
    color: #fff;
}

/* ---------- Load More ---------- */
.sheraz-ss-load-more {
    text-align: center;
    margin-bottom: 40px;
}

.sheraz-ss-load-more-btn {
    display: inline-block;
    padding: 12px 36px;
    background: #fff;
    color: #2563eb;
    border: 2px solid #2563eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s, color 0.2s;
}

.sheraz-ss-load-more-btn:hover {
    background: #2563eb;
    color: #fff;
}

/* ---------- Responsive ---------- */

/* Tablet: 2 columns */
@media (max-width: 921px) {
    .sheraz-ss-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .sheraz-ss-hero h2 {
        font-size: 1.6rem;
    }
}

/* Mobile: 1 column */
@media (max-width: 544px) {
    .sheraz-ss-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .sheraz-ss-hero {
        padding: 24px 0 20px;
    }

    .sheraz-ss-hero h2 {
        font-size: 1.35rem;
    }

    .sheraz-ss-hero p {
        font-size: 0.95rem;
    }

    .sheraz-ss-search-bar {
        flex-direction: column;
        border-radius: 8px;
    }

    .sheraz-ss-input {
        border-bottom: 1px solid #e2e8f0;
        border-radius: 0;
    }

    .sheraz-ss-btn {
        justify-content: center;
        padding: 14px 20px;
    }

    .sheraz-ss-examples {
        font-size: 0.8rem;
    }

    .sheraz-ss-results-header {
        flex-direction: column;
        gap: 4px;
    }

    .sheraz-ss-card-price {
        font-size: 1.2rem;
    }
}

/* ---------- Validation message ---------- */
.sheraz-ss-validation {
    color: #dc2626;
    font-size: 0.9rem;
    margin-top: 8px;
    text-align: center;
}

/* ---------- Hidden utility ---------- */
.sheraz-ss-hidden {
    display: none !important;
}