.ich-live-support {
    --ich-live-accent: #cb0819;
    --ich-live-accent-dark: #7e0712;
    --ich-live-ink: #16313d;
    --ich-live-muted: #556d79;
    --ich-live-border: rgba(8, 33, 49, 0.10);
    --ich-live-surface: #ffffff;
    --ich-live-surface-soft: #f5f8fa;
    --ich-live-shadow: 0 22px 48px rgba(8, 24, 36, 0.18);
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 72;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 12px;
}

.ich-live-support [hidden] {
    display: none !important;
}

body.has-sticky-contact-bar .ich-live-support {
    bottom: 102px;
}

.ich-live-support__launcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 54px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ich-live-accent), #a10615 56%, var(--ich-live-accent-dark));
    color: #ffffff;
    box-shadow: var(--ich-live-shadow);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.ich-live-support__launcher:hover,
.ich-live-support__launcher:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(8, 24, 36, 0.22);
}

.ich-live-support__launcher-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.ich-live-support__launcher-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.ich-live-support__panel {
    position: relative;
    width: min(392px, calc(100vw - 24px));
    max-height: min(640px, calc(100vh - 120px));
    padding: 22px 22px 20px;
    overflow: auto;
    overflow-x: hidden;
    border: 1px solid var(--ich-live-border);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(203, 8, 25, 0.08), transparent 32%),
        linear-gradient(180deg, #ffffff, #f8fafb);
    box-shadow: var(--ich-live-shadow);
}

.ich-live-support__panel[hidden] {
    display: none !important;
}

.ich-live-support.is-open .ich-live-support__panel {
    display: block !important;
}

.ich-live-support__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(8, 33, 49, 0.06);
    color: var(--ich-live-ink);
    cursor: pointer;
}

.ich-live-support__badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(11, 122, 130, 0.10);
    color: #0b6976;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.ich-live-support__header {
    display: grid;
    gap: 10px;
}

.ich-live-support__panel h2,
.ich-live-support__prechat h3 {
    margin: 10px 40px 6px 0;
    color: #112d39;
    font-size: 19px;
    line-height: 1.18;
}

.ich-live-support__prechat h3 {
    margin-top: 0;
    margin-right: 0;
    font-size: 17px;
}

.ich-live-support__view-head {
    display: grid;
    gap: 6px;
}

.ich-live-support__step {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(16, 45, 58, 0.06);
    color: #4e6672;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ich-live-support__description,
.ich-live-support__note,
.ich-live-support__empty,
.ich-live-support__account-note,
.ich-live-support__thread-note {
    margin: 0;
    color: var(--ich-live-muted);
    font-size: 13px;
    line-height: 1.5;
}

.ich-live-support__description:empty,
.ich-live-support__note:empty,
.ich-live-support__empty:empty,
.ich-live-support__account-note:empty,
.ich-live-support__thread-note:empty {
    display: none;
}

.ich-live-support__empty.is-history-hidden {
    padding: 12px 13px;
    border: 1px solid rgba(11, 122, 130, 0.16);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(11, 122, 130, 0.08), rgba(255, 255, 255, 0.96));
    color: var(--ich-live-ink);
}

.ich-live-support__account-chip {
    display: grid;
    gap: 3px;
    padding: 11px 12px;
    border: 1px solid rgba(11, 122, 130, 0.12);
    border-radius: 15px;
    background: rgba(11, 122, 130, 0.06);
}

.ich-live-support__account-chip strong {
    color: #11313f;
    font-size: 14px;
}

.ich-live-support__account-chip span,
.ich-live-support__account-chip small {
    color: #4d6572;
    line-height: 1.45;
}

.ich-live-support__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 2px;
}

.ich-live-support__meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(16, 45, 58, 0.06);
    color: var(--ich-live-ink);
    font-size: 11.5px;
    font-weight: 600;
}

