/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--font-color);
}

.upload-window {
    width: 100%;
    max-width: 600px;
    background-color: var(--chat-background-color);
    color: var(--chat-font-color);
    padding: 0;
    border: 1px solid #ccc;
    /*border-radius: 0px;*/
    /*box-shadow: 0 1px 15px rgba(0, 0, 0, 0.1);*/
    box-sizing: border-box;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.upload-window h2 {
    margin-top: 2px;
    margin-left: 5px;
    color: var(--font-color);
}

.upload-window label[for="title"],
.upload-window label[for="description"],
.upload-window label[for="file"] {
    margin-left: 5px;
    margin-right: 5px;
    margin-top: 2px;
    margin-bottom: 0;
    color: var(--font-color);
 }

.upload-window input[type="file"],
.upload-window input[type="text"],
.upload-window textarea {
    width: 95%;
    margin-left: 5px;
    margin-bottom: 5px;
}

.upload-window .buttons {
   text-align: right;
   margin-top: 10px;
}


/* Container for the Upload Content Page */
.upload-container {
    max-width: 800px;
    margin: 5px auto;
    padding: 10px;
    background-color:var(--background-color);
    color: var(--font-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.preview-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    overflow: hidden;
}

img.preview {
    max-width: 300px;
    max-height: 300px;
    display: block;
}

#rotateBtn {
    margin-top: 10px;
    display: inline-block;
}


/* Form Elements */
form label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

form input[type="text"],
form input[type="file"],
form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
form button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    color: #fff;
    background-color: var(--button-color);
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

form button:hover {
    background-color: #0056b3;
}

a.button {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 8px;
    background-color: var(--button-color);
    border-radius: 4px;
    cursor: pointer;
}

a.button:hover {
    background-color: #0056b3;
}

/* The select album section */

.album-select-block {
    display: block;
    margin-bottom: 16px;
}

.album-select-form {
    /*position: relative;*/
    display: block;
    margin-bottom: 8px;
}

.album-select-form select {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 32px 4px 8px;
    background-color: var(--button-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    appearance: none;      /* removes OS-level dropdown arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='10' viewBox='0 0 24 24' width='10' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;

}


/* Feedback Message */
.feedback-message {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
    font-style: italic;
    color: #666;
}

/* Image Preview */
.image-preview {
    max-width: 100%;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Error Messages */
.error-message {
    color: red;
    font-weight: bold;
}

.gallery-container {
    display: grid;
    gap: 10px;
    padding: 10px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive columns */
    justify-content: center; /* Center thumbnails */
}

.gallery-item {
    text-align: center;
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.gallery-item img {
    max-width: 100%;
    height: auto;
    cursor: pointer; /* Indicate clickability */
    transition: transform 0.2s ease-in-out;
}

.gallery-item img:hover {
    transform: scale(1.05); /* Slight zoom effect */
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.8); /* Start smaller */
    transition: transform 0.3s ease-in-out; /* Smooth zoom effect */
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

