/* Custom styles for SharePixEZ */

.drop-zone {
    transition: all 0.3s ease;
    cursor: pointer;
}

.drop-zone:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd !important;
}

.drop-zone.dragover {
    background-color: #e3f2fd;
    border-color: #2196f3 !important;
    transform: scale(1.02);
}

.image-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.footer {
    margin-top: auto;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
    padding: 20px 0;
}

.sticky-top {
    top: 20px;
}

/* Progress bar animation */
.progress-bar-animated {
    background-size: 1rem 1rem;
}

/* Toast positioning */
.toast-container {
    z-index: 9999;
}

/* Image grid animations */
.image-enter {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.image-enter.image-enter-active {
    opacity: 1;
    transform: scale(1);
}

.image-exit {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.image-exit.image-exit-active {
    opacity: 0;
    transform: scale(0.8);
}

/* Upload progress styling */
#uploadProgress .progress {
    height: 8px;
}

/* Button loading state */
.btn.loading {
    position: relative;
}

.btn.loading:disabled {
    color: transparent;
}

.btn.loading::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

#selectedImagesContainer {
    max-height: 600px;
    overflow-y: auto;
}

/* Connection cards styling */
.connection-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.connection-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.connection-card.border-success {
    border-color: #198754 !important;
}

.connection-card.border-secondary {
    border-color: #6c757d !important;
}

/* Code input styling */
.code-input {
    width: 80px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.code-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.code-input-group {
    text-align: center;
}

/* Loading spinner for buttons */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-4, .display-5 {
        font-size: 2rem;
    }
    
    .sticky-top {
        position: relative !important;
        top: auto !important;
    }
    
    .drop-zone {
        padding: 2rem !important;
    }

    .connection-card {
        margin-bottom: 1rem;
    }

    .code-input {
        width: 60px;
        font-size: 1rem;
    }
}
