/* static/file_insights.css */

#deleteDocumentForm {
    color: #000;
}

#deleteDocumentForm button {
    color: #000;
}

#documentSwitcher {
    height: 2.85em;
    font-size: 1.1em;
    font-weight: 900;
    padding: 5px;
    margin-bottom: -5px;
}

/* Style the GENERATE button similar to the Submit button from Paste File page */
#generateButton {
    background-color: #E5A028;
    border: 1px solid #F0BE67;
    border-radius: 10px;
    color: #000;
    font-family: "Roboto Mono", monospace;
    font-size: 1.3em;
    font-weight: 600;
    height: 2.17em;
    margin-left: 5px;
    margin-top: 15px;
    min-width: 200px;
    padding: 10px 20px;
    padding-left: 15px;
    padding-right: 15px;
    width: 300px;
}

#generateButton:hover {
    background-color: #D49420; /* Hover effect similar to the Paste File page */
}

/* Specifically target the Category prefix input */
#journal_category_prefix {
    width: 43%;
    max-width: 300px;
}

/* Adjusts visibility of the "Category prefix" placeholder text */
#journal_category_prefix::placeholder {
    color: #565656;
    font-weight: bold;
}

#userPrompt {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    resize: vertical;
}

form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    width: 95%;
    margin: 0 auto;
}

/* Centering the title similar to the Paste File page */
.centered-title {
    font-family: 'Roboto Mono', monospace; /* Matches font from Paste File page */
    font-size: 2.5em; /* Matches font size from Paste File page */
    font-weight: 600; /* Matches the weight used in the Paste File page */
    text-align: center; /* Center the title */
    margin-bottom: 20px; /* Adds spacing similar to the Paste File page */
}

.submit-button {
    background-color: var(--button-color);
    margin-left: auto; /* Aligns the button to the right */
    margin-right: 0; /* Ensures it doesn’t extend beyond the form width */
    color: #000;
}

.submit-button.btn-primary, .submit-button.btn-primary2 {
    font-weight: 900;
    height: 90px;
    padding: 10px 10px;
    padding-bottom: 5px;
    font-size: 1.6em;
    line-height: 1.2em; /* Ensures text height is aligned with button size */
    width: auto; /* Lets the button size adjust based on content */
    min-width: 200px; /* Ensures a minimum width to prevent squashing */
    text-align: center;
    background-color: var(--button-color);
    border-radius: 15px;
    color: #000;
}

.submit-button.btn-primary2 {
    height: 78px;
}


.form-label, .form-label2{
  color: #C3BDB2;
  font-family: "Roboto Mono", mono, sans;
  font-size: 25px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-left: 5px;
  padding-right: 15px;
  padding-top: 5px;
  white-space: pre-wrap; /* Ensures label text wrapping to allow narrower label for smaller screens */
}
.form-label2 {
  color: #000;    
}

.form-control, .form-control2, .form-control3 {
    font-size: 0.9em;
    height: 4em;
    width: 10em;
    background-color: #BCB5A9;
    border: 1px solid #707070;
    border-radius: 10px;
    margin-right: 5px;
    padding: 5px;
    min-width: 100px; /* Ensures a minimum width to prevent squashing */
    border-radius: 10px;
}

.form-control2 {
    height: 3.25em;
    font-weight: bold;
}
.form-control3 {
    height: 2.7em;
    font-weight: bolder;
}

/* Aligning the instruction text with the text-preview div */
.instruction-text {
    text-align: center; /* Centers the instruction text */
    margin-left: auto; /* Aligns it with text-preview's left margin */
    margin-right: auto; /* Centers the instruction text */
    padding-left: 20px; /* Adjusts padding to match .text-preview */
    width: 95%; /* Matches the width of .text-preview */
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

.metadata, .text-preview, .text-preview2, .metadata2 {
    background-color: #EAE6DE; /* Matches the background from paste.css */
    border: 1px solid #ccc; /* Matches the border style from paste.css */
    border-radius: 30px; /* Matches the border-radius from paste.css */
    padding: 20px; /* Adds padding consistent with paste.css */
    box-sizing: border-box; /* Ensures consistent box-sizing */
    margin: 20px auto; /* Centers the div similar to the paste.css layout */
    width: 95%; /* Ensures consistent width similar to paste.css */
}

.text-preview, .text-preview2 {
    resize: vertical;
    overflow: auto; /* Ensures the div is resizable */
    display: block; /* Keep it block-level */
}

.resizable-vertical {
    resize: vertical;
    overflow: auto; /* Ensures the content can be scrolled if it overflows */
}

.text-preview.resizable-vertical {
    min-height: 300px; /* Adjust this value to control the initial height */
    box-sizing: border-box;
}
/*  ================================================ */
/*  Toggle switch styling similar to Term Trend page */
/*  ================================================ */
.form-switch {
    appearance: none;
    position: relative;
    display: inline-block;
    background: lightgrey;
    height: 1.65rem;
    width: 2.75rem;
    vertical-align: middle;
    border-radius: 2rem;
    box-shadow: 0px 2px 3px #000 inset;
    transition: background 0.25s linear;
}

.form-switch::before {
    content: '';
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    background: #fff;
    border-radius: 1.2rem;
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    box-shadow: 0px 1px 3px #000;
    transition: transform 0.25s linear;
    transform: translateX(0rem);
}

.form-switch:checked {
    background: green; /* Changes background color when checked */
}

.form-switch:checked::before {
    transform: translateX(1.1rem); /* Moves the toggle to the right when checked */
}

/* Container for the toggle switch and its label */
.switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1em;
}

