/* File Name: component.css */
/* Description: CSS styles for the Component Information form, providing a professional layout with Flexbox for form fields, responsive adjustments, and styling for readability and accessibility. */

/* Change Log:
   - 2024-11-02_v1.0: Initial styling with Flexbox for layout consistency, increased input heights, and basic styling.
   - 2024-11-02_v1.1: Added two-column grid for CKEditor sections, suppressing CKEditor notifications.
   - 2024-11-02_v1.2: Enhanced button hover effects, added media query for mobile adjustments, improved padding and spacing for readability.
*/

/* Basic Styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
}

.container {
    width: 80%;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

h1 {
    font-size: 1.8em;
    color: #444;
    margin-bottom: 20px;
    text-align: center;
}

/* Form Layout */
form {
    display: flex;
    flex-direction: column;
}

fieldset {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}

legend {
    font-weight: bold;
    color: #555;
    padding: 0 10px;
}

/* Form Rows and Groups */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.full-width {
    grid-column: span 2;
}

/* Input Styling */
.large-input {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    height: 45px; /* Increased height for readability */
}

select.large-input {
    padding: 8px;
    font-size: 1em;
    height: 45px;
}

textarea.ckeditor {
    width: 100%;
    min-height: 150px; /* Ensure adequate height for CKEditor */
    padding: 10px;
    font-size: 1em;
    border-radius: 4px;
    border: 1px solid #ccc;
    resize: vertical; /* Allow vertical resizing */
}

/* Button Styling */
.button {
    background-color: #add8e6;
    color: white;
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #87ceeb;
}

/* Two-Column Layout for Text Areas */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Adjustments for Smaller Screens */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .two-column {
        grid-template-columns: 1fr;
    }
}

/* Suppress CKEditor notification messages */
.cke_notifications_area {
    display: none !important;
}
/* Ensure consistent height and styling for input and select elements */
.large-input {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    height: 45px; /* Ensure uniform height */
    box-sizing: border-box; /* Avoids adding padding to width */
}

/* Row spacing */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two columns per row */
    gap: 20px;
}
/* Increase font size for labels above CKEditor text areas */
.form-group label {
    font-size: 1.1em; /* Adjust font size as needed */
    font-weight: bold; /* Optional: make labels bold for better readability */
    color: #333; /* Ensure text color is readable */
    margin-bottom: 5px;
}

/* Ensure CKEditor fields are well-spaced from labels */
textarea.ckeditor {
    margin-top: 5px;
}
/* Document Management Styles */
.document-list {
    list-style-type: none;
    padding: 0;
    margin: 10px 0;
}

.document-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    padding: 5px;
    border-bottom: 1px solid #ddd;
}

.document-list a {
    color: #0066cc;
    text-decoration: none;
}

.document-list a:hover {
    text-decoration: underline;
}

.delete-btn, .add-btn {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.9em;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.delete-btn:hover {
    background-color: #c9302c;
}

.add-btn {
    background-color: #5bc0de;
}

.add-btn:hover {
    background-color: #31b0d5;
}
/* Adjustments for document upload section */
.document-upload-form {
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    gap: 10px;
    margin-bottom: 15px;
}

.document-upload-form .form-group {
    margin-bottom: 10px;
}

.file-button {
    padding: 10px 15px;
    cursor: pointer;
    width: auto;
    display: inline-block;
    text-align: center;
}

.add-btn {
    width: auto;
    padding: 10px 20px;
    align-self: flex-start; /* Align "Add Document" to the left */
}
/* File Name: component.css */

/* Existing styles... */

/* Add or update styles for the header and button container */

/* Center the header and improve its appearance */
.header-container {
    margin-bottom: 20px;
}

/* Style the h1 inside the header */
.header-container h1 {
    font-size: 2em;
    color: #333;
    margin: 0;
}

/* Style the button container */
.button-container {
    display: flex;
    flex-wrap: wrap; /* Allows buttons to wrap on smaller screens */
    gap: 15px;
    justify-content: flex-end; /* Align buttons to the right */
    align-items: center;
}

/* Style the buttons */
.button-link {
    background-color: #4CAF50;
    color: white !important;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.3s;
}

.button-link:hover {
    background-color: #45a049;
}

/* Style the button inside the form (Duplicate Component button) */
.button-link[type="submit"],
.button-container button {
    background-color: #4CAF50;
    color: white !important;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.button-link[type="submit"]:hover,
.button-container button:hover {
    background-color: #45a049;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .button-container {
        justify-content: center; /* Center buttons on smaller screens */
    }
}
/* Modal Background */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* On top of other elements */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scrolling if needed */
    background-color: rgba(0, 0, 0, 0.5); /* Black background with opacity */
}

/* Modal Content */
.modal-content {
    background-color: #fff;
    margin: 10% auto; /* Center it vertically */
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 80%; /* Adjust width as needed */
    max-width: 800px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Close Button */
.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
    text-decoration: none;
}
/* Full-width container layout */
.viewport_wide_container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    box-sizing: border-box;
}

/* Flexbox-based grid layout for form details */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Section titles */
.section-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #555;
    margin-bottom: 10px;
}

/* Break between rows */
.row-break {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

/* Fieldset styling */
.report-fieldset {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

/* Iframe styling */
.iframe-container {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 4px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Row break to ensure the child starts independently */
.row-break {
    display: block;
    width: 100%;
    clear: both;
    height: 1px; /* Invisible break */
    margin-bottom: 20px; /* Add space */
}

/* Isolate child content from parent layout */
.isolated-container {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    clear: both; /* Break out of any floating or flex constraints */
}

/* Full-width behavior for child template container */
.viewport_wide_container {
    width: 100% !important; /* Ensure full viewport width */
    max-width: none !important; /* Remove any inherited max-width */
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Reset iframe styling to avoid width conflicts */
.iframe-container {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 4px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-control.large-input {
    width: 100%;
}
.header-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.header-controls .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;  /* Override default margin */
}

.guidance-text {
    font-size: 0.9rem;
    color: #6c757d; /* Neutral gray color */
    margin-bottom: 5px;
    font-style: italic;
}
