/* Explain: Styles for the floating WhatsApp chat widget. */
/* Floating WhatsApp chat widget shown on every page. */

.wa-widget {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.wa-toggle {
    display: inline-flex;
    height: 3.5rem;
    width: 3.5rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #25D366;
    color: #ffffff;
    font-size: 1.8rem;
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.42);
    transition: transform 250ms ease, background 250ms ease, box-shadow 250ms ease;
}

.wa-toggle:hover {
    background: #1DA851;
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(37, 211, 102, 0.5);
}

.wa-toggle i {
    line-height: 1;
}

.wa-panel {
    width: min(20rem, calc(100vw - 2.5rem));
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 1.35rem;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(20, 23, 28, 0.24);
    animation: waIn 220ms ease;
}

.wa-panel[hidden] {
    display: none;
}

@keyframes waIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wa-panel-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: #25D366;
    padding: 0.9rem 1rem;
    color: #ffffff;
}

.wa-panel-avatar {
    display: grid;
    height: 2.5rem;
    width: 2.5rem;
    flex-shrink: 0;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 1.35rem;
}

.wa-panel-title {
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.2;
}

.wa-panel-sub {
    margin-top: 0.1rem;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.88);
}

.wa-panel-close {
    display: inline-flex;
    height: 2rem;
    width: 2rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transition: background 250ms ease;
}

.wa-panel-close:hover {
    background: rgba(255, 255, 255, 0.34);
}

.wa-panel-text {
    padding: 1rem 1rem 0.35rem;
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.7;
}

.wa-panel-note {
    padding: 0 1rem 0.85rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.6;
}

.wa-start {
    display: flex;
    min-height: 2.9rem;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 1rem 1rem;
    border-radius: 999px;
    background: #25D366;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    transition: background 250ms ease;
}

.wa-start:hover {
    background: #1DA851;
    color: #ffffff;
}

@media (max-width: 639px) {
    .wa-widget {
        right: 1rem;
        bottom: 1rem;
    }

    .wa-toggle {
        height: 3.25rem;
        width: 3.25rem;
        font-size: 1.6rem;
    }
}