<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/appbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:animateLayoutChanges="true">

            <FrameLayout
                android:id="@+id/advanced_options"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:background="#b5000000"
                android:clickable="true"
                android:focusable="false"
                android:visibility="gone"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent">

                <androidx.cardview.widget.CardView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    app:layout_constraintBottom_toBottomOf="@+id/linearLayout"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="@+id/webview">

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="8dp"
                        android:layout_marginEnd="8dp"
                        android:background="?android:attr/colorBackground"
                        android:orientation="vertical">

                        <Button
                            android:id="@+id/btn_recheck"
                            style="@style/Widget.AppCompat.Button.Borderless"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="Recheck login status" />

                        <Button
                            android:id="@+id/btn_alt_login"
                            style="@style/Widget.AppCompat.Button.Borderless"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="Alternative login page" />

                        <Button
                            android:id="@+id/btn_skip_restyle"
                            style="@style/Widget.AppCompat.Button.Borderless"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="Skip page restyling" />

                        <Button
                            android:id="@+id/btn_close"
                            style="@style/Widget.AppCompat.Button.Borderless"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="Close" />

                    </LinearLayout>
                </androidx.cardview.widget.CardView>
            </FrameLayout>

            <WebView
                android:id="@+id/webview"
                android:layout_width="0dp"
                android:layout_height="0dp"
                app:layout_constraintBottom_toTopOf="@+id/linearLayout"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <LinearLayout
                android:id="@+id/linearLayout"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent">

                <Button
                    android:id="@+id/btn_cancel"
                    style="@style/Widget.AppCompat.Button.Borderless"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="@android:string/cancel" />

                <Button
                    android:id="@+id/btn_advanced"
                    style="@style/Widget.AppCompat.Button.Borderless"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="Advanced" />

            </LinearLayout>
        </androidx.constraintlayout.widget.ConstraintLayout>

    </LinearLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
