/**
 * Image Upload Modal Styles
 */

/* Modal overlay */
.image-upload-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Modal content */
.image-upload-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Modal header */
.image-upload-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image-upload-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #1f2937;
}

.image-upload-modal-close,
.image-camera-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.image-upload-modal-close:hover,
.image-camera-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* Modal body */
.image-upload-modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

/* Dropzone */
.image-upload-dropzone {
    border: 3px dashed #d1d5db;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f9fafb;
}

.image-upload-dropzone:hover {
    border-color: #00B48D;
    background: #f0fdf4;
}

.image-upload-dropzone.dragover {
    border-color: #00B48D;
    background: #d1fae5;
    transform: scale(1.02);
}

.image-upload-dropzone i {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.image-upload-dropzone:hover i {
    color: #00B48D;
}

.image-upload-dropzone p {
    margin: 8px 0;
    color: #4b5563;
    font-size: 16px;
}

.image-upload-dropzone .upload-help {
    font-size: 14px;
    color: #9ca3af;
}

/* Camera section */
.image-upload-camera-section {
    margin-top: 20px;
    text-align: center;
}

.image-upload-camera-section .btn {
    padding: 12px 24px;
}

/* Preview */
.image-upload-preview {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.image-upload-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #f9fafb;
}

.image-upload-preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.image-upload-preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.image-upload-preview-remove:hover {
    background: rgb(220, 38, 38);
    transform: scale(1.1);
}

.image-upload-preview-name {
    display: block;
    padding: 8px;
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal footer */
.image-upload-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Camera Modal */
.image-camera-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-camera-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.image-camera-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image-camera-header h3 {
    margin: 0;
    font-size: 20px;
    color: #1f2937;
}

.image-camera-body {
    padding: 24px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-camera-body video {
    width: 100%;
    max-width: 640px;
    border-radius: 8px;
}

.image-camera-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .image-upload-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .image-upload-preview {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .image-upload-preview-item img {
        height: 100px;
    }
}

