/**
 * ============================================
 * VENDEDOR INFO WIDGET - Modern UX Design
 * ============================================
 * Using Comercial AV CSS Variables
 */

/* ==========================================
   CSS VARIABLES (inherit from theme)
   ========================================== */
:root {
    --vi-primary: #1e3a76;
    --vi-secondary: #4b7bec;
    --vi-accent: #6ab9f0;
    --vi-light: #a1daf7;
    --vi-lightest: #f5f9ff;
    --vi-dark: #232f3e;
    --vi-white: #ffffff;
    --vi-shadow: 0 10px 40px rgba(30, 58, 118, 0.2);
    --vi-shadow-hover: 0 15px 50px rgba(30, 58, 118, 0.3);
    --vi-radius: 16px;
    --vi-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   FLOATING ACTION BUTTON (FAB)
   ========================================== */
.vendedor-info-btn {
    position: fixed;
    bottom: 15px;
    right: 120px;
    z-index: 9998;

    /* Gradient Background */
    background: linear-gradient(135deg, var(--vi-secondary) 0%, var(--vi-primary) 100%);
    color: var(--vi-white) !important;

    /* Sizing */
    padding: 14px 24px;
    min-height: 52px;

    /* Typography */
    font-family: 'LemonMilk', 'Roboto', sans-serif;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    text-transform: none !important;

    /* Shape */
    border: none !important;
    border-radius: 26px !important;

    /* Effects */
    box-shadow: var(--vi-shadow);
    cursor: pointer;

    /* Flex */
    display: inline-flex;
    align-items: center;
    gap: 10px;

    /* Animation */
    transition: all var(--vi-transition);
    animation: vi-pulse 2.5s ease-in-out infinite;
}

.vendedor-info-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--vi-shadow-hover);
    animation: none;
    background: linear-gradient(135deg, var(--vi-primary) 0%, var(--vi-secondary) 100%);
}

.vendedor-info-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.vendedor-info-btn i,
.vendedor-info-btn svg {
    font-size: 18px;
}

@keyframes vi-pulse {

    0%,
    100% {
        box-shadow: var(--vi-shadow), 0 0 0 0 rgba(75, 123, 236, 0.4);
    }

    50% {
        box-shadow: var(--vi-shadow), 0 0 0 12px rgba(75, 123, 236, 0);
    }
}

/* ==========================================
   WIDGET CARD - Glass Morphism Style
   ========================================== */
.vendedor-info-widget {
    position: fixed !important;
    bottom: 24px;
    right: 24px;
    z-index: 9999;

    /* Size */
    width: 340px;
    max-width: calc(100vw - 48px);

    /* Glass Effect */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    /* Shape */
    border-radius: var(--vi-radius) !important;
    border: 1px solid rgba(255, 255, 255, 0.8);

    /* Shadow */
    box-shadow:
        0 25px 50px -12px rgba(30, 58, 118, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;

    /* Padding */
    padding: 0 !important;
    overflow: hidden;

    /* Animation */
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.3s ease;
}

.vendedor-info-widget.show {
    transform: translateY(0);
    opacity: 1;
}

.vendedor-info-widget.hide {
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
}

/* ==========================================
   HEADER SECTION
   ========================================== */
.vendedor-info-widget .panel-heading {
    background: linear-gradient(135deg, var(--vi-secondary) 0%, var(--vi-primary) 100%);
    padding: 16px 20px;
    margin: 0 !important;
    position: relative;
}

.vendedor-info-widget .panel-heading h3 {
    color: var(--vi-white) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    text-transform: none !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vendedor-info-widget .panel-heading h3 i {
    font-size: 14px;
    opacity: 0.8;
}

/* Close Button */
.vendedor-info-widget .close-btn {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);

    width: 32px;
    height: 32px;

    background: rgba(255, 255, 255, 0.15);
    border: none !important;
    border-radius: 50%;

    color: var(--vi-white);
    font-size: 20px;
    line-height: 32px;
    text-align: center;

    cursor: pointer;
    transition: all var(--vi-transition);
}

.vendedor-info-widget .close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) rotate(90deg);
}

/* ==========================================
   BODY SECTION
   ========================================== */
.vendedor-info-widget .panel-body {
    padding: 24px;
}

.vendedor-info-widget .panel-body .row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Avatar */
.vendedor-info-widget .img-circle,
.vendedor-info-widget .img-responsive {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;

    /* Ring effect */
    border: 4px solid var(--vi-white);
    box-shadow:
        0 0 0 3px var(--vi-secondary),
        0 8px 24px rgba(30, 58, 118, 0.15);

    margin: 0 auto 16px;
    display: block;
}

