/* Custom Dropdown Styles - Remove Browser Default Styling */

/* Base dropdown styling - applies to all select elements */
select,
select.form-control,
select.select-submit2,
select.cd-select,
select.form-select,
.property_tried_city,
.property_tried_district,
.property_tried_ward {
    /* Remove default browser styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Custom styling */
    width: 100%;
    height: calc(3.5rem + 2px);
    padding: 1rem 2.5rem 1rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background-color: #fff;
    
    /* Custom dropdown arrow */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    
    /* Typography */
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #000000 !important;
    
    /* Smooth transitions */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

/* Focus state for dropdowns */
select:focus,
select.form-control:focus,
select.select-submit2:focus,
select.cd-select:focus,
select.form-select:focus,
.property_tried_city:focus,
.property_tried_district:focus,
.property_tried_ward:focus {
    border-color: #228B22;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(34, 139, 34, 0.25);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23228B22' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

/* Hover state for dropdowns */
select:hover,
select.form-control:hover,
select.select-submit2:hover,
select.cd-select:hover,
select.form-select:hover,
.property_tried_city:hover,
.property_tried_district:hover,
.property_tried_ward:hover {
    border-color: #228B22;
}

/* Disabled state for dropdowns */
select:disabled,
select.form-control:disabled,
select.select-submit2:disabled,
select.cd-select:disabled,
select.form-select:disabled,
.property_tried_city:disabled,
.property_tried_district:disabled,
.property_tried_ward:disabled {
    background-color: #e9ecef;
    opacity: 1;
    cursor: not-allowed;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

/* Option styling */
select option,
select.form-control option,
select.select-submit2 option,
select.cd-select option,
select.form-select option {
    padding: 0.5rem 0.75rem;
    color: #000000 !important;
    background-color: #fff;
    font-weight: 400;
}

/* Selected option styling */
select option:checked,
select.form-control option:checked,
select.select-submit2 option:checked,
select.cd-select option:checked,
select.form-select option:checked {
    background-color: #228B22;
    color: #fff;
    font-weight: 600;
}

/* Multi-select styling */
select[multiple],
select[multiple].form-control,
select[multiple].select-submit2,
select[multiple].cd-select,
select[multiple].form-select {
    height: auto;
    min-height: calc(3.5rem + 2px);
    background-image: none;
    padding-right: 0.75rem;
}

/* Small size dropdowns */
select.form-select-sm,
.form-select-sm {
    height: calc(2.5rem + 2px);
    padding: 0.5rem 2rem 0.5rem 0.5rem;
    font-size: 0.875rem;
}

/* Large size dropdowns */
select.form-select-lg,
.form-select-lg {
    height: calc(4rem + 2px);
    padding: 1.25rem 3rem 1.25rem 1rem;
    font-size: 1.125rem;
}

/* Custom dropdown wrapper for better control */
.custom-dropdown-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-dropdown-wrapper select {
    width: 100%;
}

/* Label styling for dropdowns */
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #212529;
    font-size: 0.875rem;
}

/* Special styling for WordPress dropdown categories */
#prop_category_submit,
#prop_action_category_submit,
#prop_action_category_child_submit,
#property_county,
#property_city_submit,
#property_area_submit {
    margin-bottom: 1rem;
}

/* Professional Marketing Style Improvements */
.property-features-category-wrapper {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    border-left: 4px solid #228B22;
}

.feature-category-title {
    color: #228B22;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Choices.js Styling Override */
.choices {
    margin-bottom: 0;
    font-size: 1rem;
}

.choices__inner {
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    min-height: calc(3.5rem + 2px);
    padding: 0.5rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.choices__inner:focus,
.choices.is-focused .choices__inner {
    border-color: #228B22;
    box-shadow: 0 0 0 0.25rem rgba(34, 139, 34, 0.25);
}

.choices__item--selectable {
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    margin: 0.125rem;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    color: #000000 !important;
    transition: all 0.15s ease-in-out;
}

.choices__item--selectable:hover {
    background-color: #228B22;
    color: #fff;
    border-color: #228B22;
}

.choices__item--choice.is-selected {
    background-color: #228B22;
    color: #fff;
    border-color: #228B22;
}

.choices__button {
    background-color: #dc3545;
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    select,
    select.form-control,
    select.select-submit2,
    select.cd-select,
    select.form-select,
    .property_tried_city,
    .property_tried_district,
    .property_tried_ward {
        font-size: 16px; /* Prevents zoom on iOS */
        height: calc(3rem + 2px);
        padding: 0.75rem 2rem 0.75rem 0.5rem;
    }

    select.form-select-sm,
    .form-select-sm {
        height: calc(2.25rem + 2px);
        padding: 0.375rem 1.75rem 0.375rem 0.375rem;
        font-size: 14px;
    }

    /* Mobile-specific improvements */
    .property-features-category-wrapper {
        margin-bottom: 1rem;
        padding: 0.75rem;
        border-radius: 0.375rem;
    }

    .feature-category-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .choices__inner {
        min-height: calc(3rem + 2px);
        padding: 0.375rem 0.5rem;
    }

    .choices__item--selectable {
        padding: 0.25rem 0.5rem;
        margin: 0.0625rem;
        font-size: 0.875rem;
    }

    /* Touch-friendly buttons */
    .choices__button {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    select,
    select.form-control,
    select.select-submit2,
    select.cd-select,
    select.form-select {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e2e8f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    }
    
    select option,
    select.form-control option,
    select.select-submit2 option,
    select.cd-select option,
    select.form-select option {
        background-color: #2d3748;
        color: #e2e8f0;
    }
}

/* Professional Badge Styling */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
}

.badge-secondary {
    color: #fff;
    background-color: #228B22;
}

/* Professional Section Title Styling */
.wpestate_dashboard_section_title {
    background: linear-gradient(135deg, #228B22 0%, #32CD32 100%);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(34, 139, 34, 0.1);
}

.wpestate_dashboard_section_title i {
    font-size: 1.2rem;
}

.wpestate_dashboard_section_title small {
    opacity: 0.9;
    font-weight: 400;
}

/* Professional Choices.js Styling */
.choices--professional {
    position: relative;
    margin-bottom: 1rem;
}

.choices__inner--professional {
    background-color: #fff;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    min-height: 3.5rem;
    padding: 0.75rem;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.choices.is-focused .choices__inner--professional {
    border-color: #228B22;
    box-shadow: 0 0 0 0.2rem rgba(34, 139, 34, 0.25), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.choices__item--professional {
    background-color: #228B22;
    color: #fff;
    border: none;
    border-radius: 1rem;
    padding: 0.375rem 0.75rem;
    margin: 0.125rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    box-shadow: 0 1px 2px rgba(34, 139, 34, 0.2);
}

.choices__item--professional:hover {
    background-color: #1e7b1e;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(34, 139, 34, 0.3);
}

.choices__button--professional {
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    line-height: 1;
    margin-left: 0.5rem;
    transition: all 0.15s ease-in-out;
}

.choices__button--professional:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.choices__placeholder--professional {
    color: #6c757d;
    font-style: italic;
}

/* Property Amenities Specific - BLACK TEXT for Dropdown Options */
.property-features-choice-select option,
.choices__list--dropdown .choices__item,
.choices__list--dropdown .choices__item--selectable,
.choices__list--dropdown .choices__item--choice,
.choices__list .choices__item,
.choices__list .choices__item--selectable,
.choices__list .choices__item--choice,
.choices__item--choice,
.choices__item--selectable {
    color: #000000 !important;
    background-color: #ffffff !important;
    font-weight: 400 !important;
}

.choices__list--dropdown .choices__item--selectable:hover,
.choices__list--dropdown .choices__item--choice:hover,
.choices__list .choices__item--selectable:hover,
.choices__list .choices__item--choice:hover {
    background-color: #f8f9fa !important;
    color: #000000 !important;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices__list--dropdown .choices__item--choice.is-highlighted,
.choices__list .choices__item--selectable.is-highlighted,
.choices__list .choices__item--choice.is-highlighted {
    background-color: #e9ecef !important;
    color: #000000 !important;
}

/* Force black text on all Choices.js dropdown items */
.choices[data-type*="select-multiple"] .choices__list--dropdown .choices__item,
.choices[data-type*="select-multiple"] .choices__list--dropdown .choices__item--choice,
.choices[data-type*="select-multiple"] .choices__list--dropdown .choices__item--selectable {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* Ensure black text even when focused or active */
.choices__list--dropdown .choices__item:focus,
.choices__list--dropdown .choices__item:active,
.choices__list .choices__item:focus,
.choices__list .choices__item:active {
    color: #000000 !important;
}

/* Animation for dropdown opening (subtle) */
select {
    transform: translateZ(0);
    backface-visibility: hidden;
}

select:focus {
    transform: translateZ(0) scale(1.01);
}

/* Professional Loading Animation */
@keyframes professional-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.choices.is-loading .choices__inner--professional {
    animation: professional-pulse 1.5s ease-in-out infinite;
}

/* Mobile-First Professional Improvements */
@media (max-width: 576px) {
    .wpestate_dashboard_section_title {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        text-align: center;
    }

    .wpestate_dashboard_section_title i {
        font-size: 1rem;
    }

    .property-features-category-wrapper {
        margin-bottom: 0.75rem;
        padding: 0.5rem;
    }

    .feature-category-title {
        font-size: 0.9rem;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 0.125rem 0.375rem;
    }

    .choices__inner--professional {
        min-height: 3rem;
        padding: 0.5rem;
    }

    .choices__item--professional {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
        margin: 0.0625rem;
    }

    .choices__button--professional {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }
}

/* ULTIMATE BLACK TEXT OVERRIDE for Property Amenities */
.property-features-category-wrapper .choices__list--dropdown,
.property-features-category-wrapper .choices__list,
.property-features-select-wrapper .choices__list--dropdown,
.property-features-select-wrapper .choices__list {
    background-color: #ffffff !important;
}

.property-features-category-wrapper .choices__list--dropdown .choices__item,
.property-features-category-wrapper .choices__list .choices__item,
.property-features-select-wrapper .choices__list--dropdown .choices__item,
.property-features-select-wrapper .choices__list .choices__item,
.property-features-category-wrapper .choices__item--choice,
.property-features-select-wrapper .choices__item--choice,
.property-features-category-wrapper .choices__item--selectable,
.property-features-select-wrapper .choices__item--selectable {
    color: #000000 !important;
    background-color: #ffffff !important;
    font-weight: 400 !important;
    text-shadow: none !important;
}

/* Hover states with black text */
.property-features-category-wrapper .choices__item--choice:hover,
.property-features-select-wrapper .choices__item--choice:hover,
.property-features-category-wrapper .choices__item--selectable:hover,
.property-features-select-wrapper .choices__item--selectable:hover {
    color: #000000 !important;
    background-color: #f8f9fa !important;
}

/* Highlighted states with black text */
.property-features-category-wrapper .choices__item--choice.is-highlighted,
.property-features-select-wrapper .choices__item--choice.is-highlighted,
.property-features-category-wrapper .choices__item--selectable.is-highlighted,
.property-features-select-wrapper .choices__item--selectable.is-highlighted {
    color: #000000 !important;
    background-color: #e9ecef !important;
}