﻿
@import url('https://fonts.googleapis.com/css?family=Numans');

/* ========================================
   LOGIN EN CARRITO - ESTILOS MEJORADOS
   ======================================== */

/* Estilos para el modal de login en carrito */
#modal-login .modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#modal-login .modal-header {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border-bottom: none;
    border-radius: 15px 15px 0 0;
    padding: 1.5rem;
}

#modal-login .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

#modal-login .modal-body {
    padding: 2rem;
    background: #f8f9fa;
}

/* Estilos para los campos de input */
#modal-login .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

#modal-login .input-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#modal-login .input-group:focus-within {
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    transform: translateY(-1px);
}

#modal-login .input-group-text {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    min-width: 50px;
    justify-content: center;
    font-size: 1rem;
}

#modal-login .form-control {
    border: none;
    background: white;
    color: #495057;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#modal-login .form-control:focus {
    background: white;
    color: #495057;
    box-shadow: none;
    border: none;
}

#modal-login .form-control::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

/* Estilos para el checkbox */
#modal-login .form-check {
    margin: 1.5rem 0;
}

#modal-login .form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    border: 2px solid #4CAF50;
    border-radius: 4px;
}

#modal-login .form-check-input:checked {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

#modal-login .form-check-label {
    color: #495057;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Contenedor de botones */
#modal-login .d-flex.justify-content-center.gap-2 {
    display: flex !important;
    justify-content: center !important;
    gap: 1rem !important;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

/* Estilos para los botones */
#modal-login .btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    width: 200px !important;
    min-width: 200px !important;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

#modal-login .btn-primary:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

#modal-login .btn-primary:active {
    transform: translateY(0);
}

/* Estilos para el botón de Google */
#modal-login .g_id_signin {
    width: 200px !important;
    min-width: 200px !important;
    height: 48px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
}

#modal-login .g_id_signin:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25) !important;
}

/* Estilos para las alertas de login */
#modal-login .alert {
    border: none;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-weight: 500;
    animation: slideInDown 0.3s ease-out;
}

#modal-login .alert-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-left: 4px solid #FFD700;
}

#modal-login .alert-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-left: 4px solid #FFD700;
}

#modal-login .alert i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* Animación para las alertas */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mejoras en el formulario */
#modal-login .form-control:invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

#modal-login .form-control:valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Loading state mejorado */
#modal-login .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#modal-login .btn-primary .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#modal-login .g_id_signin:active {
    transform: translateY(0) !important;
}

/* Asegurar que el botón de Google tenga el mismo estilo que el botón principal */
#modal-login .g_id_signin > div {
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Forzar el ancho del contenido interno de Google */
#modal-login .g_id_signin > div > div {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
}

/* Estilos para el separador */
#modal-login hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
    margin: 2rem 0;
}

/* Estilos para los enlaces */
#modal-login .text-center a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

#modal-login .text-center a:hover {
    color: #45a049;
    text-decoration: underline;
}

/* Estilos para las alertas */
#modal-login .alert-info {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: none;
    border-radius: 8px;
    color: #1565c0;
    border-left: 4px solid #2196f3;
}

#modal-login .text-chilli {
    color: #dc3545;
    font-weight: 500;
}

/* Estilos para el botón de toggle de contraseña */
#modal-login .password-toggle-btn {
    background: transparent;
    border: none;
    color: #6c757d;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

#modal-login .password-toggle-btn:hover {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

#modal-login .password-toggle-btn.showing {
    color: #4CAF50;
}

/* Responsive */
@media (max-width: 576px) {
    #modal-login .modal-body {
        padding: 1.5rem;
    }
    
    #modal-login .btn-primary,
    #modal-login .g_id_signin {
        width: calc(100% - 2rem) !important;
        min-width: calc(100% - 2rem) !important;
        max-width: calc(100% - 2rem) !important;
        height: 48px;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    #modal-login .d-flex.justify-content-center.gap-2 {
        flex-direction: column;
        align-items: center;
        gap: 1rem !important;
        width: 100%;
        padding: 0 1rem;
    }
    
    /* Forzar el ancho completo en móviles para Google */
    #modal-login .g_id_signin > div {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
    
    #modal-login .g_id_signin > div > div {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        justify-content: center !important;
    }
}

/* Mantener estilos legacy para compatibilidad */
.card-custom {
    height: 370px;
    margin-top: auto;
    margin-bottom: auto;
    width: 400px;
    background-color: rgba(0,0,0,0.5) !important;
}

.social_icon_custom span {
    font-size: 60px;
    margin-left: 10px;
    color: var(--color-chilli);
}

.social_icon_custom span:hover {
    color: white;
    cursor: pointer;
}

.card-header-custom h3 {
    color: white;
}

.social_icon_custom {
    position: absolute;
    right: 20px;
    top: -45px;
}

.input-group-prepend-custom span {
    width: 50px;
    background-color: var(--color-chilli);
    color: black;
    border: 0 !important;
}

.remember-custom {
    color: white;
}

.remember-custom input {
    width: 20px;
    height: 20px;
    margin-left: 15px;
    margin-right: 5px;
}

.login_btn_custom {
    color: black;
    background-color: var(--color-chilli);
    width: 100px;
}

.login_btn_custom:hover {
    color: black;
    background-color: white;
}

.links-custom {
    color: white;
}

.links-custom a {
    margin-left: 4px;
}
