.spexcy-wa {
    --spexcy-wa-ink: #181818;
    --spexcy-wa-muted: #565656;
    --spexcy-wa-border: #d6d6d6;
    --spexcy-wa-surface: #fff;
    font-family: inherit;
}
.spexcy-wa-trigger,
.spexcy-wa-submit {
    border: 1px solid var(--spexcy-wa-ink);
    background: var(--spexcy-wa-ink);
    color: #fff;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    transition: background-color .18s ease, box-shadow .18s ease, translate .18s ease;
}
.spexcy-wa-trigger {
    position: fixed;
    z-index: 1001;
    inset: auto max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) auto;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 6px 24px rgb(0 0 0 / 25%);
}
.spexcy-wa-trigger:hover { translate: 0 -2px; box-shadow: 0 9px 27px rgb(0 0 0 / 30%); }
.spexcy-wa-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 24px;
    height: 22px;
    border: 1.6px solid currentColor;
    border-radius: 8px;
}
.spexcy-wa-mark::after {
    position: absolute;
    bottom: -3px;
    left: 4px;
    width: 6px;
    height: 6px;
    content: "";
    border-bottom: 1.6px solid currentColor;
    border-left: 1.6px solid currentColor;
    background: var(--spexcy-wa-ink);
    transform: skewY(-35deg);
}
.spexcy-wa-mark i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; box-shadow: -5px 0 currentColor, 5px 0 currentColor; }
.spexcy-wa-panel {
    box-sizing: border-box;
    position: fixed;
    inset: auto max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) auto;
    width: min(390px, calc(100vw - 36px));
    max-width: none;
    max-height: calc(100dvh - 36px);
    overflow: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 0;
    background: var(--spexcy-wa-surface);
    color: var(--spexcy-wa-ink);
    border: 1px solid #e3e3e3;
    border-radius: 16px;
    box-shadow: 0 18px 72px rgb(0 0 0 / 28%);
}
.spexcy-wa-panel::backdrop { background: rgb(0 0 0 / 25%); }
.spexcy-wa-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px 13px 20px;
    background: var(--spexcy-wa-ink);
    color: #fff;
}
.spexcy-wa-avatar {
    display: block;
    box-sizing: border-box;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid rgb(255 255 255 / 50%);
    border-radius: 50%;
    background: #333;
    object-fit: cover;
    object-position: center;
}
.spexcy-wa-identity { flex: 1; display: grid; gap: 2px; }
.spexcy-wa-identity h2 { margin: 0; color: #fff; font: inherit; font-size: 17px; font-weight: 650; line-height: 1.24; }
.spexcy-wa-identity span { color: #dedede; font-size: 12px; line-height: 1.3; }
.spexcy-wa-close {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.spexcy-wa-close:hover { background: rgb(255 255 255 / 14%); }
.spexcy-wa-panel form { display: grid; gap: 13px; margin: 0; padding: 18px 20px 20px; }
.spexcy-wa-panel .spexcy-wa-greeting {
    justify-self: start;
    margin: 0 0 1px;
    padding: 8px 12px;
    border-radius: 3px 12px 12px;
    background: #f3f3f3;
    color: var(--spexcy-wa-ink);
    font-size: 14px;
}
.spexcy-wa-panel label { display: grid; gap: 5px; color: var(--spexcy-wa-ink); font-size: 13px; font-weight: 600; }
.spexcy-wa-panel input:not([type=hidden]) {
    box-sizing: border-box;
    width: 100%;
    min-height: 45px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--spexcy-wa-border);
    border-radius: 7px;
    background: #fff;
    color: var(--spexcy-wa-ink);
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
}
.spexcy-wa-panel .spexcy-wa-privacy, .spexcy-wa-error { margin: 1px 0 0; color: var(--spexcy-wa-muted); font-size: 12px; line-height: 1.5; }
.spexcy-wa-panel a { color: inherit; text-decoration: underline; }
.spexcy-wa-panel .spexcy-wa-error { color: #8c1420; }
.spexcy-wa-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-height: 47px;
    padding: 8px 14px;
    border-radius: 7px;
    font-size: 14px;
}
.spexcy-wa-submit:hover { background: #333; }
.spexcy-wa-submit:disabled { opacity: .65; cursor: wait; }
.spexcy-wa :focus-visible { outline: 2px solid #767676; outline-offset: 3px; }
@media (max-width: 480px) {
    .spexcy-wa-panel {
        inset: auto max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) auto;
        width: calc(100vw - max(10px, env(safe-area-inset-right)) - max(10px, env(safe-area-inset-left)));
        max-height: calc(100dvh - 20px);
    }
}
@media (prefers-reduced-motion: reduce) {
    .spexcy-wa-trigger, .spexcy-wa-submit { transition: none; }
    .spexcy-wa-trigger:hover { translate: none; }
}
