/* custom stylesheet */
:root {
    --bs-primary: #356CE8;
    --bs-primary-hover: #3458bf;
    --bg-color-light: rgba(53,108,232,0.4);
    --border-color-light: #d4e5ff;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--bs-primary-hover);
    --bs-btn-hover-border-color: var(--bs-primary-hover);
}
.icon-block {
  padding: 0 15px;
}
.icon-block .material-icons {
	font-size: inherit;
}

body {
    width:100vw;
    overflow-x: hidden;
}

.container {
    margin: 0 auto;
    max-width: 1280px;
    width: 95%;
}

@media only screen and (min-width: 601px) {
    .container {
        width: 95%;
    }
}

@media only screen and (min-width: 993px) {
    .container {
        width: 95%;
    }
}
.cookies-modal {
    top:auto;
    bottom:2rem;
    left:auto;
    right:2rem;
    width: 78%;
    height: 40%;
}
@media only screen and (min-width: 993px) {
    .cookies-modal {
        width: 40%;
    }
}

.chat-wrapper{
    min-height: calc(100vh - 2rem);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem 0 5.5rem;
    min-height:100vh;
}

.actions-block {
    position: absolute;
    bottom:1rem;
    left:0;
    width:100%;
    height:4rem;
    padding:0.875rem;
    border-radius: 0.5rem;

    background-color: #f0f2f3;
}
.actions-block__inner {}
.actions-block__top {display: none}
.actions-block__footer {display: none}

/* блок, который скрыт на моб. экране и показывается по клику*/
.actions-block__content {
    position: fixed;
    top: 0;
    left:-100%;
    padding: 2rem 1.75rem;
    background-color: rgba(240, 242, 243,0.95);
    width: 100%;
    height:90vh;
    transition: 0.9s;
    z-index: 100;
}
.actions-block__content.active {
    left:0;
}
.actions-block__content-close {
    position: absolute;
    top: 0.75rem;
    right: 1.75rem;
    font-size: 1.75rem;
    font-weight: 300;
    z-index: 105;
}
.actions-block__mob-history {
    opacity: 0.7;
}

