/**
 * Chile Checkout - Blue Express Styles
 */

.cl-shipping-options-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 40px !important;
    flex-wrap: nowrap !important;
    padding: 15px 20px !important;
    background: #f8f8f8 !important;
    border: 1px solid #e2e2e2 !important;
    border-radius: 8px !important;
    margin-bottom: 25px !important;
    max-width: 100% !important;
}

.cl-shipping-options-container .cl-shipping-option {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer;
    white-space: nowrap !important;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.cl-shipping-options-container .cl-shipping-option:hover {
    background-color: #e8e8e8;
}

.cl-shipping-options-container .cl-shipping-option input[type="radio"] {
    margin: 0 !important;
    cursor: pointer;
    width: 18px !important;
    height: 18px !important;
}

.cl-shipping-options-container .cl-shipping-option label {
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    color: #333;
    margin: 0 !important;
}

#cl-blue-express-link-container {
    margin-bottom: 15px;
}

#billing_city_field label,
#shipping_city_field label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.cl-blue-express-inline-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    vertical-align: middle;
}

.cl-blue-express-inline-wrapper .cl-blue-express-inline-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0070a8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 10px;
    background: #e7f1f8;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cl-blue-express-inline-wrapper .cl-blue-express-inline-link:hover {
    background: #d0e5f5;
    text-decoration: underline;
}

.cl-blue-express-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Fila del label + enlace para el campo dedicado */
.cl-blue-express-label-row {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.cl-blue-express-label-row .cl-blue-express-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #0070a8;
    text-decoration: none;
    font-weight: 500;
}

.cl-blue-express-label-row .cl-blue-express-link:hover {
    text-decoration: underline;
}

/* Tag/Etiquette styles */
.cl-blue-express-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #e7f1f8;
    border: 1px solid #0070a8;
    border-radius: 20px;
    font-size: 14px;
    color: #0070a8;
    margin-top: 5px;
    max-width: 100%;
}

.cl-blue-express-tag-text {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cl-blue-express-tag-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #0070a8;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.cl-blue-express-tag-close:hover {
    background: #0070a8;
    color: white;
}

/* Input del punto Blue Express - forzar ancho completo */
#cl_blue_express_point_dedicated.input-text {
    width: 100% !important;
    max-width: 100% !important;
}

.cl-blue-express-validation {
    display: none;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 8px;
    align-items: center;
    gap: 6px;
}

.cl-blue-express-validation.valid {
    display: flex;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.cl-blue-express-validation.warning {
    display: flex;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.cl-blue-express-validation.error {
    display: flex;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.cl-blue-express-validation .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.cl-blue-express-suggestion {
    display: none;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #0070a8;
    border-radius: 4px;
    margin-top: 8px;
}

.cl-suggestion-item:hover {
    background: #e7f1f8 !important;
}

.cl-blue-express-suggestions-wrapper {
    position: relative;
    margin-top: 8px;
    width: 100%;
}

.cl-blue-express-suggestions {
    width: 100%;
    max-width: 100%;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #0070a8;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}

.cl-blue-express-suggestions option {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.cl-blue-express-suggestions option:hover {
    background: #e8f4fc;
}

.cl-blue-express-suggestions option:checked {
    background: #0070a8;
    color: #fff;
}

.cl-blue-express-suggestions::-webkit-scrollbar {
    width: 8px;
}

.cl-blue-express-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cl-blue-express-suggestions::-webkit-scrollbar-thumb {
    background: #0070a8;
    border-radius: 4px;
}

.cl-blue-express-suggestions {
    scrollbar-width: thin;
    scrollbar-color: #0070a8 #f1f1f1;
}

@media (max-width: 600px) {
    .cl-shipping-options-container {
        flex-direction: column !important;
        gap: 15px !important;
        flex-wrap: wrap !important;
    }
    
    .cl-shipping-options-container .cl-shipping-option {
        justify-content: center;
    }
}

#cl_blue_express_point_field {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f8f8;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
}

#cl_blue_express_point_field label {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

#cl_blue_express_point_field .cl-blue-express-inline-wrapper {
    display: inline-flex;
    margin-left: 10px;
    vertical-align: middle;
}

#cl_blue_express_point_field .woocommerce-input-wrapper {
    display: block;
    margin-top: 10px;
}

/* ============================================================
   Campos del componente dedicado Blue Express
   (Sustituyen estilos inline previamente embebidos en el JS)
   ============================================================ */

/* Input de búsqueda de punto — ancho completo sin !important */
.cl-blue-express-dedicated-field .input-text {
    width: 100%;
    max-width: 100%;
    margin-top: 5px;
    display: block;
}

/* Wrapper de validación / sugerencias: hereda estilos base existentes */
.cl-blue-express-dedicated-field .cl-blue-express-suggestions-wrapper[aria-describedby],
.cl-blue-express-dedicated-field .cl-blue-express-validation[aria-describedby] {
    /* No se requiere estilo adicional — usa las clases base ya definidas */
}
