/* Make html/body take full height for potential sticky footer */
html, body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1; /* Allows main content to grow and push footer down */
}

/* Dashed border for drop area */
.border-dashed {
    border-style: dashed !important;
}

/* Highlight drop area when dragging over */
#drop-area.highlight {
    background-color: rgba(0, 123, 255, 0.1); /* Bootstrap primary color with opacity */
    border-color: var(--bs-primary);
}

/* Preview Image Styling */
.preview-card {
    position: relative;
    overflow: hidden; /* Ensure content doesn't overflow card boundaries */
}

.preview-img {
    width: 100%;
    height: 150px; /* Fixed height for consistency */
    object-fit: contain; /* Show entire image, contained within the box */
    background-color: #f8f9fa; /* Light background for transparent images */
}
/* Dark mode background for preview images */
[data-bs-theme="dark"] .preview-img {
     background-color: #495057; /* Darker background for dark mode */
}


.preview-card .card-body {
    padding: 0.75rem;
    font-size: 0.8rem;
}

.preview-card .card-title {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}
.preview-card .card-text {
     margin-bottom: 0.5rem;
}

.preview-download-link {
    font-size: 0.8rem;
}

/* Spinner overlay for conversion indication (optional) */
.spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: var(--bs-card-inner-border-radius); /* Match card border radius */
}

/* Ensure card tools section looks good */
.card h-100 .bi { /* Target icons specifically */
    color: var(--bs-light);
}

[data-bs-theme="dark"] .card.text-bg-secondary {
    background-color: var(--bs-gray-700) !important; /* Slightly darker card for contrast */
     border-color: var(--bs-gray-600) !important;
}


/* Adjustments for smaller screens */
@media (max-width: 768px) {
    .preview-img {
        height: 120px;
    }
}