<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- SHARED RE-USABLE UI STYLES -->

    <style name="Widget.Auxio.AppBarLayout" parent="Widget.Material3.AppBarLayout">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
    </style>

    <!-- Base toolbar style -->
    <style name="Widget.Auxio.Toolbar" parent="Widget.Material3.Toolbar">
        <item name="maxButtonHeight">@dimen/size_btn</item>
        <item name="android:paddingLeft">@dimen/spacing_tiny</item>
        <item name="android:paddingStart">@dimen/spacing_tiny</item>
        <item name="android:paddingRight">@dimen/spacing_tiny</item>
        <item name="android:paddingEnd">@dimen/spacing_tiny</item>
    </style>

    <style name="Widget.Auxio.Slider" parent="Widget.Material3.Slider">
        <item name="trackColorInactive">@color/sel_track</item>
        <item name="haloRadius">@dimen/spacing_medium</item>
        <item name="thumbRadius">@dimen/slider_thumb_radius</item>
        <item name="labelBehavior">gone</item>
        <item name="tickVisible">false</item>
    </style>

    <style name="Widget.Auxio.LinearProgressIndicator" parent="Widget.Material3.LinearProgressIndicator">
        <item name="trackColor">@color/sel_track</item>
        <item name="trackCornerRadius">@dimen/size_corners_medium</item>
    </style>

    <style name="Widget.Auxio.Image.Small" parent="">
        <item name="android:layout_width">@dimen/size_cover_compact</item>
        <item name="android:layout_height">@dimen/size_cover_compact</item>
        <item name="cornerRadius">@dimen/size_corners_small</item>
    </style>

    <style name="Widget.Auxio.Image.Medium" parent="">
        <item name="android:layout_width">@dimen/size_cover_normal</item>
        <item name="android:layout_height">@dimen/size_cover_normal</item>
        <item name="cornerRadius">@dimen/size_corners_small</item>
    </style>

    <style name="Widget.Auxio.Image.Large" parent="">
        <item name="android:layout_width">@dimen/size_cover_large</item>
        <item name="android:layout_height">@dimen/size_cover_large</item>
        <item name="cornerRadius">@dimen/size_corners_medium</item>
        <item name="useLargeIcon">true</item>
    </style>

    <style name="Widget.Auxio.Image.MidHuge" parent="">
        <item name="android:layout_width">@dimen/size_cover_mid_huge</item>
        <item name="android:layout_height">@dimen/size_cover_mid_huge</item>
        <item name="cornerRadius">@dimen/size_corners_medium</item>
        <item name="useLargeIcon">true</item>
    </style>

    <style name="Widget.Auxio.Image.Huge" parent="">
        <item name="android:layout_width">@dimen/size_cover_huge</item>
        <item name="android:layout_height">@dimen/size_cover_huge</item>
        <item name="cornerRadius">@dimen/size_corners_medium</item>
        <item name="useLargeIcon">true</item>
    </style>

    <style name="Widget.Auxio.Image.Full" parent="">
        <item name="android:layout_width">0dp</item>
        <item name="android:layout_height">0dp</item>
        <item name="layout_constraintDimensionRatio">1</item>
        <item name="cornerRadius">@dimen/size_corners_medium</item>
        <item name="useLargeIcon">true</item>
    </style>

    <style name="Widget.Auxio.ItemLayout" parent="">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:background">?attr/selectableItemBackground</item>
        <item name="android:padding">@dimen/spacing_medium</item>
        <item name="android:clickable">true</item>
        <item name="android:focusable">true</item>
    </style>

    <style name="Widget.Auxio.RecyclerView.WithAdaptiveFab" parent="">
        <item name="android:paddingBottom">@dimen/recycler_fab_space_normal</item>
    </style>

    <style name="ThemeOverlay.Accent" parent="">
        <item name="colorOnPrimary">?attr/colorSurface</item>
    </style>

    <!-- TEXTVIEW STYLES -->

    <style name="Widget.Auxio.TextView.Base" parent="Widget.AppCompat.TextView">
        <item name="android:textAlignment">viewStart</item>
    </style>

    <style name="Widget.Auxio.TextView.Item.Base" parent="Widget.Auxio.TextView.Base">
        <item name="android:ellipsize">end</item>
        <item name="android:maxLines">1</item>
        <item name="android:layout_marginStart">@dimen/spacing_medium</item>
    </style>

    <style name="Widget.Auxio.TextView.Item.Primary" parent="Widget.Auxio.TextView.Item.Base">
        <item name="android:textAppearance">@style/TextAppearance.Auxio.TitleMediumLowEmphasis
        </item>
        <item name="android:textColor">?android:attr/textColorPrimary</item>
    </style>

    <style name="Widget.Auxio.TextView.Item.Secondary" parent="Widget.Auxio.TextView.Item.Base">
        <item name="android:textAppearance">@style/TextAppearance.Auxio.BodyMedium</item>
        <item name="android:textColor">?android:attr/textColorSecondary</item>
    </style>

    <style name="Widget.Auxio.TextView.Primary" parent="Widget.Auxio.TextView.Base">
        <item name="android:ellipsize">marquee</item>
        <item name="android:singleLine">true</item>
        <item name="android:marqueeRepeatLimit">marquee_forever</item>
        <item name="android:textAppearance">@style/TextAppearance.Auxio.TitleLarge</item>
    </style>

    <style name="Widget.Auxio.TextView.Secondary" parent="Widget.Auxio.TextView.Base">
        <item name="android:ellipsize">end</item>
        <item name="android:maxLines">1</item>
        <item name="android:textColor">?android:attr/textColorSecondary</item>
        <item name="android:textAppearance">@style/TextAppearance.Auxio.BodyLarge</item>
    </style>

    <style name="Widget.Auxio.TextView.Primary.Compact" parent="Widget.Auxio.TextView.Base">
        <item name="android:ellipsize">end</item>
        <item name="android:maxLines">1</item>
        <item name="android:textColor">?android:attr/textColorPrimary</item>
        <item name="android:textAppearance">@style/TextAppearance.Auxio.LabelLarge</item>
    </style>

    <style name="Widget.Auxio.TextView.Secondary.Compact" parent="Widget.Auxio.TextView.Base">
        <item name="android:maxLines">1</item>
        <item name="android:ellipsize">end</item>
        <item name="android:textColor">?android:attr/textColorSecondary</item>
        <item name="android:textAppearance">@style/TextAppearance.Auxio.LabelMedium</item>
    </style>

    <style name="Widget.Auxio.TextView.Header" parent="Widget.Auxio.TextView.Base">
        <item name="android:paddingStart">@dimen/spacing_medium</item>
        <item name="android:paddingTop">@dimen/spacing_small</item>
        <item name="android:paddingBottom">@dimen/spacing_small</item>
        <item name="android:paddingEnd">@dimen/spacing_medium</item>
        <item name="android:minHeight">@dimen/size_btn</item>
        <item name="android:gravity">center_vertical</item>
        <item name="android:textAppearance">@style/TextAppearance.Auxio.TitleMedium</item>
    </style>

    <style name="Widget.Auxio.TextView.Detail" parent="Widget.Auxio.TextView.Base">
        <item name="android:textAppearance">@style/TextAppearance.Auxio.TitleLarge</item>
        <item name="android:textAlignment">viewStart</item>
    </style>

    <style name="Widget.Auxio.TextView.Icon" parent="Widget.Auxio.TextView.Base">
        <item name="android:drawablePadding">@dimen/spacing_medium</item>
        <item name="android:padding">@dimen/spacing_medium</item>
        <item name="android:textAppearance">@style/TextAppearance.Auxio.BodyLarge</item>
    </style>

    <style name="Widget.Auxio.TextView.Icon.Clickable" parent="Widget.Auxio.TextView.Icon">
        <item name="android:clickable">true</item>
        <item name="android:focusable">true</item>
        <item name="android:background">?attr/selectableItemBackground</item>
    </style>

    <!-- BUTTON STYLES -->

    <style name="Widget.Auxio.Button.Primary" parent="Widget.Material3.Button" />

    <style name="Widget.Auxio.Button.Secondary" parent="Widget.Material3.Button.OutlinedButton" />

    <style name="Widget.Auxio.Button.Icon.Base" parent="Widget.Material3.Button.IconButton">
        <item name="materialThemeOverlay">@style/ThemeOverlay.Auxio.UncheckableIconButton</item>
    </style>

    <style name="ThemeOverlay.Auxio.UncheckableIconButton" parent="">
        <item name="colorContainer">@android:color/transparent</item>
        <item name="colorOnContainer">?attr/colorOnSurfaceVariant</item>
    </style>

    <style name="Widget.Auxio.Button.Icon.Small" parent="Widget.Auxio.Button.Icon.Base">
        <item name="iconSize">@dimen/size_icon_small</item>
        <item name="android:minWidth">@dimen/size_btn</item>
        <item name="android:minHeight">@dimen/size_btn</item>
        <item name="android:insetTop">@dimen/spacing_tiny</item>
        <item name="android:insetBottom">@dimen/spacing_tiny</item>
        <item name="android:insetLeft">@dimen/spacing_tiny</item>
        <item name="android:insetRight">@dimen/spacing_tiny</item>
        <item name="android:paddingStart">@dimen/spacing_small</item>
        <item name="android:paddingEnd">@dimen/spacing_small</item>
        <item name="android:paddingTop">@dimen/spacing_small</item>
        <item name="android:paddingBottom">@dimen/spacing_small</item>
    </style>

    <style name="Widget.Auxio.Button.Icon.Large" parent="Widget.Auxio.Button.Icon.Base">
        <item name="iconSize">@dimen/size_icon_large</item>
        <item name="android:minWidth">@dimen/size_btn</item>
        <item name="android:minHeight">@dimen/size_btn</item>
        <item name="android:insetTop">0dp</item>
        <item name="android:insetBottom">0dp</item>
        <item name="android:insetLeft">0dp</item>
        <item name="android:insetRight">0dp</item>
        <item name="android:paddingStart">@dimen/spacing_small</item>
        <item name="android:paddingEnd">@dimen/spacing_small</item>
        <item name="android:paddingTop">@dimen/spacing_small</item>
        <item name="android:paddingBottom">@dimen/spacing_small</item>
    </style>

    <style name="Widget.Auxio.Button.PlayPause" parent="Widget.Material3.Button.IconButton.Filled.Tonal">
        <item name="android:minWidth">@dimen/size_play_pause_button</item>
        <item name="android:minHeight">@dimen/size_play_pause_button</item>
        <item name="iconSize">@dimen/size_icon_large</item>
        <item name="android:insetTop">0dp</item>
        <item name="android:insetBottom">0dp</item>
        <item name="android:insetLeft">0dp</item>
        <item name="android:insetRight">0dp</item>
        <item name="android:paddingStart">@dimen/spacing_mid_large</item>
        <item name="android:paddingEnd">@dimen/spacing_mid_large</item>
        <item name="android:paddingTop">@dimen/spacing_mid_large</item>
        <item name="android:paddingBottom">@dimen/spacing_mid_large</item>
        <item name="shapeAppearanceOverlay">
            @style/ShapeAppearanceOverlay.Material3.FloatingActionButton
        </item>
    </style>

    <style name="Widget.Auxio.FloatingActionButton.Adaptive" parent="Widget.Material3.FloatingActionButton.Primary">
        <item name="fabSize">normal</item>
    </style>
</resources>