.actions-block__mobile {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.actions-block__mobile > * {
    align-self: center;
}
.actions-block__person_mobile {}

@media only screen and (min-width: 993px) {
    .actions-block {
        align-self: stretch;
        position: relative;
        bottom: auto;
        width:calc(30% - 0.5rem);
        height:auto;
        margin-right: 0.5rem;
    }
    .actions-block__inner {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
    }
    .actions-block__content {
        position: relative;
        top: auto;
        left:auto;
        padding: 0;
        background-color: transparent;
        width: 100%;
        height:auto;
        transition: none;
    }
    .actions-block__content-close,
    .actions-block__mobile {display: none;}
    .actions-block__top {display: block; margin-bottom:2rem;}
    .actions-block__footer {
        width:100%;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        padding: 0.5rem;
        border-radius: 0.5rem;
        background-color: white;
    }
    .actions-block__footer > * {
        align-self: center;
    }
    .actions-block__person {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        width:100%;
        margin-bottom:0.5rem;
    }
    .actions-block__person-inner {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
    }
    .actions-block__person img {
        align-self: center;
        margin-right: 0.5rem;
    }
    .actions-block__person-text {
        align-self: center;
        font-size:0.75rem;
        /*color:var(--bs-tertiary-color);*/
    }
    .actions-block__person .btn {align-self: center;height: 32px;}
}

.chat-block {
    position: relative;
    width:100%;
    height: calc(100vh - 7.5rem);
    border-radius: 0.5rem;
    padding:0.875rem;

    background-color: #f0f2f3;
}
.chat-block__dialog {
    position: relative;
    top:1rem;
    height:62vh;
    overflow-y: auto;
    max-width:820px;
}
.chat-block__text-input {
    position: absolute;
    bottom:0.875rem;
    left:1rem;
    width:calc(100% - 2rem);
    max-width:820px;
    /*max-height:20%;*/
}
.chat-block__form {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.chat-block__form>div:first-child {
    margin-bottom: 0.5rem;
}
.chat-block__select-wrapper {
    width:50%;
    max-width:200px;
}
.chat-block__textarea {
    position: absolute;
    bottom:0;
    left:0;
    width:100%;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    padding-right: 5.5rem;
    padding-left: 3rem;
    padding-top: 1rem;
    min-height: calc(3em + 0.75rem + calc(var(--bs-border-width) * 2)) !important;
    /*max-height:88px;*/
    resize: none;
}
.chat-block__textarea::placeholder {
    font-size:0.875rem;
}

.chat-block__textarea:focus {
    background-color: white;
    border-color: transparent;
    outline: 0;
    box-shadow: none;
}
.chat-block__textarea-wrapper {
    position: relative;
    min-height: calc(3em + 0.75rem + calc(var(--bs-border-width) * 2)) !important;
}
.chat-block__download {
    position: absolute;
    top: 0.7rem;
    left: 0.875rem;
    /*transform: translateY(-50%);*/

    -webkit-appearance: none;
    background-color: var(--border-color-light);
    border:1px solid transparent;
    width:24px;
    height:24px;
    border-radius: 0.25rem;
    background-image: url(../../images/icons/icon-attach.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: auto 18px;
    cursor: pointer;
}
.chat-block__send {
    position: absolute;
    top: 0.7rem;
    right:0.5rem;
    /*transform: translateY(-50%);*/
    line-height: 1 !important;
    height: 32px;
    width: 32px;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.chat-block__send .material-icons {font-size: 21px !important;}

.chat-block__file-for-prompt {
    display: none;
    position: absolute;
    top:0;
    right:0;
    text-align: right;
    padding: 0.25rem 2rem 0.25rem 0.5rem;
    font-weight: 400;
    line-height: 1.5;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: var(--bs-border-width) solid var(--bs-border-color);
    font-size: 0.875rem;
    border-radius: var(--bs-border-radius-sm);
    max-width:45%;
}
.chat-block__file-for-prompt.active {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
}
.chat-block__file-for-prompt >* {align-self: center}
.chat-block__file-for-prompt .material-icons {
    color: var(--primary-color);
    margin-right: 0.25rem;
    height:22px;
}
.chat-block__file-remove {
    position: absolute;
    top:0.25rem;
    right:0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    cursor: pointer;
}
.material-icons_attach {font-size: 1rem;}
.text-resizer {
    display: none;
    position: absolute;
    top:0;
    left:0;
    width:100%;
    height:12px;
    text-align: center;
    /*background-color: white;*/
    /*border: 1px solid var(--bs-border-color);*/
    /*border-bottom-width: 0;*/
    user-select: none;

    color: var(--bs-secondary);
    cursor: ns-resize;
    opacity:0;
}

@media only screen and (min-width: 993px) {
    .chat-wrapper{
        flex-direction: row;
        justify-content: space-between;
        padding-bottom: 1.5rem;
    }
    .chat-block {
        align-self: stretch;
        width:calc(70% - 0.5rem);
        height:auto;
        margin-left: 0.5rem;
    }
    .chat-block__dialog {
        height: 72vh;
    }
    .chat-block__textarea {
        min-height: calc(3.5em + 0.75rem + calc(var(--bs-border-width) * 2)) !important;
        /*max-height:110px;*/
        max-height:500px;
        padding-right: 8.5rem;
        padding-left: 4rem;
    }
    .chat-block__textarea-wrapper {
        min-height: calc(3.5em + 0.75rem + calc(var(--bs-border-width) * 2)) !important;
        max-height:500px;
    }
    .text-resizer {
        display: block;
    }
    .chat-block__download {
        top: 1.5rem;
    }
    .chat-block__send {
        top: 1.5rem;
    }
}
/* блок с подключением поиска по веб */
.custom-tooltip {
    --bs-tooltip-bg: var(--border-color-light);
    --bs-tooltip-color: var(--bs-primary);
    line-height: 125%;
    font-size:0.8125rem;
}
.chat-block__web-search {
    position: absolute;
    top: 0.95rem;
    right: 3.5rem;
    /*transform: translateY(-50%);*/
    font-size:0.75rem;
    line-height: 1 !important;
    height: 24px;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;

    display: flex;
    flex-direction: row;
    justify-content: flex-start;

    border:1px solid var(--bs-secondary);
    border-radius: 4px;
    color: var(--bs-secondary);
    opacity: 0.5;

    cursor: pointer;
}
.chat-block__web-search .material-icons{
    font-size:20px;
    font-weight: 200;
    align-self: center;
}
.chat-block__web-search span{
    display: none;
}
.chat-block__web-search:hover,
.chat-block__web-search.activated,
#web-search:checked + .chat-block__web-search{
    border:1px solid var(--bs-primary);
    color: var(--bs-primary);
    opacity: 1;
}
@media only screen and (min-width: 993px) {
    .chat-block__web-search {
        top: 1.8rem;
    }
    .chat-block__web-search span{
        display: block;
        align-self: center;
    }
}

:root {
    --primary-color:var(--bs-primary);
    --message-bg-color:var(--bg-color-light);

}
.message-wrapper {
    width:100%;
}
.message-wrapper__greeting {padding-top: 10vh;}
.message {
    position: relative;
    font-size:0.875rem;
    line-height:140%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.message__content {
    width: calc(100% - 24px - 0.5rem);
}
.message__icon {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: calc(24px + 0.5rem);
    padding-left: 0.5rem;
}

.message__sender {
    margin-bottom: 0.25rem;
}
.message__sender strong {}
.message__text {
    position: relative;
    background-color: var(--message-bg-color);
    color: white;
    padding:0.5rem 4rem 0.5rem 0.5rem;
    border-radius:0.5rem 0.5rem 0 0.5rem;
}
.message__text p {
    margin-bottom: 0.5rem;
}
.message__time {
    position: absolute;
    bottom:0.5rem;
    right:0.5rem;
    font-size: 0.625rem;
}
.message__actions {
    position: relative;
    padding-top: 0.25rem;
    padding-left: 0.5rem;
    font-size: 0.625rem;
    color: gray;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;

}
.message__actions>* {margin-right:0.25rem;}
.message__actions-btn {
    -webkit-appearance: none;
    background: transparent;
    border:none;
    outline:none;
    padding:0;
    font-size:15px;
    color: var(--bs-primary);
}
.message__actions-btn .material-icons {font-size:15px !important;}
.message__actions-btn .material-icons:hover {filter: drop-shadow(3px 3px 6px gray) invert(75%);}

.message_req {
    padding-left:calc(24px + 0.5rem);
}
.message_reply {
    flex-direction: row-reverse;
}
.message_reply .message__icon {padding-left: 0;padding-right: 0.5rem;}
.message_reply .message__text {background-color: transparent; color: black;}
.message_reply .message__time {bottom:0.5rem;right:2.5rem;}
.message ul,
.message ol {
    margin-bottom: 0.3rem !important;
}

.btn-modal-delete-close {cursor: pointer}

.index-use-variants {
    border-radius:0.625rem;
    border:0.5rem solid #d5e4ff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding:0.5rem;
    margin: 0.5rem;
}
.index-use-variants img {max-width:80px;margin-bottom: 0.5rem;align-self: center}
.index-use-variants h4,.index-use-variants h5 { text-align: center}
.index-use-variants p { text-align: center; line-height: 120%;}

/* выбор ai */
.chat-block__ai-select {
    display: block;
    width: 100%;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--bs-body-bg);
    background-image: url(../../images/icons/arrow-down.svg);
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: var(--bs-border-width) solid var(--bs-border-color);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    padding-left: 0.5rem;
    font-size: 0.875rem;
    border-radius: var(--bs-border-radius-sm);
    cursor: pointer;
}
.ai-list {
    position: absolute;
    left:0;
    top:-245px;
    /*width:300px;*/
    width:246px;
    height:240px;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-sm);
    padding:0.625rem;
    background-color: white;
}
.ai-list.hide {display: none}
.ai-list__controls {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    margin-bottom: 0.5rem;
}
.ai-list__tab-btn {
    margin-right: 0.25rem;
    background-color: var(--border-color-light);
    border-color: var(--border-color-light);
}
.ai-list__tab-btn:hover{
    background-color: var(--bg-color-light);
    border-color: var(--bg-color-light);
}
.ai-list__tab-btn:last-child {
    margin-right: 0;
}
.ai-list__tab {}
.ai-list__btn {
    -webkit-appearance: none;
    border:none;
    outline: none;
    background-color: white;
    padding:0.5rem 0.25rem;
    font-size: 0.875rem;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
}
.ai-list__icon {
    width:20px;
    margin-right: 0.75rem;
}
.ai-list__btn span {}

/* история запросов */
.actions-block__history {
    /*display: none;*/
    position: relative;
    max-height:60vh;
    overflow-y: auto;
}
.history-block {
    position: relative;
    background-color: var(--border-color-light);
    border-radius: 0.5rem;
    padding:0.25rem 1.1rem 0.25rem 1.25rem;
    margin-bottom:0.5rem;
    cursor: pointer;
}
.history-block__title {
    /*display: flex;*/
    /*flex-direction: row;*/
    /*justify-content: flex-start;*/
    font-size:0.875rem;
}
.history-block::after {
    content: '';
    position: absolute;
    top: 36%;
    right: 0.75rem;
    width: 0.75rem;
    height: 0.75rem;
    background-image: url(../../images/icons/arrow-down.svg);
    background-repeat: no-repeat;
    background-position: 0 0;
    background-size: 12px 12px;
    transform: rotate(-90deg);
}
.history-block__subtitle {
    font-size:0.75rem;
    opacity:0.8;
}
.history-block__delete {
    position: absolute;
    top: 0;
    left: 5px;
    font-size: 1.125rem;
}
@media only screen and (min-width: 993px) {
    .actions-block__history {display: block}
}
.material-icons_in-list {
    position: relative;
    top:7px;
}
footer .nav-link {
    font-size: 0.75rem;
    padding-top: 0 !important;
    padding-bottom: 0.25rem !important;
}
.highlight {
    padding: .75rem 1.25rem;
    border: 1px solid #dee2e6;
    border-radius: calc(var(--bs-border-radius) - 1px);
    background-color: #f8f9fa;
}
.code-piece,
.code-block {
    font-family: "Courier New", "Courier", monospace;
}
.message_req a {color: white}
.message_reply .font-monospace {
    background-color: var(--border-color-light);
}
@media (min-width: 576px) {
    .modal-dialog {
    /*--bs-modal-width: 800px;*/
        /*max-width: 800px !important;*/
    }
}
.popover-chat-actions {
    position: absolute;
    top:-45%;
    left:18px;

    width:120px;
    padding:0.75rem 0.625rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color-light);
    background-color: white;
    z-index: 20;
}
.popover-chat-actions_tooltip {
    border: 1px solid var(--primary-color);
    top: -12px;
    left: 204px;
    width: 220px;
}
.popover-chat-actions_tooltip::before {
    content:'';
    position: absolute;
    display: block;
    width: 0;
    height: 0;
    top:40%;
    left:-9px;
    border-width:10px;
    border-color: transparent white transparent transparent;
    border-style: solid;
}
.popover-chat-actions__btn {
    position: relative;
    color:black;
    font-size: 0.75rem;
    line-height: 120%;
    margin-bottom: 0.625rem;
    cursor: pointer;
}
.popover-chat-actions__btn:last-child {
    margin-bottom: 0;
}
.popover-chat-actions__text {
    position: relative;
    color:var(--primary-color);
    font-size: 0.75rem;
    line-height: 120%;
}
.popover-chat-actions__close {
    position: absolute;
    top: 0;
    right: 4px;
    font-size: 1.125rem;
    line-height: 1;
    font-weight: 400;
    color: var(--primary-color);
    cursor: pointer;
}


.no-pad-left {padding-left:0 !important;}

@media (min-width: 1200px) {
    h1, .h1 {font-size: 1.85rem;}
    h2, .h2 {font-size: 1.5rem;}
    h3, .h3 {font-size: 1.25rem;}
}
.accordion {
    --bs-accordion-color: var(--bs-body-color);
    --bs-accordion-bg: transparent;
    --bs-accordion-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease;
    --bs-accordion-border-color: transparent;
    --bs-accordion-border-width: var(--bs-border-width);
    --bs-accordion-border-radius: var(--bs-border-radius);
    --bs-accordion-inner-border-radius: calc(var(--bs-border-radius) - (var(--bs-border-width)));
    --bs-accordion-btn-padding-x: 1.75rem;
    --bs-accordion-btn-padding-y: 1rem;
    --bs-accordion-btn-color: var(--bs-body-color);
    --bs-accordion-btn-bg: var(--bs-accordion-bg);
    --bs-accordion-btn-icon: url('../../images/icons/icon-plus.svg');
    --bs-accordion-btn-icon-width: 1.25rem;
    --bs-accordion-btn-icon-transform: rotate(-180deg);
    --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out;
    --bs-accordion-btn-active-icon: url('../../images/icons/icon-minus.svg');
    --bs-accordion-btn-focus-box-shadow: none;
    --bs-accordion-body-padding-x: 1.75rem;
    --bs-accordion-body-padding-y: 0.5rem;
    --bs-accordion-active-color: var(--bs-primary-text-emphasis);
    --bs-accordion-active-bg: transparent;
}

.accordion-item {
    color: var(--bs-accordion-color);
    background-color: var(--bs-accordion-bg);
    border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color);
}
.actions-block__history .accordion-button {font-weight: 500}
.actions-block__history .accordion-button::after {
    position: absolute;
    left: 0;
}
.actions-block__history .accordion-body {
    padding-top: 0;
    font-size: 0.875rem;
}

