/* File: assets/css/cui-style.css */

/* Main container styles */
.cui-upload-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Drop area styles */
#cui-drop-area {
    border: 2px dashed #ccc;
    border-radius: 20px;
    width: 100%;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#cui-drop-area.highlight {
    border-color: #2196F3;
    background-color: #e3f2fd;
}

#cui-drop-area.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* File input styles */
#cui-file-input {
    display: none;
}

.cui-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cui-button:hover {
    background-color: #1976D2;
}

#cui-file-input:disabled + .cui-button {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Progress bar styles */
.cui-progress-container {
    margin-top: 20px;
}

#cui-progress-bar {
    width: 0;
    height: 5px;
    background-color: #4CAF50;
    transition: width 0.3s;
}

#cui-progress-text {
    text-align: center;
    margin-top: 5px;
    font-size: 14px;
    color: #333;
}

/* Message area styles */
#cui-message-area {
    margin-bottom: 20px;
}

.cui-message {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.cui-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cui-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cui-info {
    background-color: #e7f3fe;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Upload info styles */
.cui-upload-info {
    margin-top: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

.cui-upload-info p {
    margin: 5px 0;
}

/* Gallery styles */
.cui-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-gap: 10px;
    margin-top: 20px;
}

.cui-gallery-container{
    margin-top: 20px;
}

.cui-image-container {
    position: relative;
    padding-bottom: 100%; /* Creates a square aspect ratio */
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cui-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* This ensures the image covers the area without stretching */
    transition: transform 0.3s;
}

.cui-image-container:hover img {
    transform: scale(1.05);
}

/* Image selection styles */
.cui-image-select {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    opacity: 0;
    width: 24px;
    height: 24px;
    margin: 0;
    cursor: pointer;
}

.cui-image-select-label {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background-color: rgba(255, 255, 0, 0.3);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9;
}

.cui-image-select:checked + .cui-image-select-label::after {
    content: '\2714';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

/* Delete button styles */
#cui-delete-selected {
    display: none;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#cui-delete-selected:hover {
    background-color: #c82333;
}

/* Responsive styles */
@media (max-width: 600px) {
    .cui-upload-container {
        padding: 10px;
    }

    #cui-drop-area {
        padding: 10px;
    }

    .cui-gallery {
        grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    }
}