/*
 Theme Name:   Hello Elementor Child
 Description:  Hello Elementor Child Theme
 Author:       Elementor Team
 Author URI:   https://elementor.com/
 Template:     hello-elementor
 Version:      1.0.1
 Text Domain:  hello-elementor-child
*/

/* =========================================================================
   OCULTAR BLOQUE DE ENVÍO EXCLUSIVAMENTE EN EL CARRITO
   ========================================================================= */

/* Oculta de raíz la frase "Enviar a CL-RM" */
.woocommerce-cart .woocommerce-shipping-destination,
.woocommerce-cart .shipping-calculator-button-wrapper {
    display: none !important;
}

.woocommerce-message {
    display: none !important;
}


/* 1. Igualar la estructura, fondo y altura a los inputs de Elementor */
#billing_state_field .select2-selection,
#billing_city_field .select2-selection {
    background-color: #fafafa !important; /* Fondo gris ultra claro */
    border: 1px solid #d4d4d4 !important; /* Color de borde de Elementor */
    border-radius: 0px !important; /* Esquinas rectas para igualar a los otros campos */
    height: 47px !important; /* Altura estándar de los formularios de Elementor */
}

/* 2. Igualar el color del texto y centrarlo verticalmente */
#billing_state_field .select2-selection__rendered,
#billing_city_field .select2-selection__rendered {
    color: #495057 !important; /* Color de texto gris oscuro estándar */
    line-height: 45px !important; /* Alineación vertical perfecta para la altura de 47px */
    padding-left: 10px !important; /* Separación desde el borde izquierdo */
}

/* 3. Alinear la flecha para que no quede arriba por el cambio de altura */
#billing_state_field .select2-selection__arrow,
#billing_city_field .select2-selection__arrow {
    height: 45px !important; /* Centra la flecha en la nueva altura */
    right: 5px !important; /* Separación desde el borde derecho */
}

#billing_state_field .select2-selection__arrow b,
#billing_city_field .select2-selection__arrow b {
    border-color: #666666 transparent transparent transparent !important;
}

/* 4. Estilos de la lista desplegable (se mantienen limpios) */
body .select2-container--default .select2-dropdown {
    background-color: #ffffff !important;
    border: 1px solid #d4d4d4 !important;
    border-radius: 0px !important;
}

body .select2-container--default .select2-results__option {
    color: #495057 !important;
    background-color: #ffffff !important;
    padding: 10px !important; /* Darle más respiro a las opciones */
}

body .select2-container--default .select2-results__option--highlighted[aria-selected],
body .select2-container--default .select2-results__option--highlighted[data-selected] {
    background-color: #f0f0f0 !important; /* Gris claro al pasar el mouse, menos agresivo */
    color: #333333 !important; 
}

/* 5. Input del buscador interno */
body .select2-search--dropdown .select2-search__field {
    background-color: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #d4d4d4 !important;
}


/* =========================================================================
   FORZAR OCULTAMIENTO DE "OPCIONAL" Y MOSTRAR ASTERISCO EN TELÉFONO
   ========================================================================= */

/* Quitar la palabra (opcional) en el campo de teléfono */
#billing_phone_field .optional {
    display: none !important;
}

/* Inyectar el asterisco rojo de obligatorio */
#billing_phone_field label::after {
    content: " *" !important;
    color: #e2401c !important;
    font-weight: bold !important;
}