body.page-id-132 header,
body.page-id-132 footer {
display: none;
}

.admin-bar #borz-chat-wrapper {
 height: calc(100vh - 32px) !important;
}

/* ----------------- Общие контейнеры ----------------- */
#borz-chat-wrapper {
    display: flex;
    height: 100vh;
    font-family: Arial, sans-serif;
    background: #fff;
    color: #000;
}

.borz-dark-theme {
    background: #1e1e1e;
    color: #eee;
}

/* ----------------- Сайдбар ----------------- */
#borz-chat-sidebar {
    width: 260px;
    background: #f7f7f7;
    padding: 10px;
    border-right: 1px solid #ccc;
    display: flex;
    flex-direction: column;
}

.borz-dark-theme #borz-chat-sidebar {
    background: #2c2c2c;
    border-color: #555;
}

/* ----------------- Блок пользователя ----------------- */
.borz-user-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.borz-username {
    font-weight: bold;
}

/* ----------------- Список чатов ----------------- */
#borz-chat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

#borz-chat-list li {
    padding: 6px 10px;
    border-bottom: 1px solid #ddd;
    position: relative;
    cursor: pointer;
}

.borz-dark-theme #borz-chat-list li {
    border-color: #555;
}

#borz-chat-list li.active {
    background: #e0e0e0;
}

.borz-dark-theme #borz-chat-list li.active {
    background: #333;
}

/* ----------------- Кнопка меню ⋮ ----------------- */
.borz-chat-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    float: right;
    font-size: 18px;
}

/* ----------------- Меню ⋮ ----------------- */
.borz-chat-options {
    display: none;
    position: absolute; /* JS будет корректно позиционировать */
    background: #fff;
    border: 1px solid #ccc;
    padding: 5px 0;
    border-radius: 4px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    z-index: 2000;
    min-width: 140px;
}

.borz-dark-theme .borz-chat-options {
    background: #2c2c2c;
    border: 1px solid #555;
    color: #eee;
}

.borz-chat-options button {
    display: block;
    width: 100%;
    padding: 6px 10px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
}

.borz-chat-options button:hover {
    background: #eee;
}

.borz-dark-theme .borz-chat-options button:hover {
    background: #444;
}

/* ----------------- Основной чат ----------------- */
#borz-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fafafa;
}

.borz-dark-theme #borz-chat-main {
    background: #222;
}

#borz-chat-settings {
    padding: 10px;
    border-bottom: 1px solid #ccc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.borz-dark-theme #borz-chat-settings {
    border-color: #555;
}

/* ----------------- Сообщения ----------------- */
#borz-chat-messages {
    padding: 10px;
    overflow-y: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}


.borz-user-msg, .borz-ai-msg {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 80%;
    word-wrap: break-word;
    white-space: pre-wrap;
}


.borz-user-msg {
    background-color: #d1e7dd;
    align-self: flex-end;
}

.borz-ai-msg {
    background-color: #e2e3e5;
    align-self: flex-start;
}

.borz-dark-theme .borz-ai-msg {
    background: #333;
    color: #fff;
}

/* ----------------- Поле ввода ----------------- */
#borz-chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc;
    gap: 5px;
}

.borz-dark-theme #borz-chat-input {
    border-color: #555;
}

#borz-message-input {
    flex: 1;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    resize: none;
}

.borz-dark-theme #borz-message-input {
    background: #333;
    color: #fff;
    border-color: #555;
}

/* ----------------- Модальное окно библиотеки ----------------- */
#borz-library-modal {
    display: none;
    position: fixed;
    top:0;
    left:0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#borz-library-modal .borz-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
    padding: 20px;
    position: relative;
}

.borz-dark-theme #borz-library-modal .borz-modal-content {
    background: #2c2c2c;
    color: #eee;
}

.borz-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
}

/* ----------------- Элементы библиотеки ----------------- */
#borz-library-files .borz-lib-item {
    padding: 6px 10px;
    border-bottom: 1px solid #ccc;
}

.borz-dark-theme #borz-library-files .borz-lib-item {
    border-color: #555;
}

.borz-lib-item a {
    text-decoration: none;
    color: #007bff;
}

.borz-dark-theme .borz-lib-item a {
    color: #66aaff;
}


/* ----------------- Модальные окна ----------------- */
.borz-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.borz-modal-content {
    background: #fff;
    padding: 25px 30px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    text-align: center;
    position: relative;
    font-family: Arial, sans-serif;
}

.borz-modal-content h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
}

.borz-modal-content button {
    margin: 5px 10px;
    padding: 10px 20px;
    border: none;
    background: #0073aa;
    color: #fff;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.borz-modal-content button:hover {
    background: #005177;
}

.borz-modal-content .borz-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 22px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}
