#chat {}

.chat {}

#chat-container {}

.chat-container {}

#chat-input{
    display: grid;
    grid-template-columns: max-content auto max-content;
    background-color: #f4f4f4;
    border-radius: 16px;

    position: fixed;
    bottom: 2%;
    left: 50%;
    transform: translateX(-50%);
    width: 1280px;
    max-width: 1280px;
    padding: 5px 20px;
}
.chat-input-admin {
    display: grid;
    grid-template-columns: max-content auto max-content;
    background-color: #f4f4f4;
    border-radius: 16px;

    position: absolute;
    bottom: 1%;
    left: 50%;
    transform: translateX(-50%);
    width: 98%;
    /*max-width: 1280px;*/
    padding: 5px 20px;
}

#voice-input {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    /*background-color: #f4f4f4;*/
    /*border-radius: 16px;*/

    position: fixed;
    bottom: 2%;
    left: 50%;
    transform: translateX(-50%);
    width: 1280px;
    max-width: 1280px;
    /*padding: 5px 20px;*/
}
#record-btn {
    position: relative;
    display: inline-block;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background-color: red;
}
#record-btn:hover {
    background: radial-gradient(circle, darkred 30%, red 70%);
}
#record-btn[disabled] {
    pointer-events: none;
    background: #c4c4c4;
}
#record-hint {
    content: 'Нажми, чтобы ответить'
}
#record-hint[disabled] {
    content: 'Ожидание вопроса...'
}

#record-timer {
    margin: 0!important;
    position: absolute;
    top:50%;
    left: 50%;
    transform: translate(-50%,-50%);
    color: white;
    font-weight: bold;
}

#logout-empty-chat-suggests {
    display: grid;
    justify-content: center;
    justify-items: center;
    grid-gap: 30px;

    position: absolute;
    width: 50%;
    height: 50%;
    /*top: 70%;*/
    left: 50%;
    transform: translate(-50%);
}

#logout-empty-chat-suggests a {
    align-content: center;
    padding: 5px 20px;
    margin-bottom: 10px;
}

#logout-empty-chat-suggests a:hover {
    background: linear-gradient(90deg, #9E6FC3 0%, #B693D2 100%);
}

#chat-input[disabled], #chat-input.disabled, #chat-input[disabled] *, #chat-input.disabled *,
.chat-input-admin[disabled], .chat-input-admin.disabled, .chat-input-admin[disabled] *, .chat-input-admin.disabled *
{
    background-color: #c4c4c4!important;
    border-color: #c4c4c4!important;
    /*pointer-events: none;*/
    pointer-events: auto;
    user-select: none;
    /*caret-color: transparent;*/
    cursor: not-allowed;
}

#file-input-container, #send-btn-container {
    width: 10%;
}

#chat-input textarea {
    width: 100%;
    background-color: #f4f4f4!important;
    border-color: #f4f4f4;
    resize: none;
}

#messages, .messages {
    padding: 15px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.messages {
    height: 51vh;
    max-height: 51vh;
    padding-bottom: 200px;
}

.message {
    position: relative;
    font-weight: 500;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 16px;
    max-width: 75%;
    min-width: 25%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;

    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    pointer-events: auto; /* чтобы кликать можно было */
    cursor: default;
}

.message pre {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    margin: 0;
    line-height: 1.3;
}

.message pre * {
    line-height: 1.3;
}

.message pre > *:not(:last-child) {
    margin-bottom: .3rem;
}

.message pre p:last-child {
    margin: 0;
}

.message-buttons-container {
    display: grid;
    /*grid-template-columns: repeat(2, 1fr);*/
    grid-gap: 10px;
    padding: 15px 0 0 0;
}

.message-btn {
    color: #9E6FC3;
    border: 1px solid #9E6FC3!important;
    border-radius: 10px;
    padding: .5rem 1rem;
    cursor: pointer;
}
.message-btn pre {
    white-space: nowrap;
}

.incoming {
    background-color: white;
    border: 1px solid #ECEBEB;
    align-self: flex-start;
}

.outgoing {
    background-color: #E8EBF2;
    border: 1px solid #E8EBF2;
    align-self: flex-end;
}

