.vc {
    --vc-bg: #15171a;
    --vc-surface: #1f2226;
    --vc-line: rgba(255, 255, 255, 0.14);
    --vc-text: #f4f4ef;
    --vc-muted: rgba(244, 244, 239, 0.68);
    --vc-on-accent: #ffffff;
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 1090;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    color: var(--vc-text);
}

.vc--web {
    bottom: 1.1rem;
}

.vc *,
.vc *::before,
.vc *::after {
    box-sizing: border-box;
}

.vc [hidden] {
    display: none !important;
}

.vc__fab {
    position: relative;
    display: grid;
    place-items: center;
    width: 3.4rem;
    height: 3.4rem;
    margin-left: auto;
    border: 0;
    border-radius: 50%;
    background: var(--vc-accent);
    color: var(--vc-on-accent);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.vc__fab:hover,
.vc__fab:focus-visible {
    transform: translateY(-2px);
}

.vc__fab svg {
    width: 1.5rem;
    height: 1.5rem;
}

.vc__badge {
    position: absolute;
    top: -0.2rem;
    right: -0.2rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #e54e5b;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
}

.vc__panel {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(22rem, calc(100vw - 2rem));
    max-height: min(32rem, calc(100vh - 2.5rem));
    border: 1px solid var(--vc-line);
    border-radius: 1rem;
    background: var(--vc-bg);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* The open window takes the button's place, so the button is hidden while it is open. */
.vc__fab[aria-expanded="true"] {
    opacity: 0;
    transform: scale(0.6);
    pointer-events: none;
}

.vc__panel {
    transform-origin: bottom right;
}

.vc__head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0.9rem;
    background: var(--vc-accent);
    color: var(--vc-on-accent);
}

.vc__title {
    display: grid;
    min-width: 0;
    margin-right: auto;
}

.vc__title strong,
.vc__title small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vc__title small {
    font-size: 0.75rem;
    opacity: 0.85;
}

.vc__head .vc__link {
    color: inherit;
    font-size: 0.78rem;
}

.vc__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    border: 0;
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.18);
    color: var(--vc-on-accent);
    cursor: pointer;
}

.vc__icon svg {
    width: 1rem;
    height: 1rem;
}

.vc__icon:hover,
.vc__icon:focus-visible {
    background: rgba(0, 0, 0, 0.3);
}

.vc__confirm {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.62);
}

.vc__confirm-box {
    display: grid;
    gap: 0.9rem;
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--vc-line);
    border-radius: 0.8rem;
    background: var(--vc-surface);
}

.vc__confirm-box p {
    margin: 0;
}

.vc__confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.vc__confirm-actions button {
    width: auto;
    padding: 0.5rem 0.9rem;
}

.vc__confirm-cancel {
    border: 1px solid var(--vc-line);
    border-radius: 0.5rem;
    background: transparent;
    color: var(--vc-text);
    cursor: pointer;
    font: inherit;
}

.vc__close {
    position: relative;
    flex: 0 0 auto;
    width: 1.9rem;
    height: 1.9rem;
    border: 0;
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.18);
    cursor: pointer;
}

.vc__close span::before,
.vc__close span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.9rem;
    height: 2px;
    border-radius: 1px;
    background: var(--vc-on-accent);
}

.vc__close span::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.vc__close span::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.vc__hours {
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--vc-line);
    background: var(--vc-surface);
    font-size: 0.82rem;
}

.vc__hours-message {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
}

.vc__dot {
    flex: 0 0 auto;
    width: 0.6rem;
    height: 0.6rem;
    margin-top: 0.3rem;
    border-radius: 50%;
    background: #8a8f98;
}

.vc__hours.is-open .vc__dot {
    background: #3ccf7a;
}

.vc__hours-detail {
    margin-top: 0.35rem;
    color: var(--vc-muted);
}

.vc__hours-detail summary {
    cursor: pointer;
}

.vc__hours-detail ul {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
}

.vc__hours-zone {
    margin: 0.25rem 0 0;
    font-size: 0.76rem;
}