.ich-live-support__status {
    margin-top: 10px;
    padding: 9px 11px;
    border-radius: 13px;
    background: rgba(11, 122, 130, 0.08);
    color: #164557;
    font-size: 12px;
    line-height: 1.45;
}

.ich-live-support__status.is-warn {
    background: rgba(199, 21, 40, 0.10);
    color: #8f0d1b;
}

.ich-live-support__status.is-hold {
    background: rgba(223, 142, 29, 0.14);
    color: #8e5600;
}

.ich-live-support__chat,
.ich-live-support__prechat,
.ich-live-support__thread,
.ich-live-support [data-ich-live-view],
.ich-live-support [data-ich-live-session-request],
.ich-live-support [data-ich-live-session-waiting] {
    display: grid;
    gap: 12px;
}

.ich-live-support [data-ich-live-view][hidden],
.ich-live-support [data-ich-live-session-request][hidden],
.ich-live-support [data-ich-live-session-waiting][hidden] {
    display: none !important;
}

.ich-live-support__loading-card {
    display: grid;
    gap: 8px;
    padding: 14px 15px;
    border: 1px solid rgba(11, 122, 130, 0.14);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(11, 122, 130, 0.06), #ffffff);
}

.ich-live-support__loading-card strong {
    color: var(--ich-live-ink);
    font-size: 14px;
}

.ich-live-support__form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.ich-live-support__department-grid {
    display: grid;
    gap: 10px;
}

.ich-live-support__department-card {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 12px 13px;
    border: 1px solid rgba(8, 33, 49, 0.12);
    border-radius: 16px;
    background: #ffffff;
    color: var(--ich-live-ink);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ich-live-support__department-card strong {
    color: #11313f;
    font-size: 14px;
}

.ich-live-support__department-card span {
    color: #5b7480;
    font-size: 13px;
    line-height: 1.5;
}

.ich-live-support__department-card:hover,
.ich-live-support__department-card:focus-visible,
.ich-live-support__department-card.is-active {
    border-color: rgba(11, 122, 130, 0.26);
    box-shadow: 0 10px 24px rgba(8, 24, 36, 0.08);
    transform: translateY(-1px);
}

.ich-live-support__request-summary,
.ich-live-support__waiting-card {
    display: grid;
    gap: 6px;
    padding: 12px 13px;
    border-radius: 16px;
    background: rgba(11, 122, 130, 0.06);
    border: 1px solid rgba(11, 122, 130, 0.12);
}

.ich-live-support__waiting-card strong {
    color: var(--ich-live-ink);
    font-size: 14px;
}

.ich-live-support__waiting-card p {
    margin: 0;
    color: #536d79;
    font-size: 12.5px;
    line-height: 1.5;
}

.ich-live-support__form-grid label,
.ich-live-support__composer {
    display: grid;
    gap: 7px;
}

.ich-live-support__form-grid label span {
    color: var(--ich-live-ink);
    font-size: 12px;
    font-weight: 600;
}

.ich-live-support__field--wide {
    grid-column: 1 / -1;
}

.ich-live-support__form-grid input,
.ich-live-support__form-grid textarea,
.ich-live-support__composer textarea {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid rgba(8, 33, 49, 0.12);
    border-radius: 14px;
    background: var(--ich-live-surface);
    color: var(--ich-live-ink);
    font-size: 14px;
}

.ich-live-support__form-grid input[readonly] {
    background: #f1f5f7;
    color: #48616e;
}

.ich-live-support__form-grid textarea,
.ich-live-support__composer textarea {
    min-height: 80px;
    resize: vertical;
}

.ich-live-support__request-options,
.ich-live-support__thread-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
}

.ich-live-support__thread-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.ich-live-support__toggle-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(8, 33, 49, 0.10);
    border-radius: 11px;
    background: #ffffff;
    color: var(--ich-live-ink);
    font-size: 12px;
    font-weight: 600;
}

.ich-live-support__toggle-option input {
    margin: 0;
}

.ich-live-support__prechat-actions,
.ich-live-support__composer-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
}

