/* User Directory Item Block Styles */
.wpuf-user-directory-item {
    position: relative;
    width: 100%;
}

/* Loading State - Only for editor preview */
.wpuf-user-directory-item.wpuf-loading {
    opacity: 0.6;
    pointer-events: none;
}

.wpuf-user-directory-item.wpuf-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty State - Only for editor preview */
.wpuf-user-directory-item.wpuf-empty {
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wpuf-user-directory-item.wpuf-empty::before {
    content: '👤';
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Editor-specific styles */
.editor-styles-wrapper .wpuf-user-directory-item {
    /* Ensure proper display in editor */
    display: block;
    min-height: 100px;
}

/* Focus and Accessibility */
.wpuf-user-directory-item:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 12px;
}

/* Print Styles */
@media print {
    .wpuf-user-directory-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
