/* ==============================================
   PREMIUM SEARCH - ESTATIC
   Redesigned Premium Real Estate Search
   Inspired by luxury real estate sites
   ============================================== */

/* ==================== SECTION ==================== */
.premium-search-section {
    width: 100%;
    background: #FFFFFF;
    padding: 48px 0 96px;
    position: relative;
}

/* ==================== CONTAINER ==================== */
.premium-search-container {
    width: calc(100% - 16px);
    max-width: 99%;
    margin: 0 auto;
}

/* ==================== HEADER ==================== */
.premium-search-header {
    text-align: center;
    margin-bottom: 48px;
}

.premium-search-title {
    font-family: 'Mulish', sans-serif;
    font-size: 2.8rem;
    font-weight: 400;
    letter-spacing: 0.05rem;
    line-height: 115%;
    color: #000000;
    margin: 0;
}

/* ==================== FORM ==================== */
.premium-search-form {
    background: #FAFAFA;
    border: none;
    box-shadow: none;
    padding: 0;
    width: 100%;
}

.premium-search-fields {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
}

/* ==================== INDIVIDUAL FIELDS ==================== */
.premium-search-field {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid #E5E5E5;
    position: relative;
    background: #FAFAFA;
    flex: 1;
    min-width: 200px;
}

.premium-search-field-label {
    font-family: 'Mulish', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #AC8A36;
    margin-bottom: 12px;
}

/* Property Type Field */
.premium-search-field--property {
    flex: 1.2;
    min-width: 240px;
}

/* Transaction Field */
.premium-search-field--transaction {
    flex: 1.2;
    min-width: 240px;
}

/* Location Field */
.premium-search-field--location {
    flex: 2;
    min-width: 300px;
    border-right: none;
}

/* ==================== CUSTOM SELECT OVERRIDES ==================== */
.premium-search-form .custom_noveo_select {
    position: relative;
    cursor: pointer;
    width: 100%;
    border: none !important;
    padding: 0 !important;
}

.premium-search-form .custom_noveo_select .select_label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    cursor: pointer;
}

.premium-search-form .custom_noveo_select .select_label img {
    display: none;
}

.premium-search-form .custom_noveo_select .select_label span {
    font-family: 'Mulish', sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: #333333;
    line-height: 1.4;
}

/* Arrow indicator */
.premium-search-form .custom_noveo_select::after {
    content: '';
    display: block;
    width: 12px;
    height: 8px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 8"><path d="M1 1.5L6 6.5L11 1.5" stroke="%23AC8A36" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.premium-search-form .custom_noveo_select.show::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Dropdown */
.premium-search-form .custom_noveo_select .select_items {
    position: absolute;
    top: calc(100% + 12px);
    left: -32px;
    right: -32px;
    background: #FFFFFF;
    border: none;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.premium-search-form .custom_noveo_select.show .select_items {
    max-height: 320px;
    opacity: 1;
    overflow-y: auto;
    pointer-events: auto;
}

.premium-search-form .custom_noveo_select .select_items > div {
    padding: 16px 32px;
    font-family: 'Mulish', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #333333;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #F5F5F5;
}

.premium-search-form .custom_noveo_select .select_items > div:last-child {
    border-bottom: none;
}

.premium-search-form .custom_noveo_select .select_items > div:hover {
    background: #FAF8F3;
    color: #AC8A36;
    padding-left: 40px;
}

.premium-search-form .custom_noveo_select .select_items > div.current,
.premium-search-form .custom_noveo_select .select_items > div.selected {
    background: #AC8A36;
    color: #FFFFFF;
    font-weight: 600;
}

.premium-search-form .custom_noveo_select .select_items > div.current:hover,
.premium-search-form .custom_noveo_select .select_items > div.selected:hover {
    background: #9A7A2E;
    color: #FFFFFF;
    padding-left: 40px;
}

/* ==================== LOCATION SELECT2 ==================== */
.premium-search-field--location .custom_noveo_select.text_box {
    width: 100%;
}

.premium-search-field--location .custom_noveo_select.text_box::after {
    display: none;
}

.premium-search-field--location .select2-container {
    width: 100% !important;
}

.premium-search-field--location .select2-container--default .select2-selection--multiple {
    border: none !important;
    border-radius: 0;
    min-height: 28px;
    background: transparent !important;
    padding: 0;
}

.premium-search-field--location .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Location tags - premium style */
.premium-search-field--location .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: #AC8A36;
    border: none;
    border-radius: 2px;
    padding: 8px 32px 8px 14px;
    margin: 0;
    font-family: 'Mulish', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #FFFFFF;
    position: relative;
    line-height: 1.2;
}

.premium-search-field--location .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #FFFFFF;
    opacity: 0.8;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    font-weight: 400;
    border: none !important;
    background: none !important;
    padding: 0;
    margin: 0;
    line-height: 1;
    width: auto;
    height: auto;
    transition: opacity 0.2s ease;
}