/* Contact Info */
.vendedor-info-widget .contact-info {
    width: 100%;
    text-align: center;
}

.vendedor-info-widget .contact-info h4 {
    color: var(--vi-dark) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 0 16px 0 !important;
    text-transform: none !important;
}

.vendedor-info-widget .contact-info p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    color: #64748b;
    font-size: 13px;
    margin: 0 0 10px 0;
    padding: 10px 16px;

    background: var(--vi-lightest);
    border-radius: 10px;
}

.vendedor-info-widget .contact-info p i,
.vendedor-info-widget .contact-info p svg {
    color: var(--vi-secondary);
    font-size: 16px;
    flex-shrink: 0;
}

.vendedor-info-widget .contact-info p span,
.vendedor-info-widget .contact-info p em {
    font-style: normal !important;
    font-weight: 500;
}

/* ==========================================
   BUTTONS
   ========================================== */
.vendedor-info-widget .btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}

.vendedor-info-widget .btn-group .btn {
    width: 100%;
    padding: 14px 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    transition: all var(--vi-transition);
    text-transform: none !important;
    letter-spacing: 0.3px;
}

/* Primary Button (Email) */
.vendedor-info-widget .btn-primary {
    background: linear-gradient(135deg, var(--vi-secondary) 0%, var(--vi-primary) 100%) !important;
    border: none !important;
    color: var(--vi-white) !important;
    box-shadow: 0 4px 15px rgba(75, 123, 236, 0.3);
}

.vendedor-info-widget .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(75, 123, 236, 0.4) !important;
    background: linear-gradient(135deg, var(--vi-primary) 0%, var(--vi-secondary) 100%) !important;
}

/* Secondary Button (Call) */
.vendedor-info-widget .btn-secondary,
.vendedor-info-widget .btn-group .btn.btn-secondary,
.vendedor-info-widget button.btn-secondary {
    background: transparent !important;
    border: 2px solid var(--vi-secondary) !important;
    color: var(--vi-secondary) !important;
    cursor: pointer;
}

.vendedor-info-widget .btn-secondary:hover,
.vendedor-info-widget .btn-secondary:focus,
.vendedor-info-widget .btn-group .btn.btn-secondary:hover,
.vendedor-info-widget button.btn-secondary:hover {
    background: var(--vi-secondary) !important;
    background-color: var(--vi-secondary) !important;
    color: var(--vi-white) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(75, 123, 236, 0.35) !important;
    border-color: var(--vi-secondary) !important;
}

/* Message Alert */
#vendedor-info-message {
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 12px !important;
    margin-bottom: 12px !important;
    text-align: center;
}

#vendedor-info-message.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #10b981;
    color: #065f46;
}

#vendedor-info-message.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #ef4444;
    color: #991b1b;
}

/* ==========================================
   MOBILE RESPONSIVE
   ========================================== */
@media (max-width: 767px) {
    .vendedor-info-btn {
        width: 56px;
        height: 56px;
        padding: 0 !important;
        border-radius: 50% !important;
        justify-content: center;
        bottom: 16px;
        right: 16px;
    }

    .vendedor-info-btn span {
        display: none;
    }

    .vendedor-info-btn i,
    .vendedor-info-btn svg {
        font-size: 22px;
        margin: 0 !important;
    }

    .vendedor-info-widget {
        width: calc(100vw - 32px);
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-height: 85vh;
        overflow-y: auto;
    }

    .vendedor-info-widget .img-circle,
    .vendedor-info-widget .img-responsive {
        width: 80px;
        height: 80px;
    }

    .vendedor-info-widget .contact-info h4 {
        font-size: 16px !important;
    }

    .vendedor-info-widget .panel-body {
        padding: 20px;
    }
}

/* ==========================================
   TABLET RESPONSIVE
   ========================================== */
@media (min-width: 768px) and (max-width: 1024px) {
    .vendedor-info-btn {
        width: 60px;
        height: 60px;
        padding: 0 !important;
        border-radius: 50% !important;
        justify-content: center;
    }

    .vendedor-info-btn span {
        display: none;
    }

    .vendedor-info-btn i,
    .vendedor-info-btn svg {
        font-size: 24px;
        margin: 0 !important;
    }

    .vendedor-info-widget {
        width: 320px;
    }
}

/* ==========================================
   DARK MODE SUPPORT (Future)
   ========================================== */
@media (prefers-color-scheme: dark) {
    .vendedor-info-widget {
        background: rgba(30, 41, 59, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .vendedor-info-widget .contact-info h4 {
        color: #f1f5f9 !important;
    }

    .vendedor-info-widget .contact-info p {
        background: rgba(255, 255, 255, 0.05);
        color: #94a3b8;
    }
}