.logo-title-silver {
    color: silver;
    font-family: "Josefin Sans", sans-serif;
    font-size: 1.5rem;
    letter-spacing: -1px;
    margin: 0;
}

/* INDEX PAGE */

figure img {
    max-width: 90%;
    height: auto;
    border-radius: 1px;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.5);
}

/* ACCOUNT PAGE */

#edit-displayname {
    font-size: 1.5rem;
}

/* WORK PAGE */

.work {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.work ul {
    flex: 1;
}

.work img {
    flex-shrink: 0;
    width: auto;
    height: 240px;
    margin-bottom: 0.5rem;
    border-radius: 0.1rem;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.5); /* Horizontal offset, Vertical offset, Blur radius, Shadow color */
}

.part-title {
    font-size: 1.5rem;
    font-weight: bold;
}


/* GLOSSARY PAGE */

.search-replace-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.search-replace-row .form-group {
    margin-right: 10px;
}

.search-replace-row button {
    margin-top: 1rem;
}

button.remove-row:disabled {
    visibility: hidden;
}

#glossary th {
    background-color: #1e1c28;
    color: #fee2ac;
    padding: 0.5rem 1rem;
    font-weight: bold;
}

#glossary td {
    background-color: #1e1c28;
    padding: 0.5rem 1rem;
    text-align: left;
}

/* EDIT PART page */

#body-form {
    resize: none;
}

#title-content-div, #description-content-div {
    display: flex;
    color: #fee2ac;
    padding: 1rem 0 0;
    gap: 1rem;
}

.floating-button-div {
    position: fixed;
    top: 1rem;
    right: 10px; /* Adjust the right position as needed */
    z-index: 1000; /* Ensure it is on top of other elements */
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Align buttons to the right */
}

.floating-button {
    display: block;
    background-color: #fdd17f;
    color: #000;
    border: 0;
    border-radius: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-weight: bold;
    margin-bottom: 0.5rem; /* Space between buttons */
}

.floating-button:active, .floating-button:hover, .floating-button:focus {
    background-color: #fee2ac;
}

.floating-div {
    position: fixed;
    top: 6rem;
    right: 10px;
    width: 300px;
    background-color: rgba(25, 25, 25, 0.9); /* Semi-transparent background */
    border: 1px solid #ccc;
    z-index: 1000; /* Ensure it is on top of other elements */
}

.floating-div-text {
    height: 400px;
    padding: 10px;
    overflow-y: auto;
}

.floating-div-text p {
    font-size: 0.875rem;
}

#minimize-button {
    background: transparent;
}

#body-content-div {
    position: relative;
    width: 100%;
    overflow: visible;
}

#comment-layer {
    position: relative; /* Let this layer define the height of the container */
    top: 1rem;
    z-index: 1;
    pointer-events: none;
    color: #353140;
}

#comment-layer.active {
    pointer-events: auto;
    color: silver;
    z-index: 2;
}

#comment-form, #edit-form {
    z-index: 2;
}

#edit-layer {
    position: absolute; /* Stays on top */
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    color: #353140;
    background: transparent;
}

#edit-layer.active {
    z-index: 2;
    color: #fdfdfa;
}

#edit-form {
    position: absolute;
    width: 360px;
    height: fit-content;
    z-index: 1000;
}

/* REVIEW PAGE */

#part-text {
    padding-top: 1rem;
}

.context-menu {
    position: absolute;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    z-index: 1000; /* Ensure it's on top of other elements */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.highlighted-text {
    background-color: #a86501;
}

.highlighted-text.fixed {
    background-color: #485d3d;
}

.highlighted-text.wont_fix {
    background-color: dimgrey;
}

.comment-form {
    position: absolute;
    width: 360px;
    height: fit-content;
    background-color: #f8e882;
    border: 2px solid #f8e882;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    z-index: 1000;
}

.comment-form.fixed {
    background-color: #94b186;
    border: 2px solid #94b186;
}

.comment-form.wont_fix {
    background-color: silver;
    border: 2px solid silver;
}

.comment-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.25rem;
    cursor: move;
    background-color: #f8e882;
    border-bottom: 1px solid #aaa;
    color: #0e0e0e;
    font-weight: bold;
}

