.ai-chat-page {
    padding-bottom: 70px;
}
.ai-chat-page__title {
    margin-bottom: 18px;
}
.ai-chat-alert {
    position: relative;
    border: 1px solid #a37d6d;
    border-radius: 10px;
    color: #8c6a5c;
    font-weight: 600;
    padding: 14px 48px 14px 18px;
    margin-bottom: 34px;
    background: #fff;
}
.ai-chat-alert--danger {
    border-color: #d16464;
    color: #b64040;
    background: #fff6f6;
}
.ai-chat-alert--success {
    border-color: #7cab3d;
    color: #5f8f2a;
    background: #f7f8e6;
}
.ai-chat-alert--compact {
    position: relative;
    font-size: clamp(12px, 2vw, 14px);
    line-height: 1.35;
    margin: 0 0 20px;
    padding: 12px 34px 12px 12px;
}
.ai-chat-alert-close,
.ai-chat-page-alert-close,
.ai-chat-history-close {
    border: 0;
    background: transparent;
    padding: 0;
    line-height: 1;
    cursor: pointer;
}
.ai-chat-alert-close {
    position: absolute;
    top: 10px;
    right: 10px;
}
.ai-chat-page-alert-close {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
}
.ai-chat-alert-close img,
.ai-chat-page-alert-close img,
.ai-chat-history-close img {
    display: block;
}
.ai-chat-thread {
    margin: 0 auto 34px;
}
.ai-chat-message {
    font-size: 16px;
    line-height: 1.65;
    color: #382d28;
    overflow-wrap: anywhere;
}
.ai-chat-message p,
.ai-chat-widget__msg p {
    margin: 0 0 16px;
}
.ai-chat-message p:last-child,
.ai-chat-widget__msg p:last-child {
    margin-bottom: 0;
}
.ai-chat-message ul,
.ai-chat-widget__msg ul {
    margin: 0 0 16px 20px;
    padding: 0;
}
.ai-chat-message li,
.ai-chat-widget__msg li {
    margin-bottom: 8px;
}
.ai-chat-answer-title {
    margin: 0 0 16px;
    color: #382d28;
    font-weight: 800;
    font-size: 18px;
    line-height: 1.35;
}
.ai-chat-widget__msg .ai-chat-answer-title {
    font-size: 14px;
    margin-bottom: 10px;
}
.ai-chat-message--user {
    max-width: 860px;
    margin: 0 0 28px auto;
    padding: 22px 26px;
    border-radius: 20px 20px 0 20px;
    background: #f7f8e6;
}
.ai-chat-message--assistant {
    margin-bottom: 30px;
    padding: 28px 32px;
    border: 1px solid #C6B4AC;
    border-radius: 20px 20px 20px 0;
    background: #fff;
}
.ai-chat-empty {
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #8c6a5c;
    font-size: 17px;
}
.ai-chat-form {
    margin: 0 auto;
}
.ai-chat-field {
    position: relative;
    display: flex;
    gap: 16px;
    align-items: flex-end;
    min-height: 118px;
    border: 2px solid #7cab3d;
    border-radius: 20px;
    background: #fbfbe9;
    padding: 16px 16px 16px 22px;
}
.ai-chat-field textarea {
    flex: 1;
    min-height: 86px;
    border: 0;
    resize: vertical;
    outline: none;
    background: transparent;
    color: #382d28;
    font-size: 17px;
    line-height: 1.45;
}
.ai-chat-submit {
    min-width: 126px;
    height: 44px;
    border: 0;
    border-radius: 22px;
    background: #7cab3d;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
    padding: 10px 24px;
}
.ai-chat-submit:disabled {
    opacity: .55;
    cursor: default;
}
.ai-chat-loader {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    margin: 0 4px 7px 0;
    border: 3px solid rgba(124, 171, 61, .2);
    border-top-color: #7cab3d;
    border-radius: 50%;
    animation: ai-chat-loader-spin .75s linear infinite;
}
.ai-chat-field .ai-chat-loader {
    position: absolute;
    right: 16px;
    top: 15px;
}
.ai-chat-loader[hidden] {
    display: none;
}
@keyframes ai-chat-loader-spin {
    to {
        transform: rotate(360deg);
    }
}
.ai-chat-meta {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-top: 12px;
    color: #382D28;
    font-size: 16px;
}
.ai-chat-requests-meta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ai-chat-requests-help {
    position: relative;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: none;
    color: #7cab3d;
    padding: 0;
    line-height: 1;
    font-weight: 800;
    bottom: 3px;
}
.ai-chat-requests-help span {
    display: block;
    line-height: 22px;
}
.ai-chat-requests-help em {
    position: absolute;
    top: calc(100% + 12px);
    right: -2px;
    z-index: 5;
    width: 280px;
    max-width: calc(100vw - 40px);
    padding: 14px 14px;
    border-radius: 10px;
    background: #F1F0EA;
    box-shadow: 0 12px 28px rgba(141, 105, 89, .28);
    color: #382d28;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
.ai-chat-requests-help em::before {
    content: "";
    position: absolute;
    top: -5px;
    right: 8px;
    width: 10px;
    height: 10px;
    background: #f4f2ed;
    border-radius: 3px 0 0 0;
    transform: rotate(45deg);
}
.ai-chat-requests-help:hover em,
.ai-chat-requests-help:focus em {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.ai-chat-limit-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 28px;
    margin-top: 28px;
}
.ai-chat-limit-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    min-height: 58px;
    box-sizing: border-box;
    padding: 14px 24px;
    border-radius: 12px;
    background: #f8dadd;
    color: #382d28;
    font-size: 17px;
    line-height: 1.35;
    text-align: center;
}
.ai-chat-limit-warning[hidden] {
    display: none;
}
.ai-chat-limit-warning img {
    flex: 0 0 auto;
    display: block;
}
.ai-chat-subscribe-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    max-width: 100%;
    min-height: 44px;
    border-radius: 8px;
    background: #7cab3d;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    font-size: 16px;
}
.ai-chat-subscribe-btn:hover{
    color: #fff;
}
.ai-chat-history-note {
    margin-top: 30px;
    color: #8D6959;
    font-size: clamp(12px, 2vw, 14px);
    border: 1px solid #8D6959;
    border-radius: 10px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
}
.ai-chat-history-left{
    display: flex;
    align-items: center;
    gap: 10px;
}
.ai-chat-widget {
    position: fixed;
    right: 54px;
    bottom: 54px;
    z-index: 99990;
    font-family: inherit;
}
.ai-chat-widget__bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #382d28;
    font-weight: 700;
}
.ai-chat-widget__mark,
.ai-chat-auth-modal__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #7cab3d;
    color: #fff;
    font-weight: 800;
}
.ai-chat-widget__mark {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}
.ai-chat-widget__label {
    position: relative;
    border-radius: 8px;
    padding: 13px 14px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(141, 105, 89, 0.5);
    font-size: clamp(12px, 2vw, 16px);
    right: 20px;
}
.ai-chat-widget__label::after {
    content: "";
    position: absolute;
    right: 20px;
    bottom: -5px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 0 0 3px 0;
    transform: translateX(-50%) rotate(45deg);
    box-shadow: 0 10px 20px rgba(141, 105, 89, 0.5);
}
.ai-chat-widget__panel {
    width: 380px;
    max-height: calc(100vh - 90px);
    overflow: auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(141, 105, 89, 0.5);
    padding: 26px 22px 30px 30px;
    border-right: 8px solid #fff;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 171, 61, .45) transparent;
}
.ai-chat-widget__panel::-webkit-scrollbar,
.ai-chat-widget__messages::-webkit-scrollbar,
.ai-chat-widget__form textarea::-webkit-scrollbar {
    width: 3px;
    height: 3px;
}
.ai-chat-widget__panel::-webkit-scrollbar-track,
.ai-chat-widget__messages::-webkit-scrollbar-track,
.ai-chat-widget__form textarea::-webkit-scrollbar-track {
    background: transparent;
}
.ai-chat-widget__panel::-webkit-scrollbar-track {
    margin: 12px 0;
}
.ai-chat-widget__panel::-webkit-scrollbar-thumb,
.ai-chat-widget__messages::-webkit-scrollbar-thumb,
.ai-chat-widget__form textarea::-webkit-scrollbar-thumb {
    background: rgba(124, 171, 61, .35);
    border-radius: 999px;
}
.ai-chat-widget__panel::-webkit-scrollbar-thumb:hover,
.ai-chat-widget__messages::-webkit-scrollbar-thumb:hover,
.ai-chat-widget__form textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 171, 61, .6);
}
.ai-chat-widget__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid #d7c5bd;
}
.ai-chat-widget__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ai-chat-widget__small-mark {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 12px;
}
.ai-chat-widget__title {
    color: #382D28;
    font-weight: 700;
    font-size: 16px;
}
.ai-chat-widget__online {
    color: #7cab3d;
    font-size: clamp(10px, 2vw, 14px);
}
.ai-chat-widget__collapse {
    border: 0;
    background: transparent;
    color: #7cab3d;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.ai-chat-widget__messages {
    max-height: 330px;
    overflow: auto;
    margin-right: -4px;
    padding-right: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 171, 61, .45) transparent;
}
.ai-chat-widget__msg {
    font-size: 16px;
    line-height: 1.4;
    color: #382d28;
    overflow-wrap: anywhere;
}
.ai-chat-widget__msg--user {
    margin: 0 0 12px 34px;
    padding: 14px 20px;
    border-radius: 15px 15px 0 15px;
    background: #F7F8E6;
}
.ai-chat-widget__msg--assistant {
    margin: 0 0 14px;
    padding: 14px 20px;
    border: 1px solid #C6B4AC;
    border-radius: 15px 15px 15px 0;
    background: #fff;
}
.ai-chat-widget__inputbox {
    position: relative;
    border: 1px solid #7cab3d;
    border-radius: 20px;
    background: #fbfbe9;
    padding: 12px;
}
.ai-chat-widget__inputbox .ai-chat-widget-loader {
    position: absolute;
    right: 155px;
    bottom: 18px;
    width: 22px;
    height: 22px;
    margin: 0;
    border-width: 2px;
}
.ai-chat-widget__inputbox .ai-chat-widget-loader[hidden] {
    display: none;
}

