#video2docx-modal.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.4);
}

#video2docx-modal .modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#video2docx-modal .close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 1;
}

#video2docx-modal .close:hover,
#video2docx-modal .close:focus {
    color: black;
    text-decoration: none;
}

#video2docx-modal .modal-body {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}

#video2docx-modal .reference-list {
    width: 30%;
    padding-right: 20px;
    overflow-y: auto;
}

#video2docx-modal .report-container {
    width: 70%;
    display: flex;
    flex-direction: column;
}

#video2docx-modal #report-editor {
    border: 1px solid #ddd;
    min-height: 300px;
    padding: 10px;
    margin-top: 10px;
    flex-grow: 1;
    overflow-y: auto;
}

#video2docx-modal .report-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

#video2docx-modal .download-button,
#video2docx-modal .regenerate-button,
#video2docx-modal .save-button {
    flex: 1;
    margin: 0 5px;
    padding: 8px 16px;
    background-color: white;
    color: #F08521;
    border: 2px solid #F08521;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

#video2docx-modal .download-button:hover,
#video2docx-modal .regenerate-button:hover,
#video2docx-modal .save-button:hover {
    background-color: #F08521;
    color: white;
}

#video2docx-modal #source-list {
    list-style-type: none;
    padding-left: 0;
}

#video2docx-modal #source-list li {
    margin-bottom: 5px;
}

/* New styles for the report editor */
#video2docx-modal #report-editor {
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

#video2docx-modal #report-editor h1,
#video2docx-modal #report-editor h2,
#video2docx-modal #report-editor h3,
#video2docx-modal #report-editor h4,
#video2docx-modal #report-editor h5,
#video2docx-modal #report-editor h6 {
    margin-top: 20px;
    margin-bottom: 10px;
}

#video2docx-modal #report-editor ul {
    margin-left: 20px;
}

#video2docx-modal #report-editor li {
    margin-bottom: 5px;
}

#video2docx-modal #report-editor p {
    margin-bottom: 15px;
}


/* Video Chat Modal */
#video-chat-modal {
    display: block;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

#video-chat-modal .modal-content {
    position: relative;
    background-color: #ffffff;
    margin: 2% auto;
    padding: 20px;
    border: 1px solid #e0e0e0;
    width: 95%;
    height: 95vh;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

#video-chat-modal .close {
    color: #888;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    left: 20px;
    top: 15px;
    z-index: 1;
}

#video-chat-modal .close:hover,
#video-chat-modal .close:focus {
    color: #000;
}

#video-chat-modal .modal-body {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow: hidden;
    gap: 20px;
}

#video-chat-modal .video-container {
    flex: 0 0 60%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
}

#video-chat-modal #youtube-video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#video-chat-modal .chat-container {
    flex: 0 0 38%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f9f9f9;
}

#video-chat-modal .chat-container h3 {
    padding: 15px 20px;
    margin: 0;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    font-size: 18px;
    color: #333;
}

#video-chat-modal #chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
}

#video-chat-modal .user-message,
#video-chat-modal .bot-response {
    max-width: 80%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 10px;
}

#video-chat-modal .user-message {
    align-self: flex-end;
    background-color: #fdc087ef;
}

#video-chat-modal .bot-response {
    align-self: flex-start;
    background-color: #f0f0f0;
}

#video-chat-modal .chat-input-container {
    display: flex;
    padding: 15px;
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
}

#video-chat-modal #chat-input {
    width: 80%;
    padding: 12px 15px;
    font-size: 14px;
    border: 1px solid #d0d0d0;
    border-radius: 25px;
    margin-right: 10px;
    outline: none;
    min-height: 50px;
}

#video-chat-modal #send-button {
    width: 20%;
    background-color: #F08521;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    padding: 0 20px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

#video-chat-modal #send-button:hover {
    background-color: #e07100;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    #video2docx-modal .modal-content {
        position: relative;
        width: 95%;
        margin: 5% auto;
    }

    #video2docx-modal .modal-body {
        flex-direction: column;
    }

    #video2docx-modal .reference-list,
    #video2docx-modal .report-container {
        width: 100%;
        padding-right: 0;
    }

    #video2docx-modal .reference-list {
        margin-bottom: 20px;
    }

    #video-chat-modal .modal-content {
        position: relative;
        width: 95%;
        height: 90%;
        margin: 5% auto;
    }

    #video-chat-modal .modal-body {
        flex-direction: column;
    }

    #video-chat-modal .video-container,
    #video-chat-modal .chat-container {
        flex: none;
        width: 100%;
        margin-right: 0;
        margin-bottom: 16px;
    }

    #video-chat-modal #youtube-video {
        height: 200px;
    }
}