.support-chat-widget {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1030;
}

.support-chat-cookie-consent {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 30rem;
    max-width: calc(100vw - 2rem);
    padding: 1rem;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.18);
}

.support-chat-cookie-consent__text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #1d2327;
}

.support-chat-cookie-consent__text a {
    color: var(--support-chat-primary-color, #405674);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.125rem;
}

.support-chat-cookie-consent__text a:hover,
.support-chat-cookie-consent__text a:focus-visible {
    text-decoration: none;
}

.support-chat-cookie-consent__error {
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #8a2424;
}

.support-chat-cookie-consent__error[hidden] {
    display: none;
}

.support-chat-widget__error[hidden] {
    display: none;
}

.support-chat-cookie-consent__buttons {
    display: flex;
    gap: 0.75rem;
}

.support-chat-cookie-consent__button {
    flex: 1;
    min-height: 2.5rem;
    padding: 0 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: var(--support-chat-primary-color);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
}

.support-chat-widget__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 5rem;
    background: var(--support-chat-primary-color);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    max-width: 20rem;
    transition: all 0.3s ease;
}

.support-chat-widget__toggle:hover {
    transform: scale(1.05);
}

.support-chat-widget__icon {
    fill: #fff;
    width: 1.5rem;
    height: 1.5rem;
}

.support-chat-widget__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
}

.support-chat-widget__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    display: flex;
    flex-direction: column;
    width: 22.5rem;
    max-width: calc(100vw - 2rem);
    height: 30rem;
    max-height: calc(100vh - 8rem);
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.18);
}

.support-chat-widget__panel[hidden] {
    display: none;
}

.support-chat-widget__panel[data-state="prechat"] .support-chat-widget__messages,
.support-chat-widget__panel[data-state="prechat"] .support-chat-widget__composer,
.support-chat-widget__panel[data-state="prechat"] .support-chat-widget__offline,
.support-chat-widget__panel[data-state="chat"] .support-chat-widget__prechat,
.support-chat-widget__panel[data-state="chat"] .support-chat-widget__offline,
.support-chat-widget__panel[data-state="offline"] .support-chat-widget__prechat,
.support-chat-widget__panel[data-state="offline"] .support-chat-widget__messages,
.support-chat-widget__panel[data-state="offline"] .support-chat-widget__composer {
    display: none;
}

.support-chat-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--support-chat-primary-color);
    color: #fff;
}

.support-chat-widget__header-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.support-chat-widget__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.support-chat-widget__status {
    font-size: 0.75rem;
    opacity: 0.85;
}

.support-chat-widget__close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.support-chat-widget__close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.support-chat-widget__close-icon {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.support-chat-widget__messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    overflow-y: auto;
    background: #f0f2f5;
}

.support-chat-widget__prechat,
.support-chat-widget__offline {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #fff;
}

.support-chat-widget__offline {
    justify-content: center;
    align-items: center;
    color: #1d2327;
    line-height: 1.45;
}

.support-chat-widget__field,
.support-chat-widget__consent {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8125rem;
    color: #1d2327;
}

.support-chat-widget__field input {
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #c3c4c7;
    border-radius: 0.5rem;
}

.support-chat-widget__consent {
    flex-direction: row;
    align-items: flex-start;
    line-height: 1.35;
}

.support-chat-widget__error {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    color: #8a2424;
    background: #fcf0f1;
    border-radius: 0.5rem;
}

.support-chat-widget__message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.support-chat-widget__message--incoming {
    align-self: flex-start;
}

.support-chat-widget__message--outgoing {
    align-self: flex-end;
}

.support-chat-widget__message-bubble {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.45;
    word-wrap: break-word;
    border-radius: 0.75rem;
}

.support-chat-widget__message--incoming .support-chat-widget__message-bubble {
    background: #fff;
    color: #1d2327;
    border-bottom-left-radius: 0.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.support-chat-widget__message--outgoing .support-chat-widget__message-bubble {
    background: var(--support-chat-primary-color, #405674);
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.support-chat-widget__message-time {
    padding-top: 0.25rem;
    font-size: 0.6875rem;
    color: #787c82;
}

.support-chat-widget__message--outgoing .support-chat-widget__message-time {
    text-align: right;
}

.support-chat-widget__composer {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #dcdcde;
    background: #fff;
}

.support-chat-widget__input {
    flex: 1;
    min-height: 2.75rem;
    max-height: 7.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #1d2327;
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 0.5rem;
    resize: none;
}

.support-chat-widget__input:focus {
    outline: none;
    border-color: var(--support-chat-primary-color, #405674);
    box-shadow: 0 0 0 1px var(--support-chat-primary-color, #405674);
    background: #fff;
}

.support-chat-widget__send {
    flex-shrink: 0;
    min-height: 2.75rem;
    padding: 0 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: var(--support-chat-primary-color);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.support-chat-widget__send:hover {
    background: #2F3B4B;
}

.support-chat-widget__send:disabled,
.support-chat-cookie-consent__button:disabled {
    background: #a7aaad;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .support-chat-widget__panel {
        position: fixed;
        right: 1rem;
        left: 1rem;
        bottom: 5.5rem;
        width: auto;
        height: calc(100vh - 7rem);
        max-height: none;
    }
}