/* ==========================================================================
   EVANBattery Footer Module Styles
   Companion to footer.php — zero inline styles in the template.
   ========================================================================== */

/* --------------------------------------------------------------------------
   WhatsApp Chat Panel
   -------------------------------------------------------------------------- */
.wa-panel {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 48px);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.96);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f8fafc;
}

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

/* Header */
.wa-panel-header {
    background: #075e54;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.wa-panel-avatar {
    width: 42px;
    height: 42px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wa-panel-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.wa-panel-close-btn:hover {
    opacity: 1;
}

/* Body */
.wa-panel-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    max-height: 420px;
}

.wa-panel-bubble {
    background: #ffffff;
    padding: 14px 18px;
    border-radius: 2px 14px 14px 14px;
    margin-bottom: 20px;
    color: #334155;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
}

.wa-panel-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -6px;
    width: 0;
    height: 0;
    border-top: 6px solid #ffffff;
    border-left: 6px solid transparent;
}

/* Form */
.wa-panel-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wa-panel-field {
    position: relative;
}

.wa-panel-input,
.wa-panel-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
    color: #334155;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.wa-panel-input:focus,
.wa-panel-textarea:focus {
    border-color: #3B9797;
    box-shadow: 0 0 0 3px rgba(59, 151, 151, 0.12);
}

.wa-panel-input::placeholder,
.wa-panel-textarea::placeholder {
    color: #94a3b8;
}

.wa-panel-textarea {
    min-height: 80px;
    resize: vertical;
}

.wa-panel-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: #ffffff;
    border: none;
    padding: 14px 24px;
    border-radius: 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 4px;
}

.wa-panel-submit:hover {
    background: #20b858;
}

.wa-panel-submit:active {
    transform: scale(0.97);
}

/* Footer */
.wa-panel-footer {
    padding: 12px 20px;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wa-panel-online-dot {
    width: 8px;
    height: 8px;
    background: #25D366;
    border-radius: 50%;
    animation: wa-pulse 2s ease-in-out infinite;
}

@keyframes wa-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.wa-panel-online-text {
    color: #25D366;
    font-weight: 600;
    font-size: 11px;
}

.wa-panel-divider {
    color: #cbd5e1;
    font-size: 11px;
    margin: 0 2px;
}

.wa-panel-footer-logo {
    display: block;
}

/* --------------------------------------------------------------------------
   Floating Action Buttons
   -------------------------------------------------------------------------- */
.wa-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s, opacity 0.3s, visibility 0.3s, box-shadow 0.2s;
}

.wa-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}

.wa-fab:active {
    transform: scale(0.95);
}

/* Back to Top */
.wa-fab-top {
    width: 48px;
    height: 48px;
    background: #132440;
    color: #ffffff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
}

.wa-fab-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wa-fab-top:hover {
    background: #1a3050;
    transform: translateY(0) scale(1.08);
}

/* WhatsApp FAB */
.wa-fab-whatsapp {
    width: 56px;
    height: 56px;
    background: #25D366;
}

.wa-fab-whatsapp:hover {
    background: #20b858;
}

/* --------------------------------------------------------------------------
   Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .wa-panel {
        bottom: 80px;
        right: 12px;
        width: calc(100vw - 24px);
        max-width: none;
        border-radius: 12px;
    }

    .wa-panel-body {
        padding: 16px;
        max-height: 360px;
    }

    .wa-panel-header {
        padding: 14px 16px;
    }
}
