/* Gravity Forms Extender: Property Select Styles */

/* 1. Select2 Premium Skinning */
.gfield_property_select .select2-container--default .select2-selection--single {
    border: 1px solid #ccc;
    border-radius: 4px;
    height: 42px;
    display: flex;
    align-items: center;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.gfield_property_select
    .select2-container--default.select2-container--focus
    .select2-selection--single,
.gfield_property_select
    .select2-container--default.select2-container--open
    .select2-selection--single {
    border-color: var(--e-global-color-primary);
    box-shadow: 0 0 0 1px var(--e-global-color-primary);
}

.gfield_property_select
    .select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    color: #444;
    line-height: 42px;
    padding-left: 12px;
}

.gfield_property_select
    .select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    display: none !important;
}

/* Position the theme's lingering chevron over the Select2 box */
.gfield_property_select .ginput_container_select {
    position: relative;
}

.gfield_property_select .uael-gf-select-custom {
    display: block;
}

.gfield_property_select .uael-gf-select-custom::after {
    position: absolute;
    right: 15px;
    top: 21px; /* Centers in the 42px height box */
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
}

/* 2. Property Preview Premium Styling */
.property-preview-container {
    margin-top: 15px;
    padding: 18px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.property-preview-container:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.property-preview-image img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.property-preview-address {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--e-global-color-primary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.property-preview-container .property__corner-flash {
    position: relative !important;
    display: inline-block !important;
    font-size: 1rem;
    color: #ffffff !important;
    padding: 6px 14px !important;
    background: var(--e-global-color-primary);
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 8px;
    z-index: 5;
}

.property-preview-container .property__corner-flash.is-sold {
    background-color: #e74c3c !important; /* Red for Sold/Let Agreed */
}

.property-preview-container .property__corner-flash.is-under-offer {
    background-color: #f39c12 !important; /* Amber for Under Offer */
}

.property-preview-container .property__corner-flash.is-available {
    background-color: var(--e-global-color-primary) !important;
}

/* Fix for Select2 results dropdown width */
.select2-dropdown {
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    z-index: 999999;
}
