/*
 * Estilos del widget Asesor Flotante de KlaroPOS (v2.0 Paleta Clara)
 */

.k-advisor-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99999;
    font-family: 'Inter', sans-serif;
}

/* Botón disparador - Mantenemos el naranja cálido */
.k-advisor-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--wp--preset--color--accent, #F97316);
    color: #ffffff;
    border: none;
    padding: 14px 22px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Outfit', sans-serif;
}

.k-advisor-trigger:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.45);
}

.k-trigger-icon {
    font-size: 1.2rem;
}

/* Ventana Modal emergente - Blanco y Elegante */
.k-advisor-modal {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 340px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
    padding: 24px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    visibility: visible;
}

.k-advisor-modal.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    visibility: hidden;
}

/* Cabecera de la ventana */
.k-advisor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.k-advisor-header h4 {
    margin: 0;
    font-size: 18px;
    color: #0F172A;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

#k-advisor-close {
    background: transparent;
    border: none;
    color: #64748B;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

#k-advisor-close:hover {
    color: #0F172A;
}

.k-advisor-subtitle {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 13px;
    color: #64748B;
    line-height: 1.5;
}

/* Campos del Formulario */
.k-form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.k-form-group label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}

.k-form-group input,
.k-form-group select {
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    padding: 10px 14px;
    color: #0F172A;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.k-form-group input:focus,
.k-form-group select:focus {
    border-color: var(--wp--preset--color--primary, #1E40AF);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.k-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 32px;
}

/* Botón Enviar - Azul Tecnológico */
.k-btn-submit {
    width: 100%;
    background: var(--wp--preset--color--primary, #1E40AF);
    color: #FFFFFF;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.k-btn-submit:hover {
    background: #1D4ED8;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

.k-btn-submit:active {
    transform: scale(0.98);
}

/* Mensajes de Feedback */
.k-advisor-msg {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    display: none;
    font-weight: 500;
}

.k-advisor-msg.success {
    display: block;
    background: #ECFDF5;
    border: 1px solid #10B981;
    color: #065F46;
}

.k-advisor-msg.error {
    display: block;
    background: #FEF2F2;
    border: 1px solid #EF4444;
    color: #991B1B;
}

/* Estado de carga */
.k-btn-submit:disabled {
    background: #E2E8F0;
    color: #94A3B8;
    cursor: not-allowed;
    box-shadow: none;
}

/* Ajustes Responsive / Mobile */
@media (max-width: 767px) {
    .k-advisor-container {
        bottom: 15px;
        right: 15px;
    }

    .k-advisor-trigger {
        padding: 8px 12px;
        font-size: 13px;
        gap: 4px;
        box-shadow: 0 6px 18px rgba(249, 115, 22, 0.25);
    }

    .k-trigger-icon {
        font-size: 1.1rem;
    }

    /* En móviles pequeños transformamos el botón en un círculo discreto (estilo chat) sin texto */
    @media (max-width: 480px) {
        .k-advisor-trigger {
            padding: 0;
            width: 46px;
            height: 46px;
            border-radius: 50%;
            justify-content: center;
            align-items: center;
            box-shadow: 0 6px 15px rgba(249, 115, 22, 0.35);
        }
        .k-trigger-text {
            display: none;
        }
        .k-trigger-icon {
            font-size: 1.25rem;
            margin: 0;
        }
    }

    .k-advisor-modal {
        width: calc(100vw - 30px);
        max-width: 340px;
        bottom: 58px;
        right: 0;
        padding: 20px;
    }
}

