/* Apply box-sizing globally */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Common styles for all pages */
body {
    font-family: Arial, sans-serif;
    background-color: #e8f5e9;
    color: #333;
    padding-top: 80px;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Header styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #4caf50;
    color: #fff;
    padding: 20px;
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

header h1 a {
    color: inherit; /* Inherit the color from the parent element */
    text-decoration: none; /* Remove the underline */
}

header h1 a:hover {
    text-decoration: none; /* Ensure no underline on hover */
}

/* Button styles (adjusted positioning) */
.return-btn,
.login-btn,
.upload-btn,
.grogra-btn,
.logout-btn {
    text-decoration: none;
    padding: 10px 20px;
    color: #fff;
    border-radius: 5px;
    transition: background-color 0.3s;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%); /* Center vertically in the header */
}

.return-btn {
    left: 20px;
    background-color: #388e3c;
}
.disabled{
	opacity:0.2;
	display:none;
}

.upload-btn {
    left: 150px; /* Adjusted position to prevent overflow */
    background-color: #ff5722;
}

.grogra-btn {
    left: 30px; /* Adjusted position to prevent overflow */
    background-color: #ff5722;
}

.login-btn,
.logout-btn {
    right: 20px;
    background-color: #ff5722;
}

/* Styling for the username */
.username {
    position: absolute;
    right: 130px; /* Position it left of the login button */
    top: 50%;
    transform: translateY(-50%); /* Center vertically in the header */
    color: #fff;
    font-weight: bold;
    line-height: normal;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .upload-btn {
        left: 20px;
        top: 60px; /* Stack below the return button */
    }

    .username {
        right: 80px; /* Adjust the position for smaller screens */
    }
}

/* Styling for the username */
.username {
    margin-right: 10px;
    color: #fff;
    font-weight: bold;
    line-height: 40px; /* Align vertically with buttons */
}

/* Login page specific styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-direction: column;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    position: relative; /* Add this to position the return button */
}

.login-container .container {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    text-align: center;
    width: 100%;
}

.login-container h1 {
    color: #4caf50;
    font-size: 2rem;
    margin-bottom: 20px;
}

.login-container input[type="text"],
.login-container input[type="password"],
.login-container button {
    width: calc(100% - 40px);
    padding: 10px;
    margin: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.login-container button {
    background-color: #4caf50;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-container button:hover {
    background-color: #388e3c;
}

.login-container .message {
    margin-top: 20px;
    color: #4caf50;
}

/* Position the return button on the login page */
.login-container .return-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #388e3c;
}

/* Index page specific styles */
.container {
    flex: 1; /* Make the container take up the remaining space */
    margin-right: 20px; /* Add right margin to match the gap */
    margin-top: 20px;
}

form {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    gap: 20px; /* Add space between elements */
    align-items: stretch; /* Stretch elements to full width */
}

form h2 {
    font-size: 1.5rem;
    color: #4caf50; /* Consistent with header buttons */
}

form div {
    flex: 1;
    min-width: 200px;
}

form label {
    display: block;
    margin-bottom: 5px;
}

form input[type="text"],
form input[type="file"],
form textarea,
form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