.comment-form-header.fixed {
    background-color: #94b186;
}

.comment-form-header.wont_fix {
    background-color: silver;
}

.comment-form-buttons {
    display: flex;
    gap: 1rem;
}

.comment-form textarea {
    display: block;
    width: 100%;
    height: fit-content;
    padding: 0 0.25rem;
    margin: 0;
    border: none;
    font-size: 0.875rem;
}

/* ILLUSTRATION PAGE */

ul .media {
    width: 320px;
}

.help-text {
    font-size: 0.875rem;
    color: silver;
}

.metadata {
    margin-bottom: 1rem;
}

.metadata p {
    margin: 0;
    padding: 0;
}

.form-popup {
    padding: 1rem 2rem 1.5rem;
}

.scrollable-text-area {
    background-color: #1e1c28;
    height: 160px;
    overflow-y: auto; /* Enable vertical scrolling */
    color: #ccc;
    border: 1px solid gray;
    padding: 10px;
    margin-bottom: 1.5rem;
}

.pre-text {
    padding: 0;
    margin: 0 0 0.375rem;
    font-family: monospace;
    color: #ccc;
}

/* COMMON STYLES */

button {
    height: 2rem;
    display: inline-block;
    background-color: #fdd17f;
    color: #000;
    border: 0;
    border-radius: 0.25rem;
    padding: 0.125rem 0.5rem;
    vertical-align: middle;
    font-weight: bold;
}

button:active, button:hover, button:focus {
    background-color: #fee2ac;
}

button:disabled {
    background-color: #ccc; /* Gray background */
    color: #666; /* Darker gray text */
    cursor: not-allowed; /* Change cursor to indicate disabled state */
    opacity: 0.6; /* Slightly transparent */
}

a.danger {
    color: #a95959;
}

a.danger:active, a.danger:hover, a.danger:focus {
    color: #fd3838;
}


.btn-danger {
    background-color: red;
}

.btn-danger:active, .btn-danger:hover, .btn-danger:focus {
    background-color: #fb4040;
}

.btn-cancel {
    background-color: silver;
}

.btn-cancel:active, .btn-cancel:hover, .btn-cancel:focus {
    background-color: #dfdfdf;
}

.btn-large {
    height: 3rem;
    font-size: 1.5rem;
    padding: 0.25rem 1rem;
    margin: 0 0 2rem;
}

.btn-small {
    height: 1.5rem;
    padding: 0 0.5rem;
    font-size: 0.875rem;
}

.btn-caution {
    background-color: #ff8800;
    font-weight: bold;
}

.btn-caution:active, .btn-caution:hover, .btn-caution:focus {
    background-color: #ff961d;
}

hr {
    border-top: 1px solid #fee2ac;
}

.message-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.alert {
    padding: 10px;
    text-align: center;
    border-radius: 0;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #000;
    float: right;
    cursor: pointer;
}

.close-button:hover {
    color: #721c24;
    background: none;
}

@media screen and (max-width: 768px) {
    .comment-form, #edit-form {
        width: 75%;
        left: auto;
        right: 0;
    }
}


@media screen and (max-width: 42rem) {
    ul {
        padding-left: 0;
    }

    ul .media {
        width: 100%;
    }

    .logo-title-silver {
        font-size: 1.25rem;
    }

    figure img {
        max-width: 100%;
    }

    #edit-displayname {
        font-size: 1.25rem;
    }

    .floating-button {
        border-radius: 0.2rem;
        padding: 0 0.5rem;
        font-size: 0.875rem;
        font-weight: bold;
        margin-bottom: 0.5rem; /* Space between buttons */
    }

    .floating-div-text {
        height: 240px;
    }
}