.merge-preview {
    display: none; /* Hidden by default */
    margin-top: 5px;
    border: 1px solid #ccc;
    object-fit: cover; /* Ensure image covers the area without distortion */
    /* Max width/height set via JS */
}

/* Ensure loading overlay covers everything */
.loading-overlay {
    position: fixed; /* Or absolute relative to a container */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's on top */
    transition: opacity 0.3s ease; /* Smooth fade */
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none; /* Allow clicks through when hidden */
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #09f; /* Or your theme color */
    animation: spin 1s ease infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Add styling for disabled buttons */
button:disabled,
input:disabled,
select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}