form button {
    padding: 10px 20px;
    background-color: #4caf50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

form button:hover {
    background-color: #388e3c;
}

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

form fieldset legend {
    font-weight: bold;
    color: #4caf50;
}

form fieldset div {
    margin-bottom: 10px;
}

ul {
    list-style-type: none;
    padding: 0;
}

ul li {
    display: flex;
    align-items: center;
    background-color: #fff;
    margin: 10px 0;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

ul li:hover {
    transform: scale(1.02);
}

ul li img.project-image {
    width: 75px; /* Increased size */
    height: 75px; /* Increased size */
    margin-right: 15px;
    border-radius: 5px;
    object-fit: cover;
}

ul li .project-details {
    display: flex;
    flex-direction: column;
}

ul li strong {
    font-weight: bold;
}

ul li a {
    text-decoration: none;
    color: #4caf50;
    font-weight: bold;
    transition: color 0.3s;
}

ul li a:hover {
    color: #388e3c;
}

.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination .prev,
.pagination .next,
.pagination .first,
.pagination .last {
    margin: 0 5px;
    text-decoration: none;
    padding: 5px 10px;
    background-color: #4caf50;
    color: #fff;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.pagination .prev:hover,
.pagination .next:hover,
.pagination .first:hover,
.pagination .last:hover {
    background-color: #388e3c;
}

.pagination #page-numbers a,
.pagination #page-numbers-bottom a {
    padding: 10px 15px;
    margin: 5px;
    background-color: #4caf50;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.pagination #page-numbers a:hover,
.pagination #page-numbers-bottom a:hover {
    background-color: #388e3c;
}

.pagination #page-numbers a.active,
.pagination #page-numbers-bottom a.active {
    background-color: #e64a19;
    cursor: default;
}

.pagination #page-numbers span {
    margin: 0 5px;
    color: #333;
}

/* ...existing code... */
.pagination a {
    padding: 5px 10px;
    margin: 0 2px;
    background-color: #4caf50;
    color: #fff;
    border-radius: 3px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.pagination a:hover {
    background-color: #388e3c;
}

.pagination a.active {
    background-color: #e64a19;
    cursor: default;
}

/* ...existing code... */
.pagination a.disabled {
    background-color: grey;
    cursor: not-allowed;
}
.pagination span {
    padding: 5px 10px;
    margin: 0 2px;
    background-color: transparent;
    color: #333;
    border-radius: 3px;
    text-decoration: none;
    display: inline-block;
    cursor: default;
}
.left-align {
    text-align: left;
}

#sort-options a {
    margin-right: 10px;
    text-decoration: none;
    color: #4caf50;
    font-weight: bold;
    transition: color 0.3s;
    cursor: pointer; /* Make it look clickable */
    display: inline-flex;
    align-items: center;
}

#sort-options a .triangle {
    display: inline-block;
    width: 10px; /* Extra space for the triangle */
    text-align: center;
}

#sort-options a:hover {
    color: #388e3c;
}

#sort-options a::after {
    content: '';
    margin-left: 5px;
}

/* Show page specific styles */
.show-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.show-container header {
    background-color: #4caf50;
    color: #fff;
    padding: 30px; /* Increased from 20px to 30px */
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.show-container h1 {
    margin: 0;
    font-size: 2rem;
}

.show-container .container {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    text-align: left; /* Ensure left alignment for show page */
    margin: 20px;
    width: calc(100% - 40px); /* Adjust to prevent overflow */
}

.show-container h1 {
    color: #4caf50;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center; /* Keep the title centered */
}

.show-container img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
    display: block; /* Ensure block display to avoid inline spacing issues */
}

.show-container p {
    margin: 10px 0;
}

.show-container strong {
    color: #388e3c;
}

.show-container #version-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    margin-top: 10px;
    margin-bottom: 20px;
}

.show-container #download-button {
    padding: 10px 20px;
    background-color: #4caf50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 5px;
}

.show-container #download-button:disabled {
    background-color: grey;
    cursor: not-allowed;
}

.show-container #download-button:hover:enabled {
    background-color: #388e3c;
}