.premium-search-field--location .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #FFFFFF;
    opacity: 1;
    background: none !important;
}

.premium-search-field--location .select2-container--default .select2-search--inline .select2-search__field {
    font-family: 'Mulish', sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: #333333;
    margin: 0;
    padding: 0;
    height: 28px;
}

.premium-search-field--location .select2-container--default .select2-search--inline .select2-search__field::placeholder {
    color: #999999;
    font-weight: 400;
}

/* Global Select2 dropdown styling */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #FAF8F3 !important;
    color: #AC8A36 !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #AC8A36 !important;
    color: #FFFFFF !important;
}

.select2-dropdown {
    border: none !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15) !important;
    border-radius: 0 !important;
}

.select2-results__option {
    font-family: 'Mulish', sans-serif !important;
    font-size: 1.5rem !important;
    padding: 14px 20px !important;
}

/* ==================== ACTIONS AREA ==================== */
.premium-search-actions {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex-shrink: 0;
}

/* More Options Button */
.premium-search-more-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px 32px;
    background: #FAFAFA;
    border: none;
    border-left: 1px solid #E5E5E5;
    font-family: 'Mulish', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
}

.premium-search-more-options:hover {
    background: #F0F0F0;
    color: #AC8A36;
}

.premium-search-more-options svg {
    color: currentColor;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    transition: color 0.3s ease;
}

/* Submit Button */
.premium-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px 48px;
    min-width: 180px;
    background: #AC8A36;
    border: none;
    font-family: 'Mulish', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.premium-search-submit:hover {
    background: #9A7A2E;
}

