body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 80%;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

h1, h2 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

.form-container, .versions-container {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input[type="text"],
input[type="date"],
input[type="file"],
textarea {
    width: calc(100% - 22px); /* Adjust for padding and border */
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Important for width calculation */
}

input[type="file"] {
    padding: 3px; /* Specific padding for file inputs */
}

textarea {
    resize: vertical; /* Allow vertical resizing */
}

button[type="submit"], .edit-button {
    background-color: #5cb85c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    margin-top: 10px; /* Add some margin for buttons */
}

button[type="submit"]:hover, .edit-button:hover {
    background-color: #4cae4c;
}

.edit-button {
    background-color: #f0ad4e; /* Orange for edit */
    margin-left: 10px;
}

.edit-button:hover {
    background-color: #ec971f;
}


#versionList {
    margin-top: 10px;
}

#versionList p {
    text-align: center;
    color: #777;
}

.version-item {
    background-color: #e9e9e9;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 5px solid #5cb85c;
    position: relative; /* For positioning edit button */
}

.version-item h3 {
    margin-top: 0;
    color: #333;
}

.version-item p {
    margin-bottom: 5px;
    color: #555;
    text-align: left; /* Override general p styling */
}

.version-item .notes {
    white-space: pre-wrap; /* Preserve formatting of notes */
    background-color: #fdfdfd;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #eee;
    margin-bottom: 10px; /* Space before uploaded files info */
}

.version-item .file-info {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 5% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 60%; /* Could be more or less, depending on screen size */
    border-radius: 8px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#editVersionForm div {
    margin-bottom: 15px;
}

#editVersionForm label {
    font-weight: bold;
}

#currentImage, #currentFile {
    font-style: italic;
    color: #555;
    display: inline-block;
    margin-left: 10px;
}