/* Sidebar styles */
.main-content {
    margin-left: 270px; /* Push the main content to the right of the sidebar */
    padding-top: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar {
    width: 250px;
    height: calc(100vh - 80px); /* Subtract the height of the header */
    background-color: #f1f8e9;
    padding: 0 20px; /* Add padding on the sides */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    margin-right: 20px;
    overflow-y: auto; /* Enable vertical scrolling within the sidebar */
    position: fixed; /* Fix the entire sidebar in place */
    top: 80px; /* Adjust to start just below the header */
    left: 0; /* Align with the left of the viewport */
    z-index: 1000; /* Ensure it stays below the header but above other content */
}

.sidebar h2 {
    position: sticky; /* Fix the sidebar title */
    top: 0; /* Stick the title to the top of the sidebar */
    background-color: #f1f8e9; /* Match the sidebar background color */
    padding: 20px 0;
    z-index: 10; /* Ensure it stays above other elements in the sidebar */
    margin: 0 -20px; /* Match the sidebar padding to cover the entire width */
    padding: 20px; /* Add padding inside the title for spacing */
    border-bottom: 1px solid #ccc; /* Optional: add a border to visually separate the title */
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.sidebar ul li a:hover {
    color: #4caf50;
}

.suggestion-box:empty {
    display: none;
}

/* Styling for the suggestion box (dropdown) */
.suggestion-box {
    list-style-type: none;
    padding: 0;
    margin: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px; /* Rounded corners */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    max-height: 200px; /* Set a max-height for scrolling */
    overflow-y: auto; /* Enable scrolling when the list is long */
    position: absolute; /* Positioned relative to the input field */
    z-index: 3000; /* Ensure it stays on top of other elements */
    max-width: 50%; /* Limit the width to the input field width */
    width: 50%; /* Full width to match the input field */
    box-sizing: border-box; /* Ensure padding and border are included in width */
}

/* Style for each suggestion item */
.suggestion-box li {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 1rem; /* Keep the font size consistent */
}

/* Hover and focus states for suggestion items */
.suggestion-box li:hover,
.suggestion-box li:focus {
    background-color: #4caf50; /* Use your theme's green color */
    color: white;
}

/* Remove margin and border from the parent container to prevent gaps */
input + .suggestion-box {
    margin-top: -1px; /* Prevent a gap between the input and suggestions */
    border-top: none; /* Remove double borders between input and suggestions */
}

/* Pagination and results per page styles */
#results-per-page a,
#page-numbers a,
#page-numbers-bottom a {
    padding: 10px 15px;
    margin: 5px;
    background-color: #4caf50;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

#results-per-page a:hover,
#page-numbers a:hover,
#page-numbers-bottom a:hover {
    background-color: #388e3c;
}

#page-numbers a.active,
#page-numbers-bottom a.active {
    background-color: #e64a19;
    cursor: default;
}

/* Sorting links and triangles styles */
#sort-options a {
    margin-right: 10px;
    text-decoration: none;
    color: #4caf50;
    font-weight: bold;
    transition: color 0.3s;
    cursor: pointer; /* Make it look clickable */
    display: inline-flex;
    align-items: center;
}

#sort-options a .triangle {
    display: inline-block;
    width: 10px; /* Extra space for the triangle */
    text-align: center;
}

#sort-options a:hover {
    color: #388e3c;
}

#sort-options a::after {
    content: '';
    margin-left: 5px;
}

/* Compact form layout styles */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.form-row > div {
    flex: 1;
    min-width: 150px;
}

#sort-options {
    display: flex;
    gap: 10px;
    align-items: center;
}

#sort-options a {
    text-decoration: none;
    color: #4caf50;
    font-weight: bold;
    transition: color 0.3s;
}

#sort-options a:hover {
    color: #388e3c;
}

#sort-options a::after {
    content: '';
    margin-left: 5px;
}

#limit {
    width: auto;
}

ul a {
    display: block;
    text-decoration: none;
    color: inherit;
}
.image-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* ...existing code... */

.title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100px; /* Adjust height as needed */
}

.title-container h1 {
    margin: 0;
    line-height: 100px; /* Match the height of the container */
}

.title-buttons {
    position: absolute;
    right: 0;
    display: flex;
    gap: 10px;
}

.edit-btn {
    padding: 10px 20px;
    background-color: #ff5722;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.edit-btn:hover {
    background-color: #e64a19;
}

.version-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.version-container select {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
}

