/* General Styles */
select#image-size {
    padding: 10px;
    color: #000000;
}

.input-group {
    margin-bottom: 15px;
    width: 100%;
}

select {
    padding: 6px 10px !important;
}

textarea {
    padding: 10px !important;
}
.user-credits {
    display: none;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 6px;
    margin-top: 20px;
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
}


.image-box {
    background-color: #333333;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Default to square aspect ratio */
}

.img-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.download-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 10;
}

.img-container:hover .download-icon {
    opacity: 1;
}

.download-icon:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.download-icon svg {
    display: block;
    width: 24px;
    height: 24px;
    color: #333;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.close-lightbox {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    padding: 5px;
}

.close-lightbox:hover {
    color: #ddd;
}

/* Navigation Button Styles */
.nav-button {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s;
    z-index: 1001;
    border-radius: 4px;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.5);
}

.prev-button {
    left: 40px;
}

.next-button {
    right: 40px;
}

/* Image Box Aspect Ratio */
.image-box[data-ratio="square_hd"] {
    padding-bottom: 100%; /* 1:1 */
}

.image-box[data-ratio="portrait_4_3"] {
    padding-bottom: 133.33%; /* 4:3 */
}

.image-box[data-ratio="portrait_16_9"] {
    padding-bottom: 177.78%; /* 16:9 (vertical) */
}

.image-box[data-ratio="landscape_16_9"] {
    padding-bottom: 56.25%; /* 16:9 (horizontal) */
}

.upload-box svg {
    margin-bottom: 14px;
}

/* Loader Styles */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(63, 63, 63, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    z-index: 5;
}
/* Previous CSS styles remain the same... */

/* New styles for image upload */
.mode-selector {
    margin-bottom: 20px;
}

.mode-selector label {
    margin-right: 20px;
    cursor: pointer;
}

.image-upload-container {
    margin-bottom: 20px;
}

.upload-box {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9f9f9;
    min-height: 210px;
    align-content: center;
    position: relative;
}

.upload-box.dragover {
    border-color: #3498db;
    background: #f0f8ff;
}

.upload-instructions {
    color: #666;
    justify-items: center;
}

.preview-image {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    justify-items: center;
}

.preview-image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.remove-image {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    line-height: 25px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}

.remove-image:hover {
    background: #ff0000;
}

/* Upload Progress Bar */
.upload-progress-container {
    width: 100%;
    margin-top: 15px;
}

.upload-progress-bar {
    height: 10px;
    background-color: #3498db;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.upload-progress-text {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* Rest of the CSS remains the same... */
.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    margin-top: 10px;
    font-size: 14px;
    color: #fff;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* New Styles for Input Row */
.input-row {
    display: flex;
    gap: 20px; /* Space between fields */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.input-row .input-group {
    flex: 1; /* Equal width for all input groups */
    min-width: 150px; /* Minimum width to maintain readability */
}

.input-group label {
    display: block;
    margin-bottom: 5px;
}



.image-ai-generate-button {
    background-color: #046BD2;
    color: white;
    border: none;
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.image-ai-generate-button:hover {
    background-color: #0354A0; /* Darker shade for hover */
}

.image-ai-generate-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Validation error style */
.validation-error {
    border: 2px solid #ff4444 !important;
    background-color: #fff8f8;
}

.field-hint {
    color: #666;
    font-size: 0.85em;
    font-style: italic;
    margin-top: -5px;
    margin-bottom: 5px;
}