.ich-live-support__prechat-actions > *,
.ich-live-support__composer-actions > *,
.ich-live-support__thread-actions > * {
    flex: 0 1 auto;
    min-width: 0;
}

.ich-live-support__prechat-actions .ich-live-support__primary,
.ich-live-support__composer-actions .ich-live-support__primary {
    width: 100%;
    margin-left: 0;
}

.ich-live-support__composer-actions .ich-live-support__upload {
    width: 100%;
}

.ich-live-support__attachment-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

.ich-live-support__attachment-actions:has(.ich-live-support__upload:only-child) {
    grid-template-columns: minmax(0, 1fr);
}

.ich-live-support__thread-status {
    display: grid;
    gap: 10px;
    padding: 12px 13px;
    border: 1px solid rgba(8, 33, 49, 0.08);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(8, 33, 49, 0.03), #ffffff);
}

.ich-live-support__session {
    display: grid;
    gap: 10px;
    padding: 14px 14px;
    border-radius: 16px;
    border: 1px solid rgba(11, 122, 130, 0.16);
    background: linear-gradient(180deg, rgba(11, 122, 130, 0.08), rgba(255, 255, 255, 0.96));
}

.ich-live-support__session[hidden] {
    display: none !important;
}

.ich-live-support__session-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.ich-live-support__session-head strong {
    color: var(--ich-live-ink);
    font-size: 14px;
}

.ich-live-support__thread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 26px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
}

.ich-live-support__thread-badge.is-open {
    background: rgba(21, 130, 76, 0.12);
    color: #12653d;
}

.ich-live-support__thread-badge.is-hold {
    background: rgba(223, 142, 29, 0.14);
    color: #8e5600;
}

.ich-live-support__thread-badge.is-closed {
    background: rgba(199, 21, 40, 0.10);
    color: #8f0d1b;
}

.ich-live-support__thread-badge.is-pending {
    background: rgba(223, 142, 29, 0.15);
    color: #9f5a00;
}

.ich-live-support__thread-badge.is-approved {
    background: rgba(21, 130, 76, 0.12);
    color: #12653d;
}

.ich-live-support__thread-badge.is-ended {
    background: rgba(16, 41, 53, 0.08);
    color: #415a67;
}

.ich-live-support__thread [data-ich-live-thread-department] {
    background: rgba(14, 81, 129, 0.12);
    color: #0d4c77;
}

.ich-live-support__messages {
    display: grid;
    gap: 12px;
    max-height: 340px;
    padding: 14px;
    overflow: auto;
    overflow-x: hidden;
    border: 1px solid var(--ich-live-border);
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbfc, #ffffff);
}

.ich-live-support__message {
    display: grid;
    gap: 8px;
    max-width: min(92%, 100%);
    padding: 14px 15px;
    border: 1px solid rgba(8, 33, 49, 0.08);
    border-radius: 17px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(8, 24, 36, 0.04);
}

