/* WPUF User Files Block Styles */

/* Files Container */
.wpuf-user-files {
    --wpuf-files-font-size: 0.95rem;
    --wpuf-files-line-height: 1.4;
    --wpuf-files-spacing: 1rem;
    --wpuf-files-text-color: var(--wp--preset--color--foreground, #404040);
    --wpuf-files-link-color: var(--wp--preset--color--primary, #0073aa);
    --wpuf-files-border-color: #e0e0e0;
    --wpuf-files-bg-color: #f9f9f9;
}

/* Files Content */
.wpuf-files-content {
    font-size: var(--wpuf-files-font-size);
    line-height: var(--wpuf-files-line-height);
    color: var(--wpuf-files-text-color);
}

/* Files Label */
.wpuf-files-label {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--wpuf-files-text-color);
}

/* Files Grid */
.files-grid {
    display: grid;
}

.wpuf-grid {
    display: grid;
}

.wpuf-grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wpuf-gap-3 {
    gap: 0.75rem;
}

.wpuf-gap-x-4 {
    column-gap: 1rem;
}

.wpuf-gap-y-8 {
    row-gap: 2rem;
}

.wpuf-gap-x-6 {
    column-gap: 1.5rem;
}

.wpuf-gap-x-8 {
    column-gap: 2rem;
}

/* File Item */
.file-item {
    position: relative;
}

.wpuf-relative {
    position: relative;
}

.wpuf-group {
    position: relative;
}

.wpuf-overflow-hidden {
    overflow: hidden;
}

.wpuf-rounded-lg {
    border-radius: 0.5rem;
}

.wpuf-bg-gray-100 {
    background-color: #f3f4f6;
}

.wpuf-bg-gray-200 {
    background-color: #e5e7eb;
}

.wpuf-bg-gray-800 {
    background-color: #1f2937;
}

.wpuf-bg-gray-700 {
    background-color: #374151;
}

.wpuf-bg-gray-500 {
    background-color: #6b7280;
}

/* File Preview */
.file-preview {
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s;
}

.file-preview:hover {
    background-color: #6b7280;
}

.group:hover .file-preview {
    transform: scale(1.05);
}

/* File Info */
.file-info {
    margin-top: 0.5rem;
}

.file-name {
    font-size: 0.75rem;
    color: #374151;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}



/* File Icon Container */
.wpuf-aspect-\[10\/7\] {
    aspect-ratio: 10 / 7;
}

.wpuf-flex {
    display: flex;
}

.wpuf-items-center {
    align-items: center;
}

.wpuf-justify-center {
    justify-content: center;
}

/* File Icon */
.wpuf-text-gray-500 {
    color: #6b7280;
}

.wpuf-text-gray-400 {
    color: #9ca3af;
}

/* File Button */
.wpuf-absolute {
    position: absolute;
}

.wpuf-inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}



/* Screen Reader Only */
.wpuf-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* File Name */
.wpuf-pointer-events-none {
    pointer-events: none;
}

.wpuf-mt-2 {
    margin-top: 0.5rem;
}

.wpuf-block {
    display: block;
}

.wpuf-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wpuf-text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.wpuf-font-medium {
    font-weight: 500;
}

.wpuf-text-gray-900 {
    color: #111827;
}

.wpuf-text-gray-500 {
    color: #6b7280;
}



/* Responsive Design */
@media (min-width: 640px) {
    .sm\:wpuf-grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .sm\:wpuf-gap-x-6 {
        column-gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .md\:wpuf-grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:wpuf-grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .xl\:wpuf-gap-x-8 {
        column-gap: 2rem;
    }
}

/* Empty State */
.wpuf-files-empty {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
    background: var(--wpuf-files-bg-color);
    border-radius: 8px;
    border: 1px dashed var(--wpuf-files-border-color);
}

/* Block Editor Specific Styles */
.block-editor-block-list__layout .wpuf-user-files {
    margin: 0;
}

.block-editor-block-list__layout .wpuf-files-content {
    pointer-events: none;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .wpuf-group {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wpuf-files-empty {
        border-color: #000;
        background-color: #fff;
        color: #000;
    }

    .wpuf-bg-gray-100 {
        background-color: #fff;
        border: 1px solid #000;
    }

    .wpuf-bg-gray-200 {
        background-color: #fff;
        border: 1px solid #000;
    }
}

/* Print styles */
@media print {
    .wpuf-files-content {
        break-inside: avoid;
    }

    .wpuf-files-label {
        font-weight: bold;
    }
}
