/* Minhas Imagens Component Styles */
.minhas-imagens-component {
    width: 100%;
}

/* Upload Section */
.upload-section {
    margin-bottom: 20px;
}

.upload-section .ivInputUpload label {
    padding: 21px;
    width: 100%;
    border: 2px dashed #b5b5b5;
    border-radius: 10px;
    position: relative;
    color: var(--text-tertiary) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-section .ivInputUpload label:hover {
    border-color: var(--primary);
    background-color: var(--bg-secondary);
}

.upload-section .ivInputUpload label .material-icons {
    font-size: 60px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Gallery Controls */
.gallery-controls {
    margin-bottom: 15px;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    background: #f9f9f9;
    border-radius: 8px;
}

.gallery-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.controls-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.controls-right {
    display: flex;
    align-items: center;
}

.confirm-btn {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
}

.confirm-btn .material-icons {
    font-size: 18px !important;
    line-height: 36px !important;
}

/* Images Container */
.images-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
}

.user-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.user-image-item {
    position: relative;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--border-secondary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.user-image-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.user-image-item.selected {
    border-color: #4CAF50;
    background: var(--border-tertiary);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.3);
}

.user-image-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.image-desc {
    padding: 5px;
    text-align: center;
    font-size: 12px;
    color: #666;
    background: #fff;
    text-transform: capitalize;
}

.delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.delete-btn .material-icons {
    font-size: 16px !important;
    line-height: 1 !important;
}

.user-image-item:hover .delete-btn {
    opacity: 1;
}

.image-check {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.image-check.checked {
    background: #4CAF50;
    color: white;
    transform: scale(1.1);
}

.image-check .material-icons {
    font-size: 20px;
}

/* Loading States */
.loading-container,
.loading-more-container {
    text-align: center;
    padding: 20px;
}

.loading-container .preloader-wrapper,
.loading-more-container .preloader-wrapper {
    margin: 0 auto 10px;
}

.no-images,
.no-more-images {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Crop Modal */
.crop-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.crop-modal {
    background: white;
    border-radius: 8px;
    min-width: 500px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.crop-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.crop-header h5 {
    margin: 0;
    color: #333;
}

.crop-content {
    padding: 20px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.crop-area {
    width: 100%;
    text-align: center;
}

.cropped-preview {
    text-align: center;
}

.crop-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .user-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .crop-modal {
        min-width: 95vw;
        margin: 10px;
    }
    
    .gallery-controls {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Integration with existing styles */
.minhas-imagens-component .btn-small {
    height: 32px !important;
    line-height: 32px;
    padding: 0 16px;
    font-size: 13px;
}

.minhas-imagens-component .btn-floating.btn-small {
    width: 32px;
    height: 32px;
}

.minhas-imagens-component .material-icons {
    font-size: 20px;
}

/* Animation for selection */
@keyframes selectPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.user-image-item.selected {
    animation: selectPulse 0.3s ease;
} 