.premium-search-submit svg {
    color: #FFFFFF;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* ==================== RESPONSIVE - LARGE DESKTOP ==================== */
@media (min-width: 1400px) {
    .premium-search-container {
        max-width: 1800px;
    }

    .premium-search-field {
        padding: 32px 40px;
    }

    .premium-search-more-options,
    .premium-search-submit {
        padding: 32px 48px;
    }
}

/* ==================== RESPONSIVE - EXTRA LARGE DESKTOP ==================== */
@media (min-width: 1920px) {
    .premium-search-container {
        max-width: 1800px;
        padding: 0 60px;
    }

    .premium-search-field {
        padding: 36px 48px;
    }

    .premium-search-field--location {
        flex: 2.5;
    }
}

/* ==================== RESPONSIVE - DESKTOP ==================== */
@media (max-width: 1200px) {
    .premium-search-fields {
        flex-wrap: wrap;
    }

    .premium-search-field--property,
    .premium-search-field--transaction {
        flex: 1 1 50%;
        min-width: 200px;
        border-bottom: 1px solid #E5E5E5;
    }

    .premium-search-field--transaction {
        border-right: none;
    }

    .premium-search-field--location {
        flex: 1 1 100%;
        border-right: none;
        border-bottom: 1px solid #E5E5E5;
    }

    .premium-search-actions {
        flex: 1 1 100%;
    }

    .premium-search-more-options {
        flex: 1;
        border-left: none;
        border-right: 1px solid #E5E5E5;
    }

    .premium-search-submit {
        flex: 1;
    }
}

/* ==================== RESPONSIVE - TABLET ==================== */
@media (max-width: 900px) {
    .premium-search-section {
        padding: 56px 0 80px;
    }

    .premium-search-header {
        margin-bottom: 36px;
    }

    .premium-search-title {
        font-size: 2.6rem;
    }

    .premium-search-field {
        padding: 24px;
    }

    .premium-search-field-label {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .premium-search-form .custom_noveo_select .select_label span {
        font-size: 1.5rem;
    }

    .premium-search-more-options {
        padding: 20px 24px;
        font-size: 1.1rem;
    }

    .premium-search-submit {
        padding: 24px 32px;
    }
}

/* ==================== RESPONSIVE - MOBILE ==================== */
@media (max-width: 640px) {
    .premium-search-section {
        padding: 48px 0 72px;
        overflow-x: hidden;
    }

    .premium-search-container {
        padding: 0 16px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .premium-search-header {
        margin-bottom: 32px;
    }

    .premium-search-title {
        font-size: 2.2rem;
    }

    .premium-search-fields {
        width: 100%;
    }

    .premium-search-field {
        padding: 20px;
        min-width: 0 !important;
        flex: 1 1 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #E5E5E5;
    }

    .premium-search-field--property,
    .premium-search-field--transaction,
    .premium-search-field--location {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        border-right: none !important;
    }

    .premium-search-field--location {
        border-bottom: none;
    }

    .premium-search-field-label {
        font-size: 1rem;
        letter-spacing: 0.12em;
    }

    .premium-search-form .custom_noveo_select .select_label span {
        font-size: 1.5rem;
    }

    .premium-search-form .custom_noveo_select .select_items {
        left: -20px;
        right: -20px;
    }

    .premium-search-form .custom_noveo_select .select_items > div {
        padding: 14px 20px;
        font-size: 1.4rem;
    }

    .premium-search-actions {
        flex-direction: column;
        width: 100%;
    }

    .premium-search-more-options {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        border-right: none !important;
        border-left: none !important;
        border-top: 1px solid #E5E5E5 !important;
        border-bottom: none !important;
        padding: 18px 20px !important;
        width: 100% !important;
        font-size: 1.2rem !important;
        background: #FAFAFA !important;
        box-sizing: border-box;
    }

    .premium-search-submit {
        padding: 20px !important;
        min-width: auto !important;
        width: 100% !important;
        font-size: 1.3rem !important;
        box-sizing: border-box;
    }

    .premium-search-field--location .select2-container--default .select2-selection--multiple .select2-selection__choice {
        font-size: 1.2rem;
        padding: 6px 28px 6px 12px;
    }
}

/* ==================== HIDE DEFAULT ELEMENTS ==================== */
.premium-search-form .custom_noveo_select h4,
.premium-search-form .custom_noveo_select .h4,
.premium-search-form .custom_noveo_select p.h4 {
    display: none !important;
}

/* ==================== FOCUS STATES ==================== */
.premium-search-more-options:focus-visible,
.premium-search-submit:focus-visible {
    outline: 2px solid #AC8A36;
    outline-offset: -2px;
}

/* ==================== SCROLLBAR STYLING ==================== */
.premium-search-form .custom_noveo_select .select_items::-webkit-scrollbar {
    width: 4px;
}

.premium-search-form .custom_noveo_select .select_items::-webkit-scrollbar-track {
    background: #F5F5F5;
}

.premium-search-form .custom_noveo_select .select_items::-webkit-scrollbar-thumb {
    background: #AC8A36;
    border-radius: 2px;
}

/* ==================== FORM ACTIVE STATE ==================== */
.premium-search-form.active {
    z-index: 20;
    position: relative;
}

/* ==================== FIX SELECT2 X BUTTON ==================== */
.premium-search-field--location .select2-selection__choice__display {
    padding-right: 0;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    border-right: none !important;
    left: auto !important;
    right: 8px !important;
}
