// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

@import "widgets/theme";

.home-page {
  display: grid;
  align-items: stretch;
  justify-items: center;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 60px;
  grid-template-areas: "center" "footer";

  .home-page-center {
    grid-area: center;

    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;

    .logo {
      height: 1em;
      margin-right: 1rem;
    }

    .home-page-title {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      font-size: 60px;
      margin: 25px;
      text-align: center;
      font-family: $pf-font;
      color: #333;
    }

    .channel-select {
      font-family: $pf-font;
      --chan-width: 100px;
      --chan-num: 2;

      input[type="radio"] {
        width: 0;
        height: 0;
        margin: 0;
        padding: 0;
        -moz-appearance: none;
        -webkit-appearance: none;
        &:nth-of-type(1):checked ~ .highlight {
          margin-left: 0;
        }
        &:nth-of-type(2):checked ~ .highlight {
          margin-left: 100px;
          background-color: hsl(54, 100%, 40%);
        }
        &:nth-of-type(3):checked ~ .highlight {
          margin-left: 200px;
          background-color: hsl(24, 80%, 42%);
        }
      }

      fieldset {
        text-align: center;
        margin: 1rem auto;
        padding: 0;
        position: relative;
        background-color: hsl(218, 8%, 30%);
        border-radius: $pf-border-radius;
        box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
        border: 0;
        width: calc(var(--chan-width) * var(--chan-num));
        height: 40px;
        line-height: 40px;
        z-index: 0;
      }

      label {
        display: inline-block;
        cursor: pointer;
        position: relative;
        width: var(--chan-width);
        height: 100%;
        color: white;
        z-index: 2;
        text-transform: uppercase;
        font-size: 16px;
        font-family: $pf-font;
      }

      .highlight {
        width: var(--chan-width);
        height: 100%;
        position: absolute;
        background: hsla(122, 45%, 45%, 0.99);
        background-image: linear-gradient(
          rgba(255, 255, 255, 0.2),
          transparent
        );
        top: 0;
        left: 0;
        z-index: 1;
        border-radius: inherit;
        @include transition(0.2s);
      }

      .home-page-reload {
        font-size: 12px;
        opacity: 0;
        color: #da4534;
        font-weight: 400;
        @include transition(0.2s);
        &.show {
          opacity: 1;
        }
      }
    } // .channel-select

    .home-page-hints {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-family: $pf-font;

      .pf-hotkey {
        display: inline-flex;
        vertical-align: middle;
      }

      ul {
        margin: 0;
        padding: 0;

        li {
          padding-top: 0.5rem;
        }
      }

      .tagline {
        font-style: italic;
        color: red;
      }

      img {
        display: block;
        object-fit: contain;
        max-width: 30vw;
      }
    }
  } // .home-page-center

  .privacy {
    grid-area: footer;
    align-self: center;
    text-decoration: none;
    font-family: $pf-font;
    color: #333;
  }
} // .home-page
