.pc {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 990;
    font-size: 14px;
    line-height: 1.5;
}

.pc[data-pc-konum="left"] {
    right: auto;
    left: 16px;
}

.pc [hidden],
.pc[hidden] {
    display: none !important;
}

body:has([aria-modal="true"]:not([hidden])) .pc__launcher {
    visibility: hidden;
}

body:has(.pc:not([hidden])) .vg-totop {
    bottom: 84px;
}

body:has(.pc[data-pc-konum="left"]:not([hidden])) .vg-quick {
    bottom: 84px;
}

.pc__launcher {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    padding: 0;
    border: 0;
    border-radius: 18px 18px 6px 18px;
    background: var(--vg-primary);
    color: #fff;
    box-shadow: 0 16px 30px -12px color-mix(in srgb, var(--vg-primary) 80%, transparent);
    transition: transform .2s ease, border-radius .2s ease;
}

.pc[data-pc-konum="left"] .pc__launcher {
    border-radius: 18px 18px 18px 6px;
}

.pc__launcher:hover {
    transform: translateY(-2px);
}

.pc__launcher-icon {
    position: absolute;
    display: flex;
    transition: opacity .2s ease, transform .2s ease;
}

.pc__launcher-icon .vg-ico {
    width: 26px;
    height: 26px;
}

.pc__launcher-icon--close {
    opacity: 0;
    transform: rotate(-90deg);
}

.pc__launcher.is-open {
    background: var(--vg-secondary);
    border-radius: 50%;
}

.pc__launcher.is-open .pc__launcher-icon--chat {
    opacity: 0;
    transform: rotate(90deg);
}

.pc__launcher.is-open .pc__launcher-icon--close {
    opacity: 1;
    transform: none;
}

.pc__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border: 2px solid var(--vg-surface);
    border-radius: 999px;
    background: var(--vg-accent);
    color: var(--vg-on-accent);
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
}

.pc__panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    display: flex;
    flex-direction: column;
    width: 370px;
    max-width: calc(100vw - 32px);
    height: 540px;
    max-height: calc(100vh - 120px);
    overflow: hidden;
    background: var(--vg-surface);
    color: var(--vg-text);
    border: 1px solid var(--vg-border);
    border-radius: var(--vg-radius-lg);
    box-shadow: var(--vg-shadow-lg);
}

.pc[data-pc-konum="left"] .pc__panel {
    right: auto;
    left: 0;
}

.pc__head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: none;
    padding: 14px 12px 14px 16px;
    background: var(--vg-secondary);
    color: #fff;
    border-bottom: 3px solid var(--vg-primary);
}

.pc__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--vg-primary);
}

.pc__head-text {
    flex: 1 1 auto;
    min-width: 0;
}

.pc__head-text strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
}

.pc__status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font-size: 12px;
    opacity: .8;
}

.pc__dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3DDC84;
}

.pc__head-actions {
    display: flex;
    gap: 2px;
}

.pc__hbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
}

.pc__hbtn:hover {
    background: rgba(255, 255, 255, .12);
}

.pc__menu {
    position: absolute;
    top: 58px;
    right: 12px;
    z-index: 5;
    min-width: 180px;
    padding: 6px;
    background: var(--vg-surface);
    border: 1px solid var(--vg-border);
    border-radius: var(--vg-radius);
    box-shadow: var(--vg-shadow);
}

.pc__menu button {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--vg-heading);
    font-size: 13px;
    text-align: start;
}

.pc__menu button:hover {
    background: var(--vg-primary-soft);
    color: var(--vg-primary);
}

.pc__intro {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 16px;
    background: var(--vg-surface-2);
}

.pc__intro-text {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-left: 3px solid var(--vg-primary);
    border-radius: 0 8px 8px 0;
    background: var(--vg-surface);
    color: var(--vg-text);
    font-size: 13.5px;
}

.pc__field {
    display: block;
    margin-bottom: 12px;
}

.pc__field > span {
    display: block;
    margin-bottom: 5px;
    color: var(--vg-heading);
    font-size: 12px;
    font-weight: 700;
}

.pc__field input,
.pc__field select,
.pc__rate textarea,
.pc__compose textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--vg-border);
    border-radius: var(--vg-radius);
    background: var(--vg-surface);
    color: var(--vg-heading);
    font-size: 14px;
    outline: 0;
}

.pc__field input:focus,
.pc__field select:focus,
.pc__rate textarea:focus,
.pc__compose textarea:focus {
    border-color: var(--vg-primary);
    box-shadow: var(--vg-focus);
}

