/**
 * User Avatar Block Styles
 * Handles avatar shapes, sizes, and fallback displays
 */

/* Avatar Block Container */
.wpuf-user-avatar {
    display: inline-block;
    position: relative;
}

/* Avatar Container */
.wpuf-avatar-container {
    position: relative;
    display: inline-block;
}

/* Avatar Initials */
.wpuf-avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #059669 0%, #046c4c 100%);
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    user-select: none;
}

.wpuf-avatar-initials-text {
    display: block;
    text-align: center;
}

/* Avatar Shapes */
.wpuf-avatar--circle {
    border-radius: 50%;
}

.wpuf-avatar--square {
    border-radius: 0;
}

.wpuf-avatar--rounded {
    border-radius: 12px;
}

/* Avatar Sizes */
.wpuf-avatar--small {
    width: 32px;
    height: 32px;
}

.wpuf-avatar--medium {
    width: 96px;
    height: 96px;
}

.wpuf-avatar--large {
    width: 150px;
    height: 150px;
}

.wpuf-avatar--xlarge {
    width: 300px;
    height: 300px;
}

.wpuf-avatar--custom {
    width: var(--wpuf-avatar-size, 150px);
    height: var(--wpuf-avatar-size, 150px);
}

/* Loading State */
.wpuf-avatar-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    background: var(--wp--preset--color--light-grey, #f8f9fa);
    border: 2px dashed var(--wp--preset--color--border, #e2e8f0);
    border-radius: 8px;
    color: var(--wp--preset--color--foreground, #64748b);
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.wpuf-avatar-loading span {
    opacity: 0.7;
}

/* Placeholder for No User Data */
.wpuf-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    background: var(--wp--preset--color--light-grey, #f8f9fa);
    border: 2px dashed var(--wp--preset--color--border, #e2e8f0);
    border-radius: 8px;
    color: var(--wp--preset--color--foreground, #64748b);
    text-align: center;
}

.wpuf-placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wpuf-placeholder-icon {
    font-size: 2rem;
    opacity: 0.6;
}

.wpuf-placeholder-content p {
    margin: 0;
    font-weight: 500;
}

.wpuf-placeholder-content small {
    opacity: 0.7;
    font-size: 0.85rem;
}

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

/* Editor Preview Notice Styling */
.wpuf-user-avatar .components-notice {
    margin-top: 10px;
    font-size: 12px;
}

.wpuf-user-avatar .components-notice p {
    margin: 0;
}

/* Initials Color Variations Based on User */
.wpuf-avatar--initials {
    background: linear-gradient(135deg, #059669 0%, #046c4c 100%);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .wpuf-avatar--initials {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }

    .wpuf-avatar-placeholder {
        border-color: #000;
        background: #fff;
        color: #000;
    }

    .wpuf-avatar-loading {
        border-color: #000;
        background: #fff;
        color: #000;
    }
}
