/* ==========================================================================
   Bayut Style Search Bar - Houzez Child Theme
   ========================================================================== */

/* --------------------------------------------------------------------------
   Bayut AI Popup Modal - Inline Overlay on Top of Search Bar
   -------------------------------------------------------------------------- */
.bayut-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

.bayut-search-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.09);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

/* --------------------------------------------------------------------------
   Top AI Prompt Box
   -------------------------------------------------------------------------- */
.bayut-ai-prompt-box {
    margin-bottom: 20px;
}

.bayut-ai-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 30px;
    padding: 4px 6px 4px 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.bayut-ai-input-wrap:focus-within,
.bayut-ai-input-wrap:hover {
    border-color: #10b98101;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.bayut-ai-input {
    width: 100%;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    font-size: 15px;
    color: #374151;
    padding: 8px 10px 8px 0;
    box-shadow: none !important;
    cursor: pointer;
}

.bayut-ai-input::placeholder {
    color: #6b7280;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.bayut-ai-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bayut-ai-btn:hover {
    background: #f9fafb;
    border-color: #10b981;
    color: #059669;
}

.bayut-sparkle-icon {
    width: 18px;
    height: 18px;
    fill: #0ea5e9;
    transition: transform 0.3s ease;
}

.bayut-ai-btn:hover .bayut-sparkle-icon {
    transform: rotate(15deg) scale(1.1);
    fill: #10b981;
}

.bayut-ai-modal-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 999999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bayut-ai-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.bayut-ai-modal-card-wrap {
    position: relative;
    width: 100%;
    border-radius: 20px;
    padding: 2px;
    /* Gradient border thickness */
    background: linear-gradient(135deg, #10b98100 0%, #06b5d40e 100%);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.2);
}

@keyframes bayutTealGlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.bayut-ai-modal-overlay.active .bayut-ai-modal-card-wrap {
    transform: translateY(0) scale(1);
}

/* Soft Mint & Cyan Tint Card matching user screenshot */
.bayut-ai-modal-card {
    position: relative;
    width: 100%;
    background: linear-gradient(180deg, #e6f9f5 0%, #e0f2fe 100%);
    border-radius: 25px;
    padding: 32px 36px 28px 36px;
    box-sizing: border-box;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.bayut-ai-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(203, 213, 225, 0.6);
    font-size: 18px;
    line-height: 1;
    color: #475569;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.bayut-ai-modal-close:hover {
    color: #0f172a;
    background: #ffffff;
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.bayut-ai-modal-textarea {
    width: 100%;
    min-height: 85px;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
    color: #0f172a;
    resize: none;
    box-shadow: none !important;
    padding: 0;
    margin-top: 4px;
}

.bayut-ai-modal-textarea::placeholder {
    color: #64748b;
    font-weight: 400;
    opacity: 0.85;
}

.bayut-ai-suggestions-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
    color: #0284c7;
    letter-spacing: -0.01em;
}

.bayut-ai-suggestions-head svg {
    width: 18px;
    height: 18px;
    fill: #0284c7;
    animation: bayutSparklePulse 2s ease-in-out infinite;
}

@keyframes bayutSparklePulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

.bayut-ai-pills-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* White Card Pills matching user screenshot */
.bayut-ai-suggestion-pill {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 14px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.bayut-ai-suggestion-pill:hover {
    background: #ffffff;
    color: #059669;
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.15);
}

.bayut-ai-modal-actions {
    display: flex;
    justify-content: center;
    margin-top: 22px;
}

/* Emerald Green Action Button matching screenshot */
.bayut-ai-search-submit {
    position: relative;
    background: #059669;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
    transition: all 0.2s ease;
    overflow: hidden;
}

.bayut-ai-search-submit:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.5);
}

.bayut-ai-search-submit svg {
    transition: transform 0.2s ease;
}

.bayut-ai-search-submit:hover svg {
    transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Divider
   -------------------------------------------------------------------------- */
.bayut-divider {
    position: relative;
    text-align: center;
    margin: 20px 0 22px 0;
}

.bayut-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
    z-index: 1;
}