.version-container button {
    padding: 10px 20px;
    background-color: #4caf50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.version-container button:disabled {
    background-color: grey;
    cursor: not-allowed;
}

.version-container button:hover:enabled {
    background-color: #388e3c;
}

.edit-version-btn {
    background-color: #ff5722;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.edit-version-btn:disabled {
    background-color: grey;
    cursor: not-allowed;
}

.edit-version-btn:hover:enabled {
    background-color: #e64a19;
}

/* ...existing code... */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    display: none; /* Initially hidden */
}

.overlay-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    max-height: 90vh; /* Ensure the overlay content doesn't exceed the viewport height */
    overflow-y: auto; /* Enable vertical scrolling */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.overlay-content h2 {
    margin-top: 0;
}

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

.overlay-content .form-group label {
    display: block;
    margin-bottom: 5px;
}

.overlay-content .form-group input,
.overlay-content .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.overlay-content .button-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.overlay-content .button-group button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.overlay-content .button-group .apply-btn {
    background-color: #4caf50;
    color: #fff;
}

.overlay-content .button-group .apply-btn:hover {
    background-color: #388e3c;
}

.overlay-content .button-group .delete-btn {
    background-color: #ff5722;
    color: #fff;
}

.overlay-content .button-group .delete-btn:hover {
    background-color: #e64a19;
}

.overlay-content .button-group .cancel-btn {
    background-color: #ccc;
    color: #333;
}

.overlay-content .button-group .cancel-btn:hover {
    background-color: #bbb;
}

.overlay-content .button-group .apply-project-btn {
    background-color: #4caf50;
    color: #fff;
}

.overlay-content .button-group .apply-project-btn:hover {
    background-color: #388e3c;
}

.overlay-content .button-group .cancel-project-btn {
    background-color: #ccc;
    color: #333;
}

.overlay-content .button-group .cancel-project-btn:hover {
    background-color: #bbb;
}

.overlay-content .button-group .submit-add-btn {
    background-color: #4caf50;
    color: #fff;
}

.overlay-content .button-group .submit-add-btn:hover {
    background-color: #388e3c;
}

.overlay-content .button-group .cancel-add-btn {
    background-color: #ccc;
    color: #333;
}

.overlay-content .button-group .cancel-add-btn:hover {
    background-color: #bbb;
}

/* ...existing code... */

.delete-project-btn {
    padding: 10px 20px;
    background-color: #ff5722;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

/* ...existing code... */

.add-version-btn {
    padding: 10px 20px;
    background-color: #4caf50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-version-btn:hover {
    background-color: #388e3c;
}

/* ...existing code... */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    display: none; /* Initially hidden */
}

.overlay-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    max-height: 90vh; /* Ensure the overlay content doesn't exceed the viewport height */
    overflow-y: auto; /* Enable vertical scrolling */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.overlay-content h2 {
    margin-top: 0;
}

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

.overlay-content .form-group label {
    display: block;
    margin-bottom: 5px;
}

.overlay-content .form-group input,
.overlay-content .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.overlay-content .button-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.overlay-content .button-group button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.overlay-content .button-group .apply-add-btn {
    background-color: #4caf50;
    color: #fff;
}

.overlay-content .button-group .apply-add-btn:hover {
    background-color: #388e3c;
}

.overlay-content .button-group .cancel-add-btn {
    background-color: #ccc;
    color: #333;
}

.overlay-content .button-group .cancel-add-btn:hover {
    background-color: #bbb;
}

/* ...existing code... */
.overlay-content .button-group .submit-add-btn {
    background-color: #4caf50;
    color: #fff;
}

.overlay-content .button-group .submit-add-btn:hover {
    background-color: #388e3c;
}

.overlay-content .button-group .cancel-add-btn {
    background-color: #ccc;
    color: #333;
}

.overlay-content .button-group .cancel-add-btn:hover {
    background-color: #bbb;
}

/* ...existing code... */

