<window type="dialog">
    <coordinates>
        <left>0</left>
        <top>0</top>
		<width>1920</width>
		<height>1080</height>
    </coordinates>
    <controls>
        <!-- Background -->
        <control type="group">
            <top>0</top>
            <left>0</left>
            <width>1920</width>
            <height>1080</height>

            <!-- Fallback -->
            <control type="image">
                <texture>white.png</texture>
                <colordiffuse>8000000</colordiffuse>
				<aspectratio scalediffuse="false" align="center" aligny="center">scale</aspectratio>
                <animation effect="fade" end="0" time="350" tween="cubic" easing="in" condition="String.IsEqual(Window().Property(resolving),true)">Conditional</animation>
                <visible>!String.IsEqual(Window().Property(instant_close),true)</visible>
            </control>

            <!-- Fanart -->
            <control type="image">
                <texture background="true">$INFO[Window().Property(info.fanart)]</texture>
                <colordiffuse>FFFFFFFF</colordiffuse>
				<aspectratio scalediffuse="false" align="center" aligny="center">scale</aspectratio>
                <animation effect="fade" end="0" time="350" tween="cubic" easing="in" condition="String.IsEqual(Window().Property(resolving),true)">Conditional</animation>
                <visible>!String.IsEqual(Window().Property(instant_close),true)</visible>
            </control>

            <!-- Overlay -->
            <control type="image">
				<texture background="true">white.png</texture>
				<colordiffuse>CC000000</colordiffuse>
                <animation effect="fade" end="0" time="350" tween="cubic" easing="in" condition="String.IsEqual(Window().Property(resolving),true)">Conditional</animation>
                <visible>!String.IsEqual(Window().Property(instant_close),true)</visible>
			</control>
        </control>

		<!-- Clearlogo -->
		<control type="image">
			<animation type="WindowOpen">
                <effect type="slide" start="841,401" time="350" tween="cubic" easing="in"/>
				<effect type="zoom" start="140,140" time="350" center="auto" tween="cubic" easing="in"/>
			</animation>
            <animation effect="fade" end="0" time="350" tween="cubic" easing="in" condition="!String.IsEqual(Window().Property(instant_close),true)">WindowClose</animation>
            <animation effect="fade" end="0" time="350" tween="cubic" easing="in" condition="String.IsEqual(Window().Property(resolving),true)">Conditional</animation>
            <animation type="Conditional" condition="!String.IsEqual(Window().Property(resolving),true)">
                <effect type="slide" start="841,401" time="350" delay="350" tween="cubic" easing="in"/>
				<effect type="zoom" start="140,140" time="350" delay="350" center="auto" tween="cubic" easing="in"/>
			</animation>
			<top>0</top>
			<left>20</left>
			<width>200</width>
			<height>150</height>
			<align>left</align>
			<aspectratio>keep</aspectratio>
			<texture>jtk_clearlogo.png</texture>
			<colordiffuse>CCFFFFFF</colordiffuse>
			<visible>!String.IsEmpty(Window().Property(info.clearlogo)) + !String.IsEqual(Window().Property(instant_close),true)</visible>
		</control>

		<!-- Qualities Header as a horizontal list -->
		<control type="list" id="1300">
            <top>40</top>
            <left>500</left> <!-- Centered above sources list -->
            <width>800</width>
            <height>60</height>
            <orientation>horizontal</orientation>
			<ondown>1000</ondown> 
			<itemgap>0</itemgap>
			<visible>!String.IsEqual(Window().Property(instant_close),true)</visible>

            <itemlayout width="200" height="60">
                <control type="group">
                    <control type="label">
                        <width>200</width>
                        <height>60</height>
                        <font>font25</font>
                        <textcolor>AAAAAAAA</textcolor>
                        <align>center</align>
                        <label>$INFO[ListItem.Label]</label>
                    </control>
                    <!-- Separator: only show if not last item -->
                    <control type="label">
                        <left>200</left>
                        <width>20</width>
                        <height>60</height>
                        <font>font25</font>
                        <textcolor>80FFFFFF</textcolor>
                        <align>center</align>
                        <label>|</label>
                    </control>
                </control>
            </itemlayout>
            <focusedlayout width="200" height="60">
                <control type="group">
                    <control type="label">
                        <width>200</width>
                        <height>60</height>
                        <font>font25</font>
                        <textcolor>FFFFFFFF</textcolor>
                        <align>center</align>
                        <label>$INFO[ListItem.Label]</label>
                    </control>
                    <control type="label">
                        <left>200</left>
                        <width>20</width>
                        <height>60</height>
                        <font>font25</font>
                        <textcolor>80FFFFFF</textcolor>
                        <align>center</align>
                        <label>|</label>
                    </control>
                </control>
            </focusedlayout>
        </control>

		<!-- Filter Hint -->
		<control type="label" id="1201">
			<top>85</top>
			<left>500</left> <!-- Centered above sources list -->
			<width>800</width>
			<height>25</height>
			<font>font12</font>
			<textcolor>80FFFFFF</textcolor>
			<align>center</align>
			<label>Press [LEFT] for more filtering options</label>
			<visible>!String.IsEqual(Window().Property(instant_close),true)</visible>
		</control>

		<!-- Scrollbar -->
		<control type="scrollbar" id="1111">
			<left>1366</left>
			<top>140</top>
			<width>20</width>
			<height>890</height>
			<onleft>1000</onleft>
			<showonepage>false</showonepage>
			<texturesliderbackground colordiffuse="99362e33">white.png</texturesliderbackground>
			<texturesliderbar colordiffuse="66FFFFFF">white.png</texturesliderbar>
			<texturesliderbarfocus colordiffuse="$INFO[Window().Property(settings.color)]">white.png</texturesliderbarfocus>
            <visible>String.IsEqual(Window().Property(instant_close),false)</visible>
		</control>

        <!-- Sources List -->
        <control type="list" id="1000">
            <viewtype label="Sources">list</viewtype>
			<pagecontrol>1111</pagecontrol>
			<onup>1300</onup>
			<onright>1111</onright>
            <left>100</left>
            <top>130</top>
            <width>1340</width>
            <height>920</height>
            <itemgap>20</itemgap>
            <orientation>vertical</orientation>
            <visible>!String.IsEqual(Window().Property(instant_close),true)</visible>

			<!-- Unfocused Source -->
            <itemlayout height="220">
				<control type="group">
                    <width>1250</width>
					<control type="image">
						<top>10</top>
						<width>200</width>
						<height>200</height>
						<texture border="30">left-circle.png</texture>
						<colordiffuse>$INFO[Window().Property(style.card_accent)]</colordiffuse>
					</control>
                    <control type="image">
                        <top>10</top>
						<height>200</height>
						<texture border="30">circle.png</texture>
						<colordiffuse>$INFO[Window().Property(style.card_bg)]</colordiffuse>
						</control>
					<control type="label">
						<font>font30</font>
						<top>75</top>
						<height>20</height>
						<align>center</align>
						<width>200</width>
						<textcolor>66FFFFFF</textcolor>
						<label>[UPPERCASE]$INFO[ListItem.Property(quality)][/UPPERCASE]</label>
					</control>
					<control type="label">
						<top>125</top>
						<align>center</align>
						<height>20</height>
						<width>200</width>
						<font>font20</font>
						<textcolor>66FFFFFF</textcolor>
						<label>$INFO[ListItem.Property(type)]</label>
					</control>

                    <control type="label">
                        <top>20</top>
                        <left>220</left>
                        <width>1000</width>
                        <height>25</height>
                        <font>font12</font>
                        <textcolor>FFFFFFFF</textcolor>
                        <label>[B]$INFO[ListItem.Property(display_title)][/B]</label>
						<visible>!String.IsEmpty(ListItem.Property(display_title))</visible>
                    </control>

					<control type="label">
						<top>70</top>
						<left>220</left>
						<width>1000</width>
						<height>20</height>
						<font>font12</font>
						<textcolor>FFFFFFFF</textcolor>
						<label>$INFO[ListItem.Property(hdr_info)]</label>
						<visible>!String.IsEmpty(ListItem.Property(hdr_info))</visible>
					</control>

					<control type="group">
						<top>105</top>
						<control type="label">
							<left>220</left>
							<width>320</width>
							<height>20</height>
							<font>font12</font>
							<textcolor>CCFFFFFF</textcolor>
							<label>[B][UPPERCASE][COLOR CCFFFFFF]SIZE: [/COLOR][/UPPERCASE][/B]$INFO[ListItem.Property(size)]</label>
							<visible>!String.IsEmpty(ListItem.Property(size))</visible>
						</control>
						<control type="label">
							<left>550</left>
							<width>380</width>
							<height>20</height>
							<font>font12</font>
							<textcolor>CCFFFFFF</textcolor>
							<label>[B][UPPERCASE][COLOR CCFFFFFF]S: [/COLOR][/UPPERCASE][/B]$INFO[ListItem.Property(seeders)]</label>
							<visible>!String.IsEmpty(ListItem.Property(seeders))</visible>
						</control>
						<control type="label">
							<left>950</left>
							<width>350</width>
							<height>20</height>
							<font>font12</font>
							<textcolor>CCFFFFFF</textcolor>
							<label>[B][UPPERCASE][COLOR CCFFFFFF]STATUS: [/COLOR][/UPPERCASE][/B]$INFO[ListItem.Property(status)]</label>
							<visible>!String.IsEmpty(ListItem.Property(status))</visible>
						</control>
					</control>

					<control type="group">
						<top>140</top>
						<control type="label">
							<left>220</left>
							<width>320</width>
							<height>20</height>
							<font>font12</font>
							<textcolor>CCFFFFFF</textcolor>
							<label>[B][UPPERCASE][COLOR CCFFFFFF]INDEXER: [/COLOR][/UPPERCASE][/B]$INFO[ListItem.Property(indexer)]</label>
							<visible>!String.IsEmpty(ListItem.Property(indexer))</visible>
						</control>
						<control type="label">
							<left>550</left>
							<width>380</width>
							<height>20</height>
							<font>font12</font>
							<textcolor>CCFFFFFF</textcolor>
							<label>[B][UPPERCASE][COLOR CCFFFFFF]PROVIDER: [/COLOR][/UPPERCASE][/B]$INFO[ListItem.Property(provider)]</label>
							<visible>!String.IsEmpty(ListItem.Property(provider))</visible>
						</control>
						<control type="label">
							<left>950</left>
							<width>350</width>
							<height>20</height>
							<font>font12</font>
							<textcolor>CCFFFFFF</textcolor>
							<label>[B][UPPERCASE][COLOR CCFFFFFF]DATE: [/COLOR][/UPPERCASE][/B]$INFO[ListItem.Property(publishDate)]</label>
							<visible>!String.IsEmpty(ListItem.Property(publishDate))</visible>
						</control>
					</control>

					<control type="label">
						<top>175</top>
						<left>220</left>
						<width>1000</width>
						<height>20</height>
						<font>font12</font>
						<textcolor>CCFFFFFF</textcolor>
						<label>[B][UPPERCASE][COLOR CCFFFFFF]LANGUAGES: [/COLOR][/UPPERCASE][/B]$INFO[ListItem.Property(fullLanguages)]</label>
						<visible>!String.IsEmpty(ListItem.Property(fullLanguages))</visible>
					</control>
                </control>
            </itemlayout>

			<!-- Focused Source -->
            <focusedlayout height="220">
                <control type="group">
					<width>1250</width>
					<control type="image">
						<top>10</top>
						<width>200</width>
						<height>200</height>
						<texture border="30">left-circle.png</texture>
						<colordiffuse>$INFO[Window().Property(style.card_accent)]</colordiffuse>
					</control>
                    <control type="image">
                        <top>10</top>
						<height>200</height>
                        <texture border="30">circle.png</texture>
                        <colordiffuse>$INFO[Window().Property(style.card_focus)]</colordiffuse>
                    </control>

					<control type="label">
						<font>font30</font>
						<top>75</top>
						<height>20</height>
						<align>center</align>
						<width>200</width>
						<textcolor>FFFFFFFF</textcolor>
						<label>[UPPERCASE]$INFO[ListItem.Property(quality)][/UPPERCASE]</label>
					</control>
					<control type="label">
						<top>125</top>
						<align>center</align>
						<height>20</height>
						<width>200</width>
						<font>font20</font>
						<textcolor>FFFFFFFF</textcolor>
						<label>$INFO[ListItem.Property(type)]</label>
					</control>

                    <control type="label">
                        <top>20</top>
                        <left>220</left>
                        <width>1000</width>
                        <height>25</height>
                        <font>font12</font>
                        <textcolor>FFFFFFFF</textcolor>
                        <label>[B]$INFO[ListItem.Property(display_title)][/B]</label>
						<scroll>true</scroll>
						<visible>!String.IsEmpty(ListItem.Property(display_title))</visible>
                    </control>

					<control type="label">
						<top>70</top>
						<left>220</left>
						<width>1000</width>
						<height>20</height>
						<font>font12</font>
						<textcolor>FFFFFFFF</textcolor>
						<label>$INFO[ListItem.Property(hdr_info)]</label>
						<visible>!String.IsEmpty(ListItem.Property(hdr_info))</visible>
					</control>

					<control type="group">
						<top>105</top>
						<control type="label">
							<left>220</left>
							<width>320</width>
							<height>20</height>
							<font>font12</font>
							<textcolor>FFFFFFFF</textcolor>
							<label>[B][UPPERCASE][COLOR FFFFFFFF]SIZE: [/COLOR][/UPPERCASE][/B]$INFO[ListItem.Property(size)]</label>
							<visible>!String.IsEmpty(ListItem.Property(size))</visible>
						</control>
						<control type="label">
							<left>550</left>
							<width>380</width>
							<height>20</height>
							<font>font12</font>
							<textcolor>FFFFFFFF</textcolor>
							<label>[B][UPPERCASE][COLOR FFFFFFFF]S: [/COLOR][/UPPERCASE][/B]$INFO[ListItem.Property(seeders)]</label>
							<visible>!String.IsEmpty(ListItem.Property(seeders))</visible>
						</control>
						<control type="label">
							<left>950</left>
							<width>350</width>
							<height>20</height>
							<font>font12</font>
							<textcolor>FFFFFFFF</textcolor>
							<label>[B][UPPERCASE][COLOR FFFFFFFF]STATUS: [/COLOR][/UPPERCASE][/B]$INFO[ListItem.Property(status)]</label>
							<visible>!String.IsEmpty(ListItem.Property(status))</visible>
						</control>
					</control>

					<control type="group">
						<top>140</top>
						<control type="label">
							<left>220</left>
							<width>320</width>
							<height>20</height>
							<font>font12</font>
							<textcolor>FFFFFFFF</textcolor>
							<label>[B][UPPERCASE][COLOR FFFFFFFF]INDEXER: [/COLOR][/UPPERCASE][/B]$INFO[ListItem.Property(indexer)]</label>
							<visible>!String.IsEmpty(ListItem.Property(indexer))</visible>
						</control>
						<control type="label">
							<left>550</left>
							<width>380</width>
							<height>20</height>
							<font>font12</font>
							<textcolor>FFFFFFFF</textcolor>
							<label>[B][UPPERCASE][COLOR FFFFFFFF]PROVIDER: [/COLOR][/UPPERCASE][/B]$INFO[ListItem.Property(provider)]</label>
							<visible>!String.IsEmpty(ListItem.Property(provider))</visible>
						</control>
						<control type="label">
							<left>950</left>
							<width>350</width>
							<height>20</height>
							<font>font12</font>
							<textcolor>FFFFFFFF</textcolor>
							<label>[B][UPPERCASE][COLOR FFFFFFFF]DATE: [/COLOR][/UPPERCASE][/B]$INFO[ListItem.Property(publishDate)]</label>
							<visible>!String.IsEmpty(ListItem.Property(publishDate))</visible>
						</control>
					</control>

					<control type="label">
						<top>175</top>
						<left>220</left>
						<width>1000</width>
						<height>20</height>
						<font>font12</font>
						<textcolor>FFFFFFFF</textcolor>
						<label>[B][UPPERCASE][COLOR FFFFFFFF]LANGUAGES: [/COLOR][/UPPERCASE][/B]$INFO[ListItem.Property(fullLanguages)]</label>
						<visible>!String.IsEmpty(ListItem.Property(fullLanguages))</visible>
					</control>
                </control>
            </focusedlayout>
        </control>

        <control type="group">
            <top>100</top>
            <right>70</right>
            <width>500</width>
			<control type="image">
				<aspectratio align="center" aligny="center">keep</aspectratio>
				<top>20</top>
				<left>20</left>
				<height>600</height>
				<width>500</width>
				<texture>$INFO[Window.Property(info.poster)]</texture>
			</control>
			<control type="label">
				<wrapmultiline>true</wrapmultiline>
				<top>650</top>
				<left>60</left>
				<height>200</height>
				<width>460</width>
				<font>font12</font>
				<textcolor>FFFFFFFF</textcolor>
				<label>$INFO[Window().Property(info.overview)]</label>
			</control>
        </control>
    </controls>
</window>
