.sw {
    --vx-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    --vx-text: #0f172a;
    --vx-muted: #64748b;
    --vx-border: #e5e7eb;
    --vx-bg: #ffffff;
    --vx-field: #ffffff;
    --vx-ring: #06b6d4;
    --vx-ring-soft: rgba(6, 182, 212, .25);
    --vx-placeholder: #94a3b8;
    --vx-disabled-bg: #f8fafc;
    --vx-disabled-tx: #94a3b8;
    font-family: var(--vx-font);
    position: fixed;
    right: 18px;
    bottom: var(--sw-bottom, 18px);
    width: 360px;
    max-width: calc(100vw - 36px);
    height: 520px;
    max-height: calc(100vh - 36px);
    background: var(--vx-bg);
    color: var(--vx-text);
    border: 1px solid var(--vx-border);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(2, 6, 23, .25);
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.sw.hidden {
    display: none;
}

.sw-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
    background: #fff;
}

.sw-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sw-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--vx-ring);
    box-shadow: 0 0 0 4px var(--vx-ring-soft);
}

.sw-title-main {
    font-weight: 700;
    font-size: 14px;
}

.sw-title-sub {
    font-size: 12px;
    color: var(--vx-muted);
    margin-top: 2px;
}

.sw-actions {
    display: flex;
    gap: 6px;
}

.sw-icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: #f1f5f9;
    font-size: 18px;
    cursor: pointer;
}

.sw-icon-btn:hover {
    background: #e2e8f0;
}

.sw-body {
    height: calc(100% - 64px);
    display: flex;
    flex-direction: column;
}

.sw-view {
    padding: 14px 16px;
    overflow: auto;
    height: 100%;
}

.sw-view.hidden {
    display: none;
}

.sw label {
    display: inline-block;
    font-size: .875rem;
    font-weight: 400;
    color: var(--vx-text);
    margin-bottom: .6rem;
}

.sw input:not([type="checkbox"]):not([type="radio"]),
.sw select,
.sw textarea {
    width: 100%;
    background: var(--vx-field);
    border: 1px solid var(--vx-border);
    border-radius: 12px;
    color: var(--vx-text);
    padding: 12px 14px;
    height: 2.5rem;
    font-size: .85rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}

.sw textarea {
    height: auto;
    min-height: 110px;
    resize: vertical;
}

.sw input::placeholder,
.sw textarea::placeholder {
    color: var(--vx-placeholder);
}

.sw input:focus,
.sw select:focus,
.sw textarea:focus {
    border-color: var(--vx-ring);
    box-shadow: 0 0 0 1px var(--vx-ring);
}

.sw .sw-btn-primary {
    height: 44px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: .98rem;
    cursor: pointer;
    background: var(--vx-ring);
    color: #fff;
}

.sw .sw-btn-primary:hover {
    filter: brightness(0.95);
}

.sw .sw-btn {
    height: 44px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--vx-border);
    font-weight: 600;
    font-size: .98rem;
    cursor: pointer;
    background: #fff;
    color: var(--vx-text);
}

.sw .sw-btn:hover {
    background: #f9fafb;
}

.sw .sw-btn-danger {
    height: 44px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, .35);
    font-weight: 700;
    font-size: .98rem;
    cursor: pointer;
    background: rgba(239, 68, 68, .10);
    color: #b91c1c;
}

.sw-card {
    border: 1px solid var(--vx-border);
    background: #fff;
    border-radius: 16px;
    padding: 14px 14px;
    box-shadow: 0 0 0 1px #eef2f7 inset;
}

.sw-card-title {
    font-weight: 700;
    margin-bottom: 10px;
}

.sw-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #e8eef5;
}

.sw-row:last-child {
    border-bottom: none;
}

.sw-pill {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.sw-pill-warn {
    background: rgba(245, 158, 11, .12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, .22);
}

.sw-queue {
    font-weight: 900;
    font-size: 18px;
}

.sw-muted {
    color: var(--vx-muted);
    font-size: 12px;
}

.sw-welcome {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.sw-welcome-ico {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: #eef2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sw-welcome-title {
    font-weight: 800;
    font-size: 16px;
}

.sw-welcome-text {
    color: var(--vx-muted);
    font-size: 13px;
    line-height: 1.35;
}

.sw-msg-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    opacity: 0.75;
    margin-top: 6px;
}

.sw-seen {
    margin-left: auto;
    font-size: 12px;
}

.sw-seen-no {
    opacity: 0.65;
}

.sw-seen-yes {
    font-weight: 700;
}

.sw-msg {
    max-width: 82%;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f1f5f9;
    border: 1px solid #e5e7eb;
    align-self: flex-start;
    word-break: break-word;
}

.sw-msg.me {
    background: rgba(6, 182, 212, .10);
    border-color: rgba(6, 182, 212, .25);
    align-self: flex-end;
}

.sw-chat-view {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sw-chat-headinfo {
    flex: 0 0 auto;
    margin-bottom: 12px;
}

.sw-chat-msgs {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 12px;
}

.sw-chat-form {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-top: 10px;
    padding-bottom: 6px;
    border-top: 1px solid #eef2f7;
}

.sw-rate-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.sw-rate-btn {
    flex: 1;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--vx-border);
    background: #fff;
    cursor: pointer;
    font-weight: 800;
}

.sw-rate-btn:hover {
    background: #f9fafb;
}

.sw-stars {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sw-star {
    width: 44px;
    height: 44px;
    border: 0;
    cursor: pointer;
    background: transparent;
    padding: 0;
    position: relative;
}

.sw-star::before {
    content: "";
    position: absolute;
    inset: 0;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") center/contain no-repeat;
    background: #e5e7eb;
}

.sw-star.is-on::before {
    background: #facc15;
}

.sw-star.is-hover::before {
    background: #fde047;
}

.sw-radio-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.sw-radio {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--vx-border);
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
}

.sw-radio input {
    margin: 0;
}

.sw-btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--vx-border);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sw-btn-icon:hover {
    background: #f9fafb;
}

.sw-img {
    max-width: 220px;
    border-radius: 12px;
    display: block;
    border: 1px solid #e5e7eb;
}

.sw-img-link {
    display: inline-block;
}

.sw-upload {
    display: flex;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--vx-border);
    background: #fff;
    border-radius: 14px;
    padding: 8px;
    margin-bottom: 10px;
}

.sw-upload.hidden {
    display: none;
}

.sw-upload-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.sw-upload-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.sw-upload-name {
    font-size: 12px;
    color: var(--vx-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sw-upload-remove {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--vx-border);
    background: #fff;
    cursor: pointer;
}

.sw-upload-remove:hover {
    background: #f9fafb;
}

.sw-imgmodal.hidden {
    display: none;
}

.sw-imgmodal {
    position: fixed;
    inset: 0;
    z-index: 90034343;
}

.sw-imgmodal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, .70);
}

.sw-imgmodal-box {
    position: absolute;
    inset: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sw-imgmodal-figure {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sw-imgmodal-figure img {
    width: min(1100px, 92vw);
    height: 88vh;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}

.sw-imgmodal-x {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(0, 0, 0, .45);
    color: #fff;
    cursor: pointer;
}

.sw-imgmodal-x:hover {
    background: rgba(0, 0, 0, .65);
}

#openAtendimento.hidden {
    display: none !important;
}

#supportWidget.sw {
    position: fixed;
    right: 16px;
    bottom: var(--sw-bottom, 18px);
    z-index: 2147483647;
}