.outgoing a {
    color: black!important;
}

.incoming img {
    border-radius: 50%;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

#input-message {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

#send-btn, #file-btn, #fullscreen-btn,
.send-btn, .file-btn
{
    border: none;
    background: none;
    cursor: pointer;
    color: #000;
}

details {
    margin-bottom: 10px;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 10px;
    background: #f9f9f9;
    cursor: pointer;
}
summary {
    font-weight: bold;
    cursor: pointer;
}

#file-preview {
    display: grid;
    grid-template-columns: auto auto;
    grid-gap: 10px;
    align-items: center;

    position: absolute;
    top: -75px;
    color: #555;
    background-color: #f0f0f0;
    border-radius: 16px;
    padding: 10px;
}
#file-preview #file-type-pic {
    font-size: 2rem;
}
#file-preview #del-file-preview {
    position: absolute;
    top: -10px;
    right: -10px;
}
#file-preview #del-file-preview i, .chat-file-preview {
    font-size: 1.5rem;
}
.chat-file-preview-filename {
    font-size: .8rem;
}
#file-preview #del-file-preview:hover {
    color: red;
    cursor: pointer;
}
.chat-file-preview-download {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

#audio-preview {
    display: grid;
    grid-template-columns: auto auto;
    grid-gap: 10px;
    align-items: center;

    position: absolute;
    top: -75px;
    color: #555;
    background-color: #f0f0f0;
    border-radius: 16px;
    padding: 10px;
}
#audio-preview #del-audio-file-preview {
    position: absolute;
    top: -10px;
    right: -10px;
}
#audio-preview #send-audio-btn {
    font-size: 1.3rem;
}
#audio-preview #send-audio-btn:hover {
    color: green;
}

.chat-message-audio {
    width: 100%;
    margin-top: 8px;
}
.chat-message-redo {
    position: absolute;
    right: 10px;
    bottom: -10px;
    color: red;
    background-color: #c4c4c4;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
}
.chat-message-redo * {
    color: red;
    font-weight: bold;
    margin: 0!important;
}

#assistant-typing {}

#countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    font-size: 10vh;
    color: #A16AD8;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; /* важно: по умолчанию не мешает кликам */
  }

#countdown-overlay.active {
    pointer-events: auto; /* активируем клики только во время отсчёта */
  }

#interview-main-countdown-wrapper {
    display: none;
    position: fixed;
    left: 82px;
    top: 50px;
    padding: 10px;
    align-items: center;
    justify-content: center;
    color: #A16AD8;
    font-size: .9rem;
    z-index: 9999;
}

#interview-main-countdown-wrapper span:first-child {
    margin-right: 5px!important;
}

@media screen and (max-width: 1399px) {
    #chat-input {
        width: 1100px;
    }
}

@media screen and (max-width: 1199px) {
    #chat-input {
        width: 920px;
    }

    .message-buttons-container {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media screen and (max-width: 991px) {
    #chat-input {
        width: 680px;
    }

    #logout-empty-chat-suggests {
        grid-gap: 20px;
    }

    #logout-empty-chat-suggests a {
        font-size: 12px;
        padding: 3px 10px;
        margin-bottom: 5px;
    }
}

@media screen and (max-width: 767px) {
    #chat-input {
        width: 500px;
    }

    .message-btn {
        font-size: .8rem;
    }
}

@media screen and (max-width: 575px) {
    #chat-input {
        width: calc(90%);
    }
    .message-btn {
        font-size: .6rem;
    }
}

@media screen and (max-width: 413px) {
    #logout-empty-chat-suggests {
        grid-gap: 10px;
    }

    #logout-empty-chat-suggests h3 {
        font-size: 18px;
    }

    #logout-empty-chat-suggests a {
        font-size: 12px;
        padding: 0 10px;
        margin-bottom: 4px;
    }

    #interview-main-countdown-wrapper {
        left: 44px;
        top: 30px;
        font-size: .7rem;
        /*bottom: 120px;*/
        /*transform: translateX(-50%);*/
        /*text-align: center;*/
    }
}