.cs-widget {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 100;
    max-width: calc(100% - 32px);
    color: #182233;
    font: 14px/1.5 system-ui, "Microsoft YaHei", sans-serif;
}

.cs-widget [hidden], .cs-widget[hidden] {
    display: none !important;
}

.cs-widget button {
    font: inherit;
    cursor: pointer;
}

.cs-widget :focus-visible {
    outline: 2px solid #3547d8;
    outline-offset: 2px;
}

.cs-widget-panel {
    width: 340px;
    max-width: 100%;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(27, 49, 102, .24);
}

.cs-widget-header, .cs-widget-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    background: radial-gradient(circle at 95% 10%, #ffffff21 0 60px, transparent 61px),
        linear-gradient(120deg, #454bdb, #167bc0);
}

.cs-widget-header {
    padding: 16px;
}

.cs-widget-header h2 {
    color: inherit;
    font-size: 18px;
    font-weight: 700;
}

.cs-widget-hours {
    margin-top: 2px;
    font-size: 13px;
}

.cs-widget-hours:empty, .cs-widget-feedback:empty {
    margin: 0;
}

.cs-widget-header-icon, .cs-widget-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #ffffff2e;
}

.cs-widget-bubble {
    position: relative;
    display: inline-block;
    width: 15px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 50% 50% 50% 3px;
}

.cs-widget .cs-widget-close {
    width: 36px;
    height: 36px;
    margin-left: auto;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font-size: 24px;
    line-height: 1;
}

.cs-widget-close:hover {
    background: #ffffff2e;
}

.cs-widget-close:focus-visible {
    outline-color: #fff;
}

.cs-widget-body {
    padding: 10px 12px 12px;
}

.cs-widget .cs-widget-row {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 6px 5px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    text-align: left;
}

.cs-widget .cs-widget-row:hover {
    background: #f5f7ff;
}

.cs-widget-icon {
    width: 38px;
    height: 38px;
    background: #eeefff;
}

.cs-widget-email .cs-widget-icon {
    background: #e5f5ff;
}

.cs-widget-icon img {
    width: 19px;
    height: 19px;
    object-fit: contain;
}

.cs-widget-row strong, .cs-widget-wecom strong {
    font-size: 15px;
}

.cs-widget-value {
    display: block;
    color: #536078;
    overflow-wrap: anywhere;
    user-select: text;
}

.cs-widget-action {
    color: #536078;
    font-size: 13px;
}

.cs-widget-wecom {
    display: grid;
    grid-template-columns: minmax(72px, 108px) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    padding: 12px;
    border: 1px solid #d5ede1;
    border-radius: 16px;
    background: #effaf4;
}

.cs-widget-wecom img {
    box-sizing: border-box;
    width: 100%;
    padding: 5px;
    border-radius: 8px;
    background: #fff;
}

.cs-widget-wecom-title {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.cs-widget-wecom-title::before {
    content: "";
    flex: 0 0 16px;
    height: 14px;
    align-self: center;
    background: radial-gradient(ellipse 4px 3px at 11px 9px, #168353 98%, transparent),
        radial-gradient(ellipse 6px 4.5px at 6px 5px, #19a867 98%, transparent);
}

.cs-widget-wecom p {
    margin-top: 5px;
    color: #425d50;
    line-height: 1.65;
}

.cs-widget-wecom-badge {
    display: inline-block;
    margin-top: 7px;
    padding: 2px 9px;
    border-radius: 999px;
    background: #d7f3e5;
    color: #126840;
    font-size: 12px;
}

.cs-widget-feedback {
    margin: 4px 5px 0;
    color: #3547a1;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.cs-widget .cs-widget-trigger {
    min-height: 44px;
    padding: 8px 15px;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(27, 49, 102, .22);
    font-weight: 700;
}
