<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<resources>

    <style name="UrlBar.ImageButton.NewTablet">
        <item name="android:layout_width">@dimen/new_tablet_browser_toolbar_menu_item_width</item>
    </style>

    <style name="UrlBar.ImageButton.Forward">
        <item name="android:contentDescription">@string/forward</item>
        <item name="android:layout_width">45dip</item>
        <item name="android:layout_height">37dip</item>
        <item name="android:paddingLeft">10dp</item>
        <item name="android:paddingTop">7dp</item>
        <item name="android:paddingBottom">7dp</item>
        <item name="android:layout_gravity">center_vertical</item>
        <item name="android:layout_centerVertical">true</item>
        <item name="android:src">@drawable/ic_menu_forward</item>
        <item name="android:background">@drawable/url_bar_nav_button</item>
        <!-- Start with the button hidden -->
        <item name="android:alpha">0</item>
        <item name="android:layout_marginLeft">@dimen/forward_default_offset</item>
    </style>

    <!-- Note: this style is for the visible and expanded forward button.  We translate/hide
         the forward button in code - see BrowserToolbarNewTablet.animateForwardButton. -->
    <style name="UrlBar.ImageButton.Forward.NewTablet">
        <item name="android:layout_height">match_parent</item>
        <item name="android:paddingTop">0dp</item>
        <item name="android:paddingBottom">0dp</item>
        <item name="android:layout_marginTop">11.5dp</item>
        <item name="android:layout_marginBottom">11.5dp</item>
        <item name="android:src">@drawable/new_tablet_ic_menu_forward</item>
        <item name="android:background">@drawable/new_tablet_url_bar_nav_button</item>

        <!-- The visible area of the forward button is a nav_button_width and the
             non-visible area slides halfway under the back button. This non-visible
             area is used to ensure the forward button background fully
             covers the space to the right of the back button. -->
        <item name="android:layout_width">@dimen/new_tablet_nav_button_width_plus_half</item>

        <!-- (See note above) We left align with back,
             but only need to hide halfway underneath. -->
        <item name="android:layout_marginLeft">@dimen/new_tablet_nav_button_width_half</item>

        <!-- We use left padding to center the arrow in the
             visible area as opposed to the true width. -->
        <item name="android:paddingLeft">18dp</item>
    </style>

    <style name="UrlBar.ImageButton.TabCount.NewTablet">
        <item name="android:background">@drawable/new_tablet_tabs_count</item>

        <!-- From UrlBar.ImageButton.NewTablet because we can't inherit directly. -->
        <item name="android:layout_width">@dimen/new_tablet_browser_toolbar_menu_item_width</item>
    </style>

    <style name="UrlBar.Button.Container">
        <item name="android:layout_marginTop">6dp</item>
        <item name="android:layout_marginBottom">6dp</item>
        <!-- Start with forward hidden -->
        <item name="android:orientation">horizontal</item>
    </style>

    <style name="TabsLayout" parent="TabsLayoutBase">
         <item name="android:orientation">horizontal</item>
         <item name="android:scrollbars">horizontal</item>
    </style>

    <style name="TabsItem">
         <item name="android:nextFocusDown">@+id/close</item>
    </style>

    <style name="TabsItemClose">
         <item name="android:nextFocusUp">@+id/info</item>
    </style>

    <style name="Toast" parent="ToastBase">
        <item name="android:layout_width">400dp</item>

        <!-- Same as pre-19 Toast style, but with no left and right margins.
             They're removed since large tablets are never going to be only 400dp wide. -->
    </style>

    <style name="Widget.MenuItemActionBar">
        <item name="android:layout_width">@dimen/browser_toolbar_height</item>
        <item name="android:layout_height">@dimen/browser_toolbar_height</item>
        <item name="android:background">@drawable/action_bar_button</item>
        <item name="android:scaleType">fitCenter</item>

        <!-- We split up padding* because we can't override it in *.NewTablet otherwise. -->
        <item name="android:paddingTop">@dimen/browser_toolbar_button_padding</item>
        <item name="android:paddingBottom">@dimen/browser_toolbar_button_padding</item>
        <item name="android:paddingLeft">@dimen/browser_toolbar_button_padding</item>
        <item name="android:paddingRight">@dimen/browser_toolbar_button_padding</item>
    </style>

    <style name="Widget.MenuItemActionBar.NewTablet">
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:scaleType">center</item>
        <item name="android:background">@drawable/new_tablet_action_bar_button</item>

        <!-- layout_width/height doesn't work here, likely because it's
             an ImageButton, so we use padding instead.

             Because the curve of the reload button is lower than the end of the arrow and thus
             the top of the view, it is perceived to be slighly lower than the other buttons.
             Thus we use padding to fill a slightly smaller height than the toolbar and let
             android:gravity center the image with a slight offset (.5dp higher) instead. Note that
             this offset also affects the pressed state, but it's hardly noticeable and thus negligible.

             Note: the above change is done on a generic style and thus any other items added
             to the menu bar may appear to be offset. -->
        <item name="android:paddingTop">20dp</item>
        <item name="android:paddingBottom">21dp</item>
        <item name="android:paddingLeft">@dimen/new_tablet_browser_toolbar_menu_item_padding_horizontal</item>
        <item name="android:paddingRight">@dimen/new_tablet_browser_toolbar_menu_item_padding_horizontal</item>
    </style>

    <style name="Widget.BookmarksListView" parent="Widget.HomeListView">
        <item name="android:scrollbarStyle">outsideOverlay</item>
    </style>

    <style name="Widget.TopSitesGridView" parent="Widget.GridView">
        <item name="android:paddingLeft">5dp</item>
        <item name="android:paddingRight">5dp</item>
        <item name="android:paddingBottom">30dp</item>
        <item name="android:horizontalSpacing">10dp</item>
        <item name="android:verticalSpacing">10dp</item>
    </style>

    <style name="Widget.TopSitesListView" parent="Widget.BookmarksListView">
        <item name="android:paddingTop">30dp</item>
        <item name="android:paddingLeft">32dp</item>
        <item name="android:paddingRight">32dp</item>
        <item name="topDivider">false</item>
    </style>

    <style name="Widget.ReadingListView" parent="Widget.BookmarksListView"/>

    <style name="Widget.ReadingListRow.Description">
        <item name="android:textAppearance">@style/TextAppearance.Widget.Home.ItemDescription</item>
        <item name="android:maxLines">2</item>
        <item name="android:ellipsize">end</item>
        <item name="android:lineSpacingMultiplier">1.3</item>
    </style>

    <style name="Widget.HomeBanner">
        <item name="android:paddingLeft">32dp</item>
        <item name="android:paddingRight">32dp</item>
    </style>

    <!-- Tabs panel -->
    <style name="TabsPanelFrame.RemoteTabs" parent="TabsPanelFrameBase">
        <item name="android:paddingLeft">112dp</item>
        <item name="android:paddingRight">112dp</item>
    </style>

    <style name="TabsPanelFrame.PrivateTabs">
        <item name="android:orientation">horizontal</item>
        <item name="android:paddingTop">0dp</item>
    </style>

    <style name="TabsPanelSection.PrivateTabs">
        <item name="android:layout_weight">1</item>
        <item name="android:layout_marginLeft">20dp</item>
        <item name="android:layout_marginRight">20dp</item>
    </style>

    <style name="TabsPanelSection.PrivateTabs.Header">
        <item name="android:paddingTop">10dp</item>
    </style>

    <style name="TabsPanelItem.TextAppearance.Header.PrivateTabs">
        <item name="android:visibility">gone</item>
    </style>

    <style name="TabsPanelItem.TextAppearance.Linkified.LearnMore">
        <item name="android:layout_height">match_parent</item>
        <item name="android:gravity">center</item>
        <item name="android:layout_gravity">center</item>
    </style>

    <style name="TextAppearance.UrlBar.Title" parent="TextAppearance.Medium">
        <item name="android:textSize">16sp</item>
    </style>

</resources>