/* Ensures the layout for the toggle switch is inline */
.switch-form {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 20px;
}

/* Align all key containers to ensure left alignment */
.text-preview, .text-preview2, .action-container, .switch-form, .delete-button-container, .generate-container, .links-preview {
    width: 95%;
    margin: 0 auto; /* Center horizontally */
}

.delete-button-container {
    padding-left: 10px;
}


/* Style the filter row in search_documents.html */
.filter-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-top: 15px;
    padding-left: 10px;
}


/*  ============================================ */
/*  multidoc_summary_viewer.css                  */
/*  ============================================ */

/* Ensures that new lines '\n' are respected */
.content-text {
    white-space: pre-wrap; 
}


/*  ============================================ */
/*  Search / prompt selector                     */
/*  ============================================ */

/* Adjust the height of the dropdown selectors used in the search page */
select#numberSelector, 
select#sortModeSelector, 
select#summaryModeSelector {
    padding: 5px 5px; /* Increase the padding to make the selectors taller */
    height: 1.8em; /* Set a consistent height */
    font-size: 1em; /* Adjust font size for better visibility */
    width: auto; /* Maintain the current width */
    box-sizing: border-box; /* Ensure padding doesn't affect width */
}

/* Adjust the height of the search button */
input[type="submit"] {
    padding: 10px 10px; /* Increase padding for more height while keeping width the same */
    height: 2.0em; /* Set a consistent height */
    font-size: 1em; /* Adjust font size if needed */
    width: auto; /* Keep the original width */
    box-sizing: border-box; /* Ensure padding does not affect the width */
    border-radius: 5px; /* Optional: Add rounded corners for a nicer look */
}

/*  ============================================ */
/*  Pure CSS modal to confirm deleteDocumentForm */
/*  ============================================ */


/* Hide the modal by default */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* When the checkbox is checked, show the modal */
#deleteConfirmCheckbox:checked ~ .modal {
    display: flex;
}

/* Modal content styling */
.modal-content {
    background: #2d2d2d; /* Dark background for a modern look */
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    color: #f0f0f0;
}

.modal-content h2 {
    font-size: 1.9em;
    margin-bottom: 15px;
}

.modal-content p {
    font-size: 1.5em;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    justify-content: space-around;
    gap: 20px; /* Space between the buttons */
    margin-top: 20px;
}

.modal-cancel, .modal-confirm {
    padding: 12px 20px;
    cursor: pointer;
    border: none;
    font-weight: bold;
    font-size: 1.5em;
    flex: 1; /* Ensure both buttons take equal width */
    border-radius: 5px;
    text-align: center;
}

/* Cancel button styling */
.modal-cancel {
    background-color: #777;
    color: #f0f0f0;
    transition: background-color 0.3s ease;
}

.modal-cancel:hover {
    background-color: #999;
}

/* Confirm delete button styling */
.modal-confirm {
    background-color: #E57373;
    color: #fff;
    transition: background-color 0.3s ease;
}

.modal-confirm:hover {
    background-color: #D05050;
}

.modal-confirm:disabled {
    background-color: #ccc;
    color: #666;
}

/* Styling for the DELETE button that triggers the modal */
.delete-button {
    cursor: pointer;
    background-color: #E57373;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    display: inline-block;
}



/*  =============================================== */
/*  Styles for progress loader (spinner)
/*  =============================================== */

