/* Number field arrows */
.elementor-form .elementor-field-group input[type="number"]::-webkit-inner-spin-button,
.elementor-form .elementor-field-group input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: auto !important;
    opacity: 1 !important;
    display: block;
}

/* Custom JS Select Styling */
.angie-custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

/* Inherit Elementor input styles */
.elementor-form .elementor-field-group .angie-custom-select-trigger {
    background-color: var(--e-global-color-94a960e, #000000);
    color: #7A7A7A; /* Text/Placeholder color */
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 15px; /* Matches default text input size */
    padding: 14px 40px 14px 16px; /* Matches default text input padding */
    border-radius: 20px; /* Force border radius to match form settings */
    
    /* Match Elementor form field borders directly */
    border-width: var(--e-form-field-border-width, 1px);
    border-style: solid;
    border-color: var(--e-form-field-border-color, #7A7A7A); /* Default fallback stroke */
    
    box-shadow: var(--e-form-field-box-shadow, none);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-height: 47px; /* Typical Elementor text input height */
    transition: border-color 0.3s, background-color 0.3s;
}

/* Ensure the wrapper doesn't break form layout */
.elementor-form .elementor-field-group .elementor-select-wrapper {
    display: block;
}

.angie-custom-select-trigger.is-placeholder {
    color: #7A7A7A;
}

.angie-custom-select-trigger::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    /* Arrow matching the text color #7A7A7A */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%237A7A7A%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-size: contain;
    transition: transform 0.3s ease;
}

.angie-custom-select-wrapper.open .angie-custom-select-trigger::after {
    transform: translateY(-50%) rotate(180deg);
}

.angie-custom-select-options {
    position: absolute;
    display: none;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background-color: var(--e-global-color-94a960e, #000000);
    border-radius: 20px; /* Match form rounding */
    z-index: 999;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.angie-custom-select-wrapper.open .angie-custom-select-options {
    display: block;
}

.angie-custom-select-option {
    padding: 12px 16px;
    color: #7A7A7A;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

/* Ensure first option inherits rounding */
.angie-custom-select-option:first-child {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* Ensure last option inherits rounding */
.angie-custom-select-option:last-child {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.angie-custom-select-option:hover,
.angie-custom-select-option.selected {
    background-color: var(--e-global-color-primary, #133DC7); /* Primary color */
    color: #ffffff; /* White text on hover */
}

/* Hide native Elementor select completely */
.angie-hidden-select {
    display: none !important;
}
