/* ===== Profile Avatar Preview ===== */
.ui-refresh .profile-avatar-preview {
    display: inline-flex;
    margin: 0 auto var(--space-4);
    position: relative;
    border: none;
    background: none;
    padding: 0;
    border-radius: var(--radius-full);
}
.ui-refresh .panel-body:has(.profile-avatar-preview) {
    text-align: center;
}
.ui-refresh .profile-avatar-preview img {
    width: 192px;
    height: 192px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--border-subtle);
}
/* Choose Image hover overlay (default avatar only) */
.ui-refresh .profile-avatar-choose-overlay {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}
.ui-refresh .profile-avatar-preview:not(.has-custom-image):hover .profile-avatar-choose-overlay {
    opacity: 1;
    pointer-events: auto;
}
.ui-refresh .profile-avatar-choose-overlay-bg {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
    background: white;
    opacity: 0.85;
}
.ui-refresh .profile-avatar-choose-btn {
    position: relative;
    z-index: 1;
}

/* ===== Profile Drop Zone ===== */
.ui-refresh .profile-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-6);
    border: 1px dashed var(--border-default);
    border-radius: var(--radius-xl);
    background: var(--bg-page);
    transition: background var(--transition-fast), border-color var(--transition-fast);
    margin-bottom: var(--space-4);
}
.ui-refresh .profile-drop-zone.drag-over {
    background: var(--accent-subtle);
    border-color: var(--accent-primary);
}
.ui-refresh .profile-drop-zone-text {
    color: var(--fg-muted);
    font-size: var(--font-size-lg);
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
}

/* ===== Remove Image Button ===== */
.ui-refresh .btn-remove-image {
    position: absolute;
    z-index: 1;
    /* Place button center on the circle's circumference at 45°:
       radius = 96px, cos(45°) = sin(45°) ≈ 0.707
       center_x = 96 + 96*0.707 = 163.88, center_y = 96 - 96*0.707 = 28.12
       subtract half button (16px): top = 12px, left = 148px */
    top: 12px;
    left: 148px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    color: var(--fg-default);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition-fast), opacity var(--transition-fast);
    opacity: 0;
    pointer-events: none;
}
.ui-refresh .profile-avatar-preview.has-custom-image:hover .btn-remove-image {
    opacity: 1;
    pointer-events: auto;
}
.ui-refresh .btn-remove-image:hover {
    background: var(--bg-muted);
}

/* ===== File Upload / File Preview ===== */
.ui-refresh #content-container .file-preview {
    margin-bottom: var(--space-3);
}
.ui-refresh .file-drop-zone {
    display: flex;
    align-items: center;
    justify-content: center;
}
.ui-refresh .file-drop-zone-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--fg-muted);
}
.ui-refresh .drop-zone-icon {
    font-size: var(--space-10);
}
.ui-refresh .file-input-ajax-new .file-preview .fileinput-remove {
    display: none;
}
.ui-refresh .file-preview-thumbnails .kv-preview-thumb ~ .kv-preview-thumb {
    display: none;
}