.ich-live-support__message.is-operator {
    margin-left: auto;
    max-width: min(88%, 100%);
    border-color: rgba(11, 122, 130, 0.18);
    background: linear-gradient(135deg, rgba(11, 122, 130, 0.13), #ffffff);
}

.ich-live-support__message.is-system {
    max-width: 100%;
    border-style: dashed;
    background: rgba(11, 122, 130, 0.08);
}

.ich-live-support__message header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.ich-live-support__message-headline {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.ich-live-support__message-role {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 21px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(16, 45, 58, 0.06);
    color: #58717d;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ich-live-support__message header strong {
    color: var(--ich-live-ink);
    font-size: 12.5px;
    line-height: 1.35;
}

.ich-live-support__message header span {
    color: #5d7683;
    font-size: 11.5px;
    line-height: 1.35;
}

.ich-live-support__message p {
    display: block;
    margin: 0;
    color: var(--ich-live-ink);
    font-size: 13.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ich-live-support__message-body {
    min-width: 0;
}

.ich-live-support__message-image {
    display: grid;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    color: var(--ich-live-teal);
    font-size: 12px;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.ich-live-support__message-image img {
    display: block;
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 12px;
}

.ich-live-support__message-image span {
    line-height: 1.45;
}

.ich-live-support__message-media {
    display: grid;
    gap: 8px;
}

.ich-live-support__message-media audio {
    width: 100%;
}

.ich-live-support__message-file {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(11, 122, 130, 0.08);
    font-size: 12px;
    color: var(--ich-live-teal);
    text-decoration: none;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.ich-live-support__primary,
.ich-live-support__secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    margin-top: 0;
    border-radius: 11px;
    text-decoration: none;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.25;
    padding: 0 14px;
    text-align: center;
    white-space: normal;
}

.ich-live-support__primary {
    border: 0;
    background: linear-gradient(135deg, #0a6a77, #083246);
    color: #ffffff;
    font-weight: 700;
}

.ich-live-support__primary:hover,
.ich-live-support__primary:focus-visible {
    color: #ffffff;
    opacity: 0.97;
}

.ich-live-support__secondary-action {
    border: 1px solid rgba(8, 33, 49, 0.14);
    background: #ffffff;
    color: var(--ich-live-ink);
    font-weight: 700;
}

.ich-live-support__upload {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(8, 33, 49, 0.10);
    border-radius: 11px;
    background: #ffffff;
    color: var(--ich-live-ink);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.25;
    text-align: center;
    overflow: hidden;
    white-space: normal;
}

.ich-live-support__upload.has-file {
    border-color: rgba(11, 122, 130, 0.35);
    background: rgba(11, 122, 130, 0.08);
    color: var(--ich-live-teal);
}

.ich-live-support__upload--audio {
    border-color: rgba(16, 41, 53, 0.14);
    background: #f9fbfc;
}

.ich-live-support__upload--audio.has-file {
    border-color: rgba(37, 99, 135, 0.35);
    background: rgba(37, 99, 135, 0.08);
    color: #0e5273;
}

.ich-live-support__upload span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ich-live-support__upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.ich-live-support__links {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.ich-live-support__links a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 12px 13px;
    border: 1px solid var(--ich-live-border);
    border-radius: 13px;
    background: #ffffff;
    color: var(--ich-live-ink);
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(8, 24, 36, 0.05);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ich-live-support__links a span {
    font-size: 13px;
    font-weight: 600;
}

.ich-live-support__links a:hover,
.ich-live-support__links a:focus-visible {
    border-color: rgba(203, 8, 25, 0.18);
    color: #0f2d39;
}

.ich-live-support.is-hydrating .ich-live-support__prechat-actions > *,
.ich-live-support.is-hydrating .ich-live-support__composer-actions > * {
    pointer-events: none;
    opacity: 0.72;
}

@media (max-width: 782px) {
    .ich-live-support {
        right: 14px;
        bottom: 16px;
    }

    body.has-sticky-contact-bar .ich-live-support {
        bottom: 142px;
    }

    .ich-live-support__launcher {
        min-height: 52px;
        padding: 0 15px;
    }

    .ich-live-support__panel {
        width: min(344px, calc(100vw - 18px));
        max-height: min(620px, calc(100vh - 92px));
        padding: 16px;
    }

    .ich-live-support__panel h2 {
        font-size: 20px;
    }

    .ich-live-support__form-grid {
        grid-template-columns: 1fr;
    }

    .ich-live-support__prechat-actions > *,
    .ich-live-support__composer-actions > * {
        flex-basis: 100%;
    }

    .ich-live-support__prechat-actions,
    .ich-live-support__composer-actions {
        grid-template-columns: 1fr;
    }

    body.has-sticky-contact-bar .ich-live-support__launcher {
        width: 56px;
        min-width: 56px;
        height: 56px;
        min-height: 56px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }

    body.has-sticky-contact-bar .ich-live-support__launcher-label {
        display: none;
    }
}
