.hswa-widget,
.hswa-widget * {
    box-sizing: border-box;
}

.hswa-widget {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 999999;
    font-family: Inter, Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
}

/* Desktop placement: fixed to the real bottom-left corner */
@media (min-width: 769px) {
    .hswa-widget {
        left: 24px;
        bottom: 24px;
    }
}


.hswa-widget.hswa-position-right {
    left: auto;
    right: 24px;
}

.hswa-widget.hswa-position-right .hswa-floating-actions {
    align-items: flex-end;
}

.hswa-widget.hswa-position-right .hswa-box {
    left: auto;
    right: 0;
}

.hswa-floating-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.hswa-float,
.hswa-top-button {
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(255,255,255,.26), rgba(255,255,255,0) 38%),
        linear-gradient(135deg, #1fd66e 0%, #0aa36f 48%, #075e54 100%);
    box-shadow:
        0 14px 30px rgba(7, 94, 84, .32),
        0 0 0 1px rgba(255,255,255,.22) inset,
        0 0 0 6px rgba(37, 211, 102, .10);
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    transition: all .28s ease;
    padding: 0;
}

.hswa-float::before,
.hswa-top-button::before {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    top: -65px;
    left: -38px;
    background: rgba(255,255,255,.36);
    transform: rotate(35deg);
    transition: .35s;
}

.hswa-float::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 6px;
    width: 9px;
    height: 9px;
    background: #7cff9b;
    border: 2px solid #075e54;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(124,255,155,.9);
}

.hswa-float:hover,
.hswa-top-button:hover {
    transform: translateY(-3px) scale(1.04);
}

.hswa-float:hover::before,
.hswa-top-button:hover::before {
    top: -30px;
    left: 28px;
}

.hswa-top-button {
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(255,255,255,.24), rgba(255,255,255,0) 38%),
        linear-gradient(135deg, #26364b 0%, #111827 100%);
    box-shadow:
        0 14px 30px rgba(17, 24, 39, .24),
        0 0 0 1px rgba(255,255,255,.18) inset,
        0 0 0 6px rgba(17, 24, 39, .07);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px) scale(.92);
}

.hswa-top-button.hswa-show-top {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.hswa-top-button::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 6px;
    width: 9px;
    height: 9px;
    background: #64f4ff;
    border: 2px solid #111827;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(100,244,255,.85);
}

.hswa-top-icon-wrap {
    position: relative;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255,255,255,.12);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}


.hswa-icon-wrap {
    position: relative;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255,255,255,.13);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.hswa-widget.active .hswa-float,
.hswa-widget.active .hswa-top-button {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(.85);
}

.hswa-box {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 355px;
    max-width: calc(100vw - 28px);
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(.94);
    box-shadow:
        0 25px 70px rgba(0,0,0,.25),
        0 0 0 1px rgba(0,0,0,.05);
    transition: all .35s cubic-bezier(.2,.8,.2,1);
}

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

.hswa-header {
    padding: 17px;
    background:
        radial-gradient(circle at top right, rgba(37,211,102,.35), transparent 35%),
        linear-gradient(135deg, #063b34, #075e54 55%, #128c7e);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hswa-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.hswa-avatar {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    border-radius: 16px;
    background: rgba(255,255,255,.18);
    display: grid;
    place-items: center;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}

.hswa-avatar span {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 12px;
    height: 12px;
    background: #25d366;
    border: 3px solid #075e54;
    border-radius: 50%;
}

.hswa-brand strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.hswa-brand small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255,255,255,.78);
    white-space: nowrap;
}

.hswa-close {
    width: 33px;
    height: 33px;
    flex: 0 0 33px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    font-size: 25px;
    line-height: 29px;
    background: rgba(255,255,255,.14);
    transition: .25s;
    padding: 0;
}

.hswa-close:hover {
    background: rgba(255,255,255,.25);
    transform: rotate(90deg);
}

.hswa-content {
    padding: 17px;
    background:
        linear-gradient(rgba(255,255,255,.88), rgba(255,255,255,.88)),
        radial-gradient(circle at 1px 1px, rgba(7,94,84,.12) 1px, transparent 0);
    background-size: auto, 22px 22px;
}

