/* Custom styles for the image split tool */

/* Drag and drop area styles */
#upload-area {
    transition: all 0.3s ease;
}

#upload-area.dragover {
    border-color: #4f46e5;
    background-color: #f5f3ff;
}

/* Grid preview styles */
#grid-preview {
    aspect-ratio: 1;
    max-width: 600px;
    margin: 0 auto;
}

.grid-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0.375rem;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Download button styles */
#download-all {
    transition: all 0.2s ease;
    position: relative;
}

#download-all:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#download-all:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#download-all.loading {
    color: transparent;
}

#download-all.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: button-loading-spinner 0.6s linear infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #grid-preview {
        max-width: 100%;
    }
    
    .grid-item {
        border-radius: 0.25rem;
    }
}

/* Loading animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
} 