.chat-widget {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.chat-widget--open {
    display: block;
}

.chat-widget__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.10);
}

.chat-widget__dialog {
    position: absolute;
    right: 24px;
    bottom: 112px;
    width: 409px;
    height: 548px;
    background: #FFFFFF;
    border: 1px solid #D9D9D9;
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
    overflow: hidden;
}

.chat-widget__screen {
    display: none;
    width: 100%;
    height: 100%;
    background: #FFFFFF;
}

.chat-widget__screen--active {
    display: flex;
    flex-direction: column;
}

.chat-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 72px;
    padding: 16px;
    background: #3E6FA1;
    box-sizing: border-box;
}

.chat-widget__logo {
    display: block;
    width: auto;
    max-width: 118px;
    height: auto;
}

.chat-widget__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #FFFFFF;
    cursor: pointer;
}

.chat-widget__close span {
    display: block;
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    font-size: 28px;
    line-height: 1;
    font-weight: 400;
    color: #FFFFFF;
    transform: translateY(-1px);
}

.chat-widget__body {
    flex: 1;
    min-height: 0;
    background: #FFFFFF;
    box-sizing: border-box;
}

.chat-widget__body--welcome {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 50px;
    padding: 24px;
}

.chat-widget__intro {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-widget__title {
    margin: 0;
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    font-size: var(--text-body-md-size);
    line-height: 24px;
    color: #585858;
}

.chat-widget__description {
    margin: 0;
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 400;
    font-size: var(--text-body-secondary-size);
    line-height: 24px;
    color: #585858;
}

.chat-widget__actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-widget__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 72px;
    padding: 16px;
    border: 0;
    border-radius: 16px;
    background: #DBEAFE;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
}

.chat-widget__option-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-widget__option-title {
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    font-size: var(--text-body-md-size);
    line-height: 24px;
    color: #3E6FA0;
}

.chat-widget__option-text {
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 400;
    font-size: var(--text-body-secondary-size);
    line-height: 24px;
    color: #585858;
}

.chat-widget__option-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #3E6FA0;
    flex-shrink: 0;
}

.chat-widget__option-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.chat-widget__body--conversation {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 16px 16px;
}

.chat-widget__messages {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.chat-widget__message {
    max-width: 280px;
    padding: 16px 24px;
    border-radius: 16px;
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 400;
    font-size: var(--text-body-secondary-size);
    line-height: 24px;
    color: #585858;
    box-sizing: border-box;
}

.chat-widget__message--agent {
    align-self: flex-start;
    width: 280px;
    min-height: 152px;
    background: #DBEAFE;
}

.chat-widget__message--user {
    align-self: flex-end;
    min-width: 176px;
    max-width: 280px;
    background: #DBEAFE;
}

.chat-widget__composer {
    display: flex;
    align-items: center;
    width: 100%;
    height: 48px;
    padding: 0 4px 0 16px;
    border: 1px solid #D6D6D6;
    border-radius: 999px;
    background: #FFFFFF;
    box-sizing: border-box;
    overflow: hidden;
}

.chat-widget__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    box-sizing: border-box;
    padding: 0;
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 400;
    font-size: var(--text-body-secondary-size);
    line-height: 18px;
    color: #585858;
}

.chat-widget__input::placeholder {
    color: #858585;
    opacity: 1;
}

.chat-widget__send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #65B2E8;
    color: #FFFFFF;
    cursor: pointer;
    flex-shrink: 0;
}

.chat-widget__send svg {
    width: 24px;
    height: 24px;
    display: block;
}

.chat-widget__messages::-webkit-scrollbar {
    width: 6px;
}

.chat-widget__messages::-webkit-scrollbar-thumb {
    background: rgba(62, 111, 161, 0.35);
    border-radius: 999px;
}

.chat-widget__messages::-webkit-scrollbar-track {
    background: transparent;
}

.floating-buttons {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.floating-buttons__chat,
.floating-buttons__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: #FF0000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.20);
    color: #FFFFFF;
    text-decoration: none;
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 400;
    font-size: var(--text-body-secondary-size);
    line-height: 20px;
    cursor: pointer;
    white-space: nowrap;
}

.floating-buttons__chat:hover,
.floating-buttons__cta:hover {
    color: #FFFFFF;
    text-decoration: none;
    background: #E00000;
}

.floating-buttons__chat svg {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .chat-widget__dialog {
        right: 12px;
        left: 12px;
        bottom: 88px;
        width: auto;
        max-width: calc(100vw - 24px);
        height: 548px;
    }

    .floating-buttons {
        right: 12px;
        bottom: 12px;
    }

    .floating-buttons__chat,
    .floating-buttons__cta {
        font-size: var(--text-body-secondary-size);
    }
}

@media (max-width: 480px) {
    .chat-widget__dialog {
        height: calc(100vh - 112px);
        max-height: 548px;
    }

    .chat-widget__option-title,
    .chat-widget__title {
        font-size: var(--text-body-secondary-size);
    }

    .chat-widget__option-text,
    .chat-widget__description,
    .chat-widget__message,
    .chat-widget__input {
        font-size: var(--text-body-secondary-size);
    }
}
