guiTypes = {

	@entryx = 15
	@entryw = 520
	@entryh = 100

	@iconx = 18
	@icony = 15

	@textx  = 125
	@namey  = 15
	@traity = 35
	@equipy = 55

	@unlockbuttonx = 415
	@unlockbuttony = 32

	containerWindowType = {
		name = "mio_catalog_open_btn_mio_list"
		position = { x = 420 y = 11 }
		size = { width = 100 height = 30 }

		buttonType = {
			name = "mio_cat_open_btn"
			position = { x = 0 y = 0 }
			spriteType = "GFX_sort_up_down_button_83x29"
			buttonText = "MIO_CAT_OPEN_BTN"
			buttonFont = "hoi_16mbs"
			clicksound = click_default
			frame = 1
		}
	}

	containerWindowType = {
		name = "mio_unlock_catalog_window"
		animation_time = 300
		size = { width = 550 height = 667 }
		show_sound = open_sub_window
		clipping = yes
		click_to_front = yes
		position = { x = 540 y = 0 }

		background = {
			name = "Background"
			spriteType = "GFX_tiled_plain_bg"
		}

		instantTextboxType = {
			name = "header_text"
			position = { x = 0 y = 4 }
			font = "hoi_24header"
			text = "MIO_CAT_TITLE"
			maxWidth = 510
			maxHeight = 28
			format = center
		}

		buttonType = {
			name = "mio_unlock_catalog_close_button"
			position = { x = -38 y = 4 }
			quadTextureSprite = "GFX_closebutton"
			buttonFont = "Main_14_black"
			shortcut = "ESCAPE"
			Orientation = "UPPER_RIGHT"
			clicksound = click_close
			pdx_tooltip = "CLOSE"
		}

		containerWindowType = {
			name = "filter_options"
			position = { x = 10 y = 30 }
			size = { width = 540 height = 30 }

			buttonType = {
				name = "mio_catalog_filter_toggle_btn"
				position = { x = 0 y = 3 }
				spriteType = "GFX_generic_checkbox_open"
				clicksound = click_checkbox
			}

			instantTextboxType = {
				name = "mio_cat_filter_label"
				position = { x = 35 y = 10 }
				font = "hoi_16mbs"
				text = "MIO_CAT_FILTER_AVAILABLE_LABEL"
				maxWidth = 200
				maxHeight = 20
				format = left
			}
		}

		containerWindowType = {
			name = "organisations"
			position = { x = 0 y = 85 }
			size = { width = 550 height = -4 }
			verticalScrollbar = "right_vertical_slider"
			margin = { top = 4 bottom = 12 }
			scroll_wheel_factor = 98
			smooth_scrolling = yes

			background = {
				name = "Background"
				spriteType = "GFX_tiled_window2_1b_border"
			}

			background = {
				name = "Background"
				quadTextureSprite = "GFX_tiled_generic_overlay_bg1_small"
				position = { x = -1 y = 0 }
			}

			gridboxType = {
				name = "mio_catalog_grid"
				position = { x = @entryx y = 5 }
				size = { width = @entryw height = 100%% }
				slotsize = { width = @entryw height = 100 }
				format = "UPPER_LEFT"
				max_slots_horizontal = 1
			}
		}
	}

	# Instanced once per visible entry by the `mio_catalog_grid` dynamic_list. Per-entry display
	# data (icon, name, trait, equipment label, description, unlock tooltip) is resolved at render
	# time via scripted-loc dispatchers keyed on `v` — see `00_mio_catalog_scripted_loc.txt`.
	containerWindowType = {
		name = "mio_catalog_entry_container"
		size = { width = @entryw height = @entryh }

		buttonType = {
			name = "background_button"
			spriteType = "GFX_mio_entry_bg"
		}

		iconType = {
			name = "icon"
			spriteType = "GFX_idea_company_krepost_state_bureau"
			position = { x = @iconx y = @icony }
			pdx_tooltip = "[mio_catalog_entry_desc]"
		}

		instantTextboxType = {
			name = "name"
			position = { x = @textx y = @namey }
			alwaystransparent = yes
			font = "hoi_18mbs"
			text = "[mio_catalog_entry_name]"
			fixedsize = yes
			maxWidth = 290
			maxHeight = 18
		}

		instantTextboxType = {
			name = "initial_trait"
			position = { x = @textx y = @traity }
			alwaystransparent = yes
			font = "hoi_16mbs"
			text = "[mio_catalog_entry_trait]"
			fixedsize = yes
			maxWidth = 290
			maxHeight = 18
		}

		instantTextboxType = {
			name = "equipment_label"
			position = { x = @textx y = @equipy }
			alwaystransparent = yes
			font = "hoi_16mbs"
			text = "[mio_catalog_entry_equip_label]"
			fixedsize = yes
			maxWidth = 290
			maxHeight = 18
		}

		buttonType = {
			name = "mio_cat_unlock_btn"
			position = { x = @unlockbuttonx y = @unlockbuttony }
			quadTextureSprite = "GFX_leader_selection_button"
			buttonText = "MIO_CAT_UNLOCK_BTN"
			buttonFont = "hoi_16mbs"
			clicksound = click_default
			frame = 1
			pdx_tooltip = "MIO_CAT_UNLOCK_BTN_DESC"
			pdx_tooltip_delayed = "MIO_CAT_UNLOCK_BTN_REQUIREMENTS_TT"
		}

		iconType = {
			name = "mio_cat_unlock_btn_glow"
			spriteType = "GFX_leader_selection_button_glow"
			position = { x = @unlockbuttonx y = @unlockbuttony }
			alwaystransparent = yes
		}
	}
}