.admin-textarea {
    height: 172px !important;
}
.admin-description {
    height: 96px;
    overflow-y: auto;
}

.agent-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-left:-0.75rem;
    margin-right:-0.75rem;
    margin-bottom: 0.75rem;
}
.agent {
    position: relative;
    width:calc(100% - 1rem);
    margin: 0.5rem;
    border:1px solid var(--bs-primary);
    border-radius: 0.5rem;
    padding:0 0 2.25rem;
    overflow: hidden;
    cursor: pointer;

    transition: 0.2s ease-in-out;
}
.agent.copied {filter:grayscale(0.7)}
.agent.copied::after {
    content: '';
    display: block;
    position: absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(38,38,40,0.1) url('../../images/icons/icon-check-all_700.svg') center center no-repeat scroll;
    background-size: 120px auto;
    opacity:0.6;

}
.agent__title {
    background-color: var(--border-color-light);
    font-size:0.875rem;
    font-weight: 500;
    line-height: 120%;
    min-height:56px;
    padding:0.75rem 0.75rem 0.5rem;
    margin-bottom: 0.5rem;
}
.agent__purpose,
.agent__description {
    font-size:0.75rem;
    padding:0 0.75rem 0.875rem;
}
.agent__btn {
    position: absolute;
    left:50%;
    bottom:0.75rem;
    transform: translateX(-50%);
    background-color: var(--bs-primary);
    color: white;
    padding:0 0.875rem;
    height:1.5rem;
    line-height:1.5rem;
    font-size:0.875rem;
    border-radius: 0.5rem;
}
.agent__btn_delete {
    background-color: var(--bs-danger);
}
.agent__btn:hover {
    filter: grayscale(80%);
}
.agent__btn-box {
    position: absolute;
    left:0.75rem;
    right:0.75rem;
    bottom:0.75rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    /*padding: 0 0.75rem 0.75rem;*/
}
.agent__btn-box .agent__btn {
    position: relative;
    left:auto;
    bottom:auto;
    transform: translateX(0);
}
@media (min-width: 576px) {
    .agent {
        width: calc((100% / 3) - 1rem);
    }
}
.modal-body p { line-height: 120%; }

.table_message th,
.table_message td { text-align: center}
.table_message th:first-child,
.table_message td:first-child { text-align: left}