.loader {
    display: none; /* Initially hidden */
    width: 60px;
    height: 60px;
    border: 9   px solid #f3f3f3;
    border-radius: 70%;
    border-top: 4px solid #3498db;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#generateLoader {
    position: relative; /* Allows fine-tuned positioning */
    margin-left: 10px; /* Space between the button and the loader */
    top: -85px; /* Moves the spinner up or down */
    left: 700px; /* Moves the spinner left or right */

/*    transform: translate(50%, -50%);*/

}


/*  =============================================== */
/*  Styles for delete button
/*  =============================================== */

/* Ensure consistent alignment for the DELETE button */
.delete-button-container {
    display: flex;
    align-items: center; /* Vertically align with other form elements */
    gap: 10px; /* Maintain consistent spacing */
    margin-top: 20px; /* Adjust top margin to align with other elements */
    width: 95%; /* Align width with the form controls above */
    margin: 0 auto; /* Center the container horizontally */
}

/* Adjust DELETE button to match other buttons' size and alignment */
.delete-button {
    height: 1.5em;
    padding: 10px 20px;
    font-family: "Roboto Mono", monospace;
    font-size: 1.3em;
    font-weight: 600;
    background-color: #E57373;
    border-radius: 10px;
    color: black;
    text-align: center;
}

/* Align the progress spinner next to the buttons */
#deleteLoader {
    margin-left: 15px; /* Space between the DELETE button and loader */
    align-self: center; /* Aligns the loader with the center of the DELETE button */
    position: relative;
    top: -3%;
    left: 2%;
    transform: translateY(-20%);
}



/*  =============================================== */
/*  multidoc_summaries_browser                      */
/*  =============================================== */

.metadata2 {
    background-color: #EAE6DE; /* Light background color */
    resize: vertical; /* Makes the element resizable vertically */
    overflow: auto; /* Ensures the content can be scrolled if it overflows */
}

#summarization_rowdata table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0; /* Add space between the metadata and the table */
}

#summarization_rowdata th, #summarization_rowdata td {
    border: 1px solid #dae0dc;
    padding: 8px;
}

#summarization_rowdata th {
    background-color: #808482;
    text-align: left;
}

#summarization_rowdata tr:nth-child(even) {
    background-color: #abb0ad; /* alternating color for even row */
}

#summarization_rowdata tr:nth-child(odd) {
    background-color: #c1c6c2; /* alternating color for odd row */
}

#summarization_rowdata tr:hover {
    background-color: #ddd;
}

#summarization_rowdata th, #summarization_rowdata td {
    padding: 12px 15px;
    text-align: left;
}



/*  =============================================== */

/*  Responsive web design (RWD) for smaller screens */

/*  =============================================== */

@media (max-width: 768px) {
    form {
        display: flex;
        flex-direction: column; /* Stack elements in a column */
        align-items: center; /* Center the form elements */
        width: 100%; /* Make sure the form takes full width */
        margin: 0 auto; /* Center the form horizontally */
    }

    #documentSwitcher {
        text-align-last: center; /* Center the selected option text */
    }

    .form-control,
    .form-control2,
    .submit-button,
    #documentSwitcher,
    #generateButton {
        width: 95%; /* Matches responsive width adjustments from paste.css */
        max-width: 400px; /* Limit the maximum width for better alignment */
    }

    .form-control2 {
        margin-top: 0px; /* Reduces gap above the "Category prefix" input */
    }

    .form-label {
        text-align: center; /* Improves alignment in smaller screens */
        width: 95%; /* Ensures labels align well with form controls */
    }

   .submit-button {
        margin-left: 0; /* Remove auto margin to center the button */
        margin-right: 0; /* Remove any right margin */
        text-align: center; /* Ensure the text is centered inside the button */
    }

    .form-switch {
        width: 6.0rem;
        height: 2rem;
    }
    .form-switch::before {
        width: 1.75rem;
        height: 1.75rem;
        top: 0.125rem;
    }


    .filter-row {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    .filter-row .form-control,
    .filter-row .form-control2 {
        width: 95%;
    }

    /*  Stacks the search selectors */
    .metadata > div {
        display: flex;
        flex-direction: column; /* Stack all the rows vertically */
        align-items: center;
        gap: 15px; /* Adds spacing between the rows */
        width: 100%;
        margin-top: 20px;
    }

    .metadata label {
        margin-bottom: 5px;
    }

    /* Keep label and input on the same line */
    .metadata .input-row {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 95%;
        max-width: 400px;
    }

    .metadata .input-row label {
        flex: 1; /* Allow the label to take as much space as needed */
        margin-right: 10px; /* Add space between label and input */
        text-align: left;
    }

    .metadata .input-row input[type="radio"],
    .metadata .input-row select {
        flex: 1; /* Allow the input/selector to take as much space as needed */
    }

}