.vc__mail {
    margin-top: 0.5rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--vc-line);
    border-radius: 0.5rem;
    background: transparent;
    color: var(--vc-text);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

.vc__mail:hover,
.vc__mail:focus-visible {
    border-color: var(--vc-accent);
}

.vc__greetings {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 0 1 auto;
    max-height: 40%;
    padding: 0.85rem 0.85rem 0;
    overflow-y: auto;
}

.vc__msg--greeting {
    max-width: 90%;
}

.vc__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.vc__form {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    overflow-y: auto;
}

.vc__hint {
    margin: 0;
    font-size: 0.86rem;
    color: var(--vc-muted);
}

.vc__field {
    display: grid;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--vc-muted);
}

.vc__field input,
.vc__composer textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--vc-line);
    border-radius: 0.55rem;
    background: #111315;
    color: var(--vc-text);
    font: inherit;
}

.vc__field input:focus,
.vc__composer textarea:focus {
    outline: 2px solid var(--vc-accent);
    outline-offset: 1px;
}

.vc__legal {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--vc-muted);
}

.vc__legal input {
    margin-top: 0.2rem;
    accent-color: var(--vc-accent);
}

.vc__legal a {
    color: var(--vc-text);
    text-decoration: underline;
}

.vc__legal-text {
    max-height: 8rem;
    padding: 0.6rem;
    border: 1px solid var(--vc-line);
    border-radius: 0.5rem;
    overflow-y: auto;
    font-size: 0.78rem;
    color: var(--vc-muted);
}

.vc__error {
    margin: 0;
    padding: 0.45rem 0.6rem;
    border-radius: 0.5rem;
    background: rgba(229, 78, 91, 0.16);
    color: #ff9aa3;
    font-size: 0.82rem;
}

.vc__primary {
    padding: 0.65rem 1rem;
    border: 0;
    border-radius: 0.55rem;
    background: var(--vc-accent);
    color: var(--vc-on-accent);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.vc__primary:disabled {
    opacity: 0.6;
    cursor: wait;
}

.vc__link {
    padding: 0.2rem 0;
    border: 0;
    background: none;
    color: var(--vc-muted);
    font: inherit;
    font-size: 0.82rem;
    text-decoration: underline;
    cursor: pointer;
}

.vc__chat {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.vc__messages {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1 1 auto;
    min-height: 12rem;
    padding: 0.85rem;
    overflow-y: auto;
}

.vc__empty {
    margin: auto;
    text-align: center;
    font-size: 0.85rem;
    color: var(--vc-muted);
}

.vc__msg {
    max-width: 85%;
    padding: 0.5rem 0.7rem;
    border-radius: 0.9rem;
    background: var(--vc-surface);
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.vc__msg time {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.68rem;
    opacity: 0.65;
}

.vc__msg--mine {
    align-self: flex-end;
    background: var(--vc-accent);
    color: var(--vc-on-accent);
    border-bottom-right-radius: 0.25rem;
}

.vc__msg--artist {
    align-self: flex-start;
    border-bottom-left-radius: 0.25rem;
}

.vc__msg--pending {
    opacity: 0.6;
}

.vc__chat > .vc__error {
    margin: 0 0.85rem 0.5rem;
}

.vc__composer {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.65rem;
    border-top: 1px solid var(--vc-line);
}

.vc__composer textarea {
    flex: 1 1 auto;
    min-height: 2.5rem;
    max-height: 7rem;
    resize: none;
}

.vc__send {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 0.55rem;
    background: var(--vc-accent);
    color: var(--vc-on-accent);
    cursor: pointer;
}

.vc__send:disabled {
    opacity: 0.45;
    cursor: default;
}

.vc__send svg {
    width: 1.1rem;
    height: 1.1rem;
}

@media (max-width: 480px) {
    .vc {
        right: 0.7rem;
        bottom: 0.7rem;
    }

    .vc__panel {
        max-height: calc(100vh - 6rem);
    }
}
