/* Estilos para el captcha personalizado */
.captcha-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    width: 100%;
}

#captcha-image {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    background-color: #f8f9fa;
    max-height: 80px; /* Aumentado a 80px para hacer el captcha más grande */
    min-width: 200px; /* Ancho mínimo para asegurar que las letras sean visibles */
    width: auto;
    flex-grow: 1; /* Permite que la imagen crezca para ocupar el espacio disponible */
}

#refresh-captcha {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto; /* Reducir el ancho del botón */
    padding-left: 10px;
    padding-right: 10px;
    margin-left: 10px;
    white-space: nowrap; /* Evita que el texto se rompa en múltiples líneas */
    min-width: 200px;
}

input[name="captcha"] {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input[name="captcha"].is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Media queries para responsividad */
@media (max-width: 576px) {
    .captcha-container {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    #captcha-image {
        margin-bottom: 10px;
        max-width: 100%;
        max-height: 100px; /* Aumentar aún más la altura en móviles */
        width: 100%; /* Ocupar todo el ancho disponible */
    }
    
    #refresh-captcha {
        margin-left: 0;
        margin-bottom: 10px;
        width: 100%; /* Ocupar todo el ancho disponible */
    }
    
    input[name="captcha"] {
        width: 100%;
        font-size: 16px; /* Tamaño de fuente más grande para móviles */
    }
}