.ai-chat-widget__inputbox textarea {
    width: 100%;
    height: 72px;
    min-height: 72px;
    resize: none;
    border: 0;
    outline: none;
    background: transparent;
    color: #382d28;
    font-size: 14px;
    line-height: 1.45;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 171, 61, .45) transparent;
}

.ai-chat-widget__inputbox textarea::-webkit-scrollbar {
    width: 4px;
}

.ai-chat-widget__inputbox textarea::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chat-widget__inputbox textarea::-webkit-scrollbar-thumb {
    background: rgba(124, 171, 61, .45);
    border-radius: 10px;
}

.ai-chat-widget__inputbox button {
    display: block;
    margin-left: auto;
    margin-top: 8px;
    width: 127px;
    height: 42px;
    border: 0;
    border-radius: 30px;
    background: #7cab3d;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
}
.ai-chat-widget__form {
    margin-top: 12px;
    position: relative;
}

.ai-chat-widget__form button:disabled {
    opacity: .55;
    cursor: default;
}
.ai-chat-widget__meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 8px 0 14px;
    color: #6f625d;
    font-size: 12px;
}
.ai-chat-widget__meta .ai-chat-requests-meta {
    gap: 4px;
}
.ai-chat-widget__meta .ai-chat-requests-help em {
    right: -8px;
    width: 230px;
    padding: 12px;
    font-size: 13px;
}
.ai-chat-widget__meta .ai-chat-requests-help em::before {
    right: 14px;
}
.ai-chat-widget__more {
    margin: 2px 0 12px;
    text-align: center;
    font-size: 15px;
}
.ai-chat-widget__more a {
    color: #8D6959;
    text-decoration: underline;
}
.ai-chat-widget__intro {
    color: #8D6959;
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 18px;
}
.ai-chat-widget__intro strong {
    display: block;
    margin-top: 18px;
    color: #382d28;
    font-size: 20px;
}
.ai-chat-widget__hide {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    border-radius: 10px;
    border: 0;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    font-size: 16px;
}
.ai-chat-widget__hide {
    background: #8D6959;
}
.ai-chat-auth-modal[hidden],
.ai-chat-widget[hidden],
.ai-chat-widget__panel[hidden] {
    display: none;
}
.ai-chat-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
}
.ai-chat-auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(56, 45, 40, .58);
}
.ai-chat-auth-modal__dialog {
    position: relative;
    max-width: 580px;
    margin: 22vh auto 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(56, 45, 40, .28);
    padding: 42px 48px 40px;
    text-align: center;
}
.ai-chat-auth-modal__close {
    position: absolute;
    top: 20px;
    right: 22px;
    border: 0;
    background: transparent;
    color: #382d28;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}
.ai-chat-auth-modal__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 34px;
}
.ai-chat-auth-modal__title {
    max-width: 440px;
    margin: 0 auto 34px;
    color: #382d28;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.35;
    font-weight: 700;
}
.ai-chat-auth-modal__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.ai-chat-auth-modal__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border-radius: 7px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    font-size: 16px;
}
.ai-chat-auth-modal__btn--green {
    background: #7cab3d;
}
.ai-chat-auth-modal__btn--brown {
    background: #9a715f;
}
.ai-chat-auth-modal__btn:hover{
    color: #fff;
}
.pd-notice {
    left: 18px;
    right: auto;
}
@media only screen and (max-width: 767px) {
    .ai-chat-field {
        display: block;
    }
    .ai-chat-submit {
        width: 100%;
        margin-top: 12px;
    }
    .ai-chat-meta {
        flex-wrap: wrap;
    }
    .ai-chat-widget {
        right: 18px;
        bottom: 22px;
    }
    .ai-chat-widget__panel {
        width: calc(100vw - 36px);
        padding: 20px;
    }
    .ai-chat-auth-modal__dialog {
        margin: 16vh 18px 0;
        padding: 38px 22px 28px;
    }
    .ai-chat-auth-modal__actions {
        grid-template-columns: 1fr;
    }
    .ai-chat-field textarea{
        width: 100%;
    }
    .ai-chat-meta .ai-chat-meta-one{
        display: flex;
        align-items: center;
        gap: 6px;
        width: 100%;
    }
    .ai-chat-requests-help em {
        right: -60px;
    }
    .ai-chat-requests-help em::before {
        right: 67px;
    }
}
