/* ===================================
   WhatsApp Widget Styles
   NimkarGuruji - Enhanced WhatsApp Widget
   Compact & Professional Design
   =================================== */

/* ===== WIDGET CONTAINER ===== */
.wa-widget-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 2147483646; /* Maximum to stay above cookie consent banners */
    font-family: var(--font-primary);
}

/* ===== FLOATING BUTTON ===== */
.wa-floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    position: relative;
    transition: all 0.3s ease;
}

.wa-floating-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

.wa-floating-btn.active {
    transform: scale(0.95);
    background: #128c7e;
}

.wa-btn-icon {
    font-size: 26px;
    color: white;
    z-index: 2;
}

.wa-btn-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.4);
    animation: waPulse 2s infinite;
}

@keyframes waPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.wa-floating-btn.active .wa-btn-pulse {
    display: none;
}

/* ===== WIDGET PANEL - COMPACT ===== */
.wa-widget-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    max-height: 450px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wa-widget-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* ===== WIDGET HEADER - COMPACT ===== */
.wa-widget-header {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    flex-shrink: 0;
}

.wa-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wa-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.wa-header-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.wa-header-info p {
    margin: 2px 0 0;
    font-size: 11px;
    opacity: 0.9;
}

.wa-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
}

.wa-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== WIDGET CONTENT - SCROLLABLE ===== */
.wa-widget-content {
    padding: 14px;
    overflow-y: auto;
    flex: 1;
    max-height: 320px;
}

/* ===== INFO SECTION - COMPACT ===== */
.wa-info-section {
    margin-bottom: 14px;
}

.wa-info-section h5,
.wa-faq-section h5,
.wa-form-section h5 {
    font-size: 12px;
    color: var(--dark);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.wa-info-section h5 i,
.wa-faq-section h5 i,
.wa-form-section h5 i {
    color: #25d366;
    font-size: 12px;
}

.wa-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px 12px;
}

.wa-info-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #555;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.wa-info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.wa-info-list li:first-child {
    padding-top: 0;
}

.wa-info-list li i {
    color: #25d366;
    width: 14px;
    font-size: 11px;
}

/* ===== FAQ SECTION - COMPACT ===== */
.wa-faq-section {
    margin-bottom: 14px;
}

.wa-faq-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wa-faq-item {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.wa-faq-q {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.wa-faq-q::after {
    content: '+';
    font-size: 16px;
    color: #25d366;
    transition: transform 0.2s ease;
    font-weight: 400;
}

.wa-faq-item.active .wa-faq-q::after {
    transform: rotate(45deg);
}

.wa-faq-q:hover {
    background: rgba(37, 211, 102, 0.08);
}

.wa-faq-a {
    padding: 0 12px;
    max-height: 0;
    overflow: hidden;
    font-size: 11px;
    color: #666;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.wa-faq-item.active .wa-faq-a {
    padding: 0 12px 10px;
    max-height: 80px;
}

/* ===== FORM SECTION - COMPACT ===== */
.wa-form-section {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.08) 0%, rgba(18, 140, 126, 0.05) 100%);
    margin: -14px;
    margin-top: 0;
    padding: 14px;
    border-top: 1px solid rgba(37, 211, 102, 0.15);
}

.wa-lead-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wa-form-group {
    position: relative;
}

.wa-form-group input,
.wa-form-group select {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
}

.wa-form-group input:focus,
.wa-form-group select:focus {
    border-color: #25d366;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.wa-form-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 13px;
    transition: color 0.2s ease;
}

.wa-form-group input:focus + i,
.wa-form-group select:focus + i {
    color: #25d366;
}

.wa-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.wa-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.wa-submit-btn i {
    font-size: 16px;
}

.wa-privacy-note {
    text-align: center;
    font-size: 10px;
    color: #888;
    margin: 6px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.wa-privacy-note i {
    font-size: 9px;
}

/* ===== WIDGET FOOTER - COMPACT ===== */
.wa-widget-footer {
    padding: 10px 14px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    text-align: center;
    flex-shrink: 0;
}

.wa-footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.wa-footer-link:hover {
    color: #25d366;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .wa-widget-container {
        bottom: 20px;
        right: 15px;
    }

    .wa-floating-btn {
        width: 52px;
        height: 52px;
    }

    .wa-btn-icon {
        font-size: 24px;
    }

    .wa-widget-panel {
        width: 300px;
        max-height: 420px;
        right: 0;
        bottom: 65px;
    }
}

@media (max-width: 480px) {
    .wa-widget-container {
        bottom: 15px;
        right: 12px;
    }

    .wa-floating-btn {
        width: 50px;
        height: 50px;
    }

    .wa-widget-panel {
        width: calc(100vw - 24px);
        max-width: 320px;
        max-height: 380px;
    }

    .wa-widget-header {
        padding: 12px 14px;
    }

    .wa-avatar {
        width: 36px;
        height: 36px;
    }

    .wa-widget-content {
        padding: 12px;
        max-height: 260px;
    }

    .wa-form-section {
        margin: -12px;
        margin-top: 0;
        padding: 12px;
    }
}

/* ===== HIDE ORIGINAL FLOATING BUTTONS WHEN WIDGET EXISTS ===== */
.floating-contacts {
    bottom: 90px;
}

.floating-contacts .whatsapp-btn {
    display: none;
}

/* ===== ENSURE WIDGET STAYS ABOVE COOKIE CONSENT BANNERS ===== */
/* Vedatricks cookie consent banner pushes widget up */
.vt-consent-banner ~ .wa-widget-container,
body.vt-consent-visible .wa-widget-container {
    bottom: 90px;
}

@media (max-width: 768px) {
    .vt-consent-banner ~ .wa-widget-container,
    body.vt-consent-visible .wa-widget-container {
        bottom: 85px;
    }
}
