.fi-tabs-item {
    justify-content: center;
    min-width: max-content;
    text-wrap: auto;
}
.fi-tabs-item-label {
    min-width: max-content;
}

/* Custom File Overlay Styles */
.custom-file-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 1;
    transition: all 0.3s ease;
    border-radius: 4px;
    backdrop-filter: blur(1px);
}

.custom-file-overlay:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.02);
}

.custom-file-overlay .icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
    text-align: center;
    padding: 16px;
}

.custom-file-overlay .file-category {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.custom-file-overlay .file-icon {
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.custom-file-overlay .file-icon svg {
    width: 60px;
    height: 60px;
    color: white;
}

.custom-file-overlay .link-icon {
    width: 20px;
    height: 20px;
    opacity: 0.9;
    transition: transform 0.2s ease;
}

.custom-file-overlay:hover .link-icon {
    transform: scale(1.1);
}

.custom-file-overlay .label {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Disable default FilePond interactions */
.filepond--item.custom-overlay-processed video {
    pointer-events: none !important;
}

.filepond--item.custom-overlay-processed img {
    pointer-events: none !important;
}

/* Ensure all interactive elements are above overlay */
.filepond--item.custom-overlay-processed button,
.filepond--item.custom-overlay-processed [role="button"],
.filepond--item.custom-overlay-processed .filepond--file-action-button,
.filepond--item.custom-overlay-processed .filepond--action-buttons *,
.filepond--item.custom-overlay-processed .filepond--processing-complete-indicator,
.filepond--item.custom-overlay-processed .filepond--file-info {
    z-index: 1001 !important;
}

/* Ensure the overlay doesn't cover the top action area */
.custom-file-overlay {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
}

/* Ensure FilePond grid layout is preserved */
.filepond--root {
    /* Preserve FilePond's grid layout */
}

.filepond--list {
    /* Preserve FilePond's list layout */
}

/* Ensure overlay covers the entire item without breaking grid */
.filepond--item.custom-overlay-processed {
    /* Don't force position relative - let FilePond handle layout */
}

.custom-file-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
}

/* Animation for new files */
@keyframes overlayFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.custom-file-overlay {
    animation: overlayFadeIn 0.3s ease-out;
}