.bayut-divider span {
    position: relative;
    z-index: 2;
    background: #ffffff;
    padding: 0 16px;
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Form Rows
   -------------------------------------------------------------------------- */
.bayut-search-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bayut-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.bayut-primary-row {
    flex-wrap: nowrap;
}

/* Pill Container (Buy/Rent) */
.bayut-toggle-pills {
    display: inline-flex;
    align-items: center;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 3px;
    box-sizing: border-box;
    user-select: none;
    flex-shrink: 0;
}

.bayut-pill-btn {
    border: none;
    background: transparent;
    padding: 9px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.bayut-pill-btn:hover {
    color: #111827;
}

.bayut-pill-btn.active {
    background: #e6f7f0;
    color: #0d9488;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Location Input Box */
.bayut-location-box {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 14px;
    height: 44px;
    transition: border-color 0.2s ease;
}

.bayut-location-box:focus-within {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.bayut-input-icon {
    display: flex;
    align-items: center;
    margin-right: 10px;
    color: #0d9488;
    flex-shrink: 0;
}

.bayut-pin-icon {
    width: 20px;
    height: 20px;
}

.bayut-field-input {
    width: 100%;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 14px;
    color: #1f2937;
    box-shadow: none !important;
    padding: 0 !important;
}

.bayut-field-input::placeholder {
    color: #9ca3af;
}

.bayut-location-box .auto-complete {
    top: 100%;
    left: 0;
    right: 0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 9999;
}

/* Search Submit Button */
.bayut-submit-box {
    flex-shrink: 0;
}

.bayut-search-submit-btn {
    background: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    height: 44px;
    padding: 0 36px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.bayut-search-submit-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

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

/* --------------------------------------------------------------------------
   Secondary Row: Sub-pills | Property Type | Beds & Baths | Price
   -------------------------------------------------------------------------- */
.bayut-secondary-row {
    flex-wrap: wrap;
    gap: 12px;
}

.bayut-sub-pills-wrap {
    flex-shrink: 0;
}

.bayut-sub-pills {
    background: #f3f4f6;
    border-radius: 10px;
    padding: 3px;
}

.bayut-sub-pill-btn {
    border: none;
    background: transparent;
    padding: 8px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bayut-sub-pill-btn.active {
    background: #e6f7f0;
    color: #0d9488;
    font-weight: 600;
}

.bayut-field-box {
    flex: 1;
    min-width: 140px;
    position: relative;
}

.bayut-select {
    width: 100%;
    height: 42px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 32px 0 12px;
    font-size: 13.5px;
    color: #374151;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    transition: border-color 0.2s ease;
}

.bayut-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.bayut-offplan-fields-wrap {
    display: flex;
    gap: 12px;
    flex: 1;
}

/* --------------------------------------------------------------------------
   Responsive Layout (Tablet & Mobile)
   -------------------------------------------------------------------------- */
.bayut-mobile-toggle-btn {
    display: none;
    width: 100%;
    background: #0d9488;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.bayut-mobile-toggle-btn .bayut-toggle-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.bayut-mobile-toggle-btn.collapsed .bayut-toggle-arrow {
    transform: rotate(-90deg);
}

@media (max-width: 991px) {
    .bayut-mobile-toggle-btn {
        display: flex;
    }

    .bayut-search-container {
        padding: 18px 16px;
        border-radius: 16px;
    }

    .bayut-collapsible-content {
        transition: all 0.3s ease;
    }

    .bayut-collapsible-content.collapsed {
        display: none !important;
    }

    .bayut-primary-row {
        flex-wrap: wrap;
    }

    .bayut-toggle-pills.bayut-status-pills {
        width: 100%;
    }

    .bayut-pill-btn {
        flex: 1;
        text-align: center;
    }

    .bayut-location-box {
        width: 100%;
        flex: auto;
    }

    .bayut-submit-box {
        width: 100%;
    }

    .bayut-search-submit-btn {
        width: 100%;
    }

    .bayut-secondary-row {
        flex-direction: column;
        align-items: stretch;
    }

    .bayut-field-box {
        width: 100%;
    }

    .bayut-sub-pills {
        display: flex;
        width: 100%;
        overflow-x: auto;
    }

    .bayut-sub-pill-btn {
        flex: 1;
        text-align: center;
        white-space: nowrap;
    }

    .bayut-ai-modal-card {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .bayut-ai-modal-textarea {
        font-size: 16px;
        min-height: 80px;
    }
}