.avc-window {
    position: fixed;
    bottom: 70px;
    right: 16px;
    width: min(340px, calc(100vw - 24px));
    max-height: min(560px, calc(100dvh - 80px - 70px));
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    font-family: var(--font-benton-sans, system-ui, sans-serif);
}

.avc-header {
    background: #0033a0;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.avc-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
	color: #fff;
}

.avc-header-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.avc-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
    background: #f0f4ff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.avc-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.avc-field label {
    font-size: 12px;
    font-weight: 700;
    color: #0033a0;
}

.avc-field input,
.avc-field select {
    border: 1px solid #dde3f0;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 13px;
    color: #222;
    background: #fff;
}

.avc-field-error {
    font-size: 11px;
    color: #c62828;
}

.avc-intro {
    font-size: 12px;
    color: #555;
    margin: 0 0 4px 0;
}

.avc-submit,
.avc-secondary {
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.avc-submit {
    background: #0033a0;
    color: #fff;
    width: 100%;
}

.avc-submit:hover {
    background: #0052cc;
}

.avc-secondary {
    background: #fff;
    color: #0033a0;
    border: 1px solid #0033a0;
}

.avc-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 8px;
    text-align: center;
}

.avc-spinner {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 3px solid #dde3f0;
    border-top-color: #0033a0;
    animation: avcSpin 0.8s linear infinite;
}

@keyframes avcSpin {
    to {
        transform: rotate(360deg);
    }
}

.avc-status p {
    margin: 0;
    font-size: 13px;
    color: #333;
}

.avc-status small {
    color: #777;
    font-size: 11px;
}

.avc-row {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.avc-row--customer {
    justify-content: flex-end;
}

.avc-bubble {
    max-width: 82%;
    border-radius: 14px;
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.45;
    word-break: break-word;
}

.avc-bubble--agent {
    background: #fff;
    color: #222;
    border-bottom-left-radius: 3px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.avc-bubble--customer {
    background: #0033a0;
    color: #fff;
    border-bottom-right-radius: 3px;
}

.avc-bubble--system {
    background: transparent;
    color: #777;
    font-size: 11px;
    text-align: center;
    width: 100%;
}

.avc-typing {
    font-size: 11px;
    color: #777;
    padding-left: 4px;
}

.avc-composer {
    display: flex;
    gap: 6px;
    padding: 10px;
    background: #fff;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.avc-composer input {
    flex: 1;
    border: 1px solid #dde3f0;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 13px;
}

.avc-composer button {
    background: #0033a0;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.avc-footer-actions {
    display: flex;
    justify-content: center;
    padding: 6px 10px;
    background: #fff;
    border-top: 1px solid #eee;
}

.avc-link-btn {
    background: none;
    border: none;
    color: #0033a0;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.avc-error {
    padding: 16px;
    text-align: center;
}

.avc-error h4 {
    color: #c62828;
    margin: 6px 0;
    font-size: 14px;
}

.avc-error p {
    font-size: 12px;
    color: #444;
    margin: 0 0 12px 0;
}

.avc-tech {
    text-align: left;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px;
    font-size: 11px;
    color: #555;
    margin-top: 10px;
}

.avc-tech summary {
    cursor: pointer;
    font-weight: 700;
    color: #0033a0;
}

.avc-tech pre {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 6px 0 0 0;
    max-height: 160px;
    overflow-y: auto;
}

.avc-contact-line {
    font-size: 11px;
    color: #888;
    text-align: center;
    margin: 6px 0 0 0;
}

.avc-trigger {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: none;
    /*box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);*/
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s;
}

.avc-trigger:hover {
    transform: scale(1.08);
}

@media (max-width: 600px) {
    .avc-window {
        left: 35px;
        right: 35px;
        bottom: 68px;
        width: auto;
        max-height: calc(83dvh - 60px - 68px);
    }
}
.avc-trigger-img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.avc-terms { margin: 8px 0 12px; font-size: 13px; }
.avc-terms label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.avc-terms input[type="checkbox"] { width: auto; margin-top: 3px; flex: none; }
.avc-terms a { text-decoration: underline; }