/* Container for the modal and content */
.modal {
    display: none; /* Initially hide the modal */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    /* Center the content using Flexbox when the modal is displayed */
    /* display: flex; */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

/* Modal content */
.modal-content {
    display: flex;
    flex-direction: column;
    width: 80%; /* Adjust width as needed */
    height: 80%; /* Adjust height as needed */
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(38, 35, 35, 0.3);
    position: relative; /* Ensure it is positioned relative to its parent */
    overflow: hidden; /* Prevents overflow outside the modal */
}

/* Control bar styling */
.control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2b2626e2;
    color: #fff;
    padding: 10px;
    position: relative;
}

.control-group {
    display: flex;
    gap: 15px;
}

.control-bar h2 {
    margin: 0;
    font-size: 16px;
    flex-grow: 1;
    text-align: center;
}

.close-btn {
    background: none;
    color: #fff;
    border: none;
    font-size: 32px;
    cursor: pointer;
    padding: 0 10px;
}

/* DOC and CONTEXT container */
.doc-context-container {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}

.doc-section {
    flex: 2; /* 2 parts out of 3, roughly 67% */
    overflow: auto; /* Allow scrolling in the DOC area */
    background-color: #ffffff; /* Optional: background color to distinguish CONTEXT area */
    border: 2px solid #27358c; /* Adjust the color and width as needed */
    padding: 15px; /* Adds spacing inside the border */
    border-radius: 5px; /* Optional: rounds the corners */
    margin: 10px; /* Adds spacing outside the border */

}

.context-section {
    flex: 1; /* 1 part out of 3, roughly 33% */
    overflow: auto; /* Allow scrolling in the CONTEXT area */
    background-color: #ffffff; /* Optional: background color to distinguish CONTEXT area */
    border: 2px solid #27358c; /* Adjust the color and width as needed */
    padding: 15px; /* Adds spacing inside the border */
    border-radius: 5px; /* Optional: rounds the corners */
    margin: 10px; /* Adds spacing outside the border */
}


/* Ensure iframe scales correctly */
iframe#docContent {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain; /* Ensure content fits within the iframe, respecting aspect ratio */
}

.doc-section img {
    max-width: 100%;
    height: auto;
    display: block;
}

.disabled {
    opacity: 0.5; /* Make disabled buttons appear faded */
    pointer-events: none; /* Prevent clicking on disabled buttons */
}

.loading-placeholder {
    position: fixed;
    top: 50%;
    left: 25%;
    transform: translate(-75%, -50%); /* Center the placeholder */
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    z-index: 5; /* Ensure it's above the iframe content */
}