.pc__error {
    margin-bottom: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    background: var(--vg-err-soft);
    color: var(--vg-err);
    font-size: 12.5px;
}

.pc__submit {
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-radius: var(--vg-radius);
    background: var(--vg-primary);
    color: #fff;
    font-weight: 700;
}

.pc__submit:hover {
    background: var(--vg-primary-dark);
}

.pc__submit:disabled {
    opacity: .65;
}

.pc__note {
    display: block;
    margin-top: 10px;
    color: var(--vg-muted);
    font-size: 11.5px;
    text-align: center;
}

.pc__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    background: var(--vg-surface-2);
}

.pc__messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 14px;
}

.pc__msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 88%;
}

.pc__msg--me {
    margin-left: auto;
    flex-direction: row-reverse;
}

.pc__msg-av {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--vg-secondary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.pc__bubble {
    min-width: 0;
    padding: 9px 13px;
    border: 1px solid var(--vg-border);
    border-radius: 14px 14px 14px 4px;
    background: var(--vg-surface);
    color: var(--vg-heading);
}

.pc__msg--me .pc__bubble {
    border-color: transparent;
    border-radius: 14px 14px 4px 14px;
    background: var(--vg-primary);
    color: #fff;
}

.pc__msg-name {
    display: block;
    margin-bottom: 2px;
    color: var(--vg-primary);
    font-size: 11px;
    font-weight: 700;
}

.pc__msg-text {
    margin: 0;
    font-size: 13.5px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.pc__msg-time {
    display: block;
    margin-top: 3px;
    font-size: 10.5px;
    opacity: .65;
    text-align: end;
}

.pc__sys {
    align-self: center;
    max-width: 92%;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--vg-secondary-soft);
    color: var(--vg-muted);
    font-size: 11.5px;
    text-align: center;
}

.pc__agent {
    flex: none;
    padding: 0 14px 10px;
    text-align: center;
}

.pc__agent-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1.5px solid var(--vg-border);
    border-radius: 999px;
    background: var(--vg-surface);
    color: var(--vg-heading);
    font-size: 12.5px;
    font-weight: 600;
}

.pc__agent-btn:hover {
    border-color: var(--vg-primary);
    color: var(--vg-primary);
}

.pc__agent-note {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--vg-ok-soft);
    color: var(--vg-ok);
    font-size: 12px;
}

.pc__typing {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
    padding: 0 16px 10px;
    color: var(--vg-muted);
    font-size: 12px;
}

.pc__typing-dots {
    display: inline-flex;
    gap: 3px;
}

.pc__typing-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--vg-muted);
    animation: vg-chat-dot 1.1s infinite;
}

.pc__typing-dots i:nth-child(2) {
    animation-delay: .16s;
}

.pc__typing-dots i:nth-child(3) {
    animation-delay: .32s;
}

@keyframes vg-chat-dot {
    40% {
        transform: translateY(-4px);
    }
}

.pc__compose {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex: none;
    padding: 10px 12px 12px;
    border-top: 1px solid var(--vg-border);
    background: var(--vg-surface);
}

.pc__compose textarea {
    flex: 1 1 auto;
    min-height: 42px;
    max-height: 120px;
    resize: none;
}

.pc__send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: var(--vg-radius);
    background: var(--vg-primary);
    color: #fff;
}

.pc__rate {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    flex: 1 1 auto;
    padding: 22px 18px;
    text-align: center;
}

.pc__rate p {
    color: var(--vg-heading);
    font-weight: 700;
}

.pc__stars {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.pc__star {
    padding: 4px;
    border: 0;
    background: transparent;
    color: var(--vg-border-strong);
}

.pc__star .vg-ico {
    width: 28px;
    height: 28px;
}

.pc__star.is-on {
    color: var(--vg-accent);
}

.pc__closed {
    flex: none;
    padding: 16px;
    border-top: 1px solid var(--vg-border);
    color: var(--vg-muted);
    font-size: 13px;
    text-align: center;
}

.pc__closed button {
    display: block;
    margin: 10px auto 0;
    padding: 8px 18px;
    border: 1.5px solid var(--vg-border);
    border-radius: 999px;
    background: var(--vg-surface);
    color: var(--vg-heading);
    font-weight: 600;
}

@media (max-width: 480px) {
    .pc__launcher {
        width: 52px;
        height: 52px;
    }

    .pc__panel {
        position: fixed;
        inset: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border: 0;
        border-radius: 0;
    }
}