.hswa-card {
    background: #fff;
    border-radius: 18px;
    padding: 15px;
    color: #111827;
    box-shadow: 0 10px 25px rgba(0,0,0,.07);
    border: 1px solid rgba(0,0,0,.04);
}

.hswa-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
}

.hswa-card .hswa-hi {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
}

.hswa-btn {
    margin-top: 16px;
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    color: #fff !important;
    text-decoration: none;
    background: linear-gradient(135deg, #25d366, #0f9f6e);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(37,211,102,.35);
    transition: .25s;
}

.hswa-btn:hover {
    transform: translateY(-2px);
    color: #fff !important;
    text-decoration: none;
}

.hswa-note {
    margin-top: 13px;
    text-align: center;
    font-size: 12px;
    color: #6b7280;
}

@media (max-width: 768px) {
    .hswa-widget {
        left: 18px;
        bottom: 22px;
    }

    .hswa-widget.hswa-position-right {
        left: auto;
        right: 18px;
    }

    .hswa-box {
        width: 340px;
    }
}

@media (max-width: 600px) {
    .hswa-widget {
        left: 12px;
        bottom: calc(18px + env(safe-area-inset-bottom));
    }

    .hswa-widget.hswa-position-right {
        left: auto;
        right: 12px;
    }

    .hswa-widget.hswa-position-right .hswa-box,
    .hswa-widget.hswa-position-left .hswa-box {
        left: 12px;
        right: 12px;
    }

    .hswa-floating-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .hswa-widget.hswa-position-left .hswa-floating-actions {
        align-items: flex-start;
    }

    .hswa-widget.hswa-position-right .hswa-floating-actions {
        align-items: flex-end;
    }

.hswa-float,
.hswa-top-button {
        width: 46px;
        height: 46px;
        border-radius: 15px;
    }

    .hswa-icon-wrap,
    .hswa-top-icon-wrap {
        width: 31px;
        height: 31px;
        border-radius: 11px;
    }

    .hswa-box {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(14px + env(safe-area-inset-bottom));
        width: auto;
        max-width: none;
        max-height: calc(100dvh - 32px);
        border-radius: 22px;
        transform: translateY(24px) scale(.96);
    }

    .hswa-widget.active .hswa-box {
        transform: translateY(0) scale(1);
    }

    .hswa-header {
        padding: 15px;
    }

    .hswa-avatar {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        border-radius: 15px;
    }

    .hswa-brand {
        gap: 10px;
    }

    .hswa-brand strong {
        font-size: 15px;
    }

    .hswa-brand small {
        font-size: 11.5px;
        white-space: normal;
    }

    .hswa-close {
        width: 31px;
        height: 31px;
        flex-basis: 31px;
        font-size: 24px;
    }

    .hswa-content {
        padding: 15px;
        max-height: calc(100dvh - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .hswa-card {
        padding: 14px;
        border-radius: 16px;
    }

    .hswa-card p {
        font-size: 13.5px;
    }

    .hswa-card .hswa-hi {
        font-size: 15.5px;
    }

    .hswa-btn {
        min-height: 50px;
        border-radius: 15px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .hswa-widget {
        left: 10px;
    }

    .hswa-widget.hswa-position-right {
        left: auto;
        right: 10px;
    }

    .hswa-widget.hswa-position-right .hswa-box,
    .hswa-widget.hswa-position-left .hswa-box,
    .hswa-box {
        left: 10px;
        right: 10px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        border-radius: 20px;
    }

    .hswa-header {
        padding: 13px;
    }

    .hswa-content {
        padding: 13px;
    }

    .hswa-brand strong {
        font-size: 14px;
    }

    .hswa-brand small {
        font-size: 11px;
    }

    .hswa-btn {
        font-size: 13.5px;
    }
}

@media (max-height: 520px) and (max-width: 900px) {
    .hswa-box {
        max-height: calc(100dvh - 20px);
    }

    .hswa-content {
        max-height: calc(100dvh - 100px);
        overflow-y: auto;
    }
}
