/*!
 * Copyright (C) 2023 StApps
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <https://www.gnu.org/licenses/>.
 */

@import '../../../theme/util/mixins';

:host ion-header {
  z-index: 1;
}

:host ion-toolbar:last-of-type {
  --padding-top: var(--spacing-md);
  --padding-bottom: var(--spacing-md);
  z-index: -1;

  ion-icon {
    margin-right: var(--spacing-sm);
    width: var(--font-size-xl);
    height: var(--font-size-xl);
  }

  ion-label {
    font-family: var(--headline-font-family);
    font-size: var(--font-size-md);
    font-weight: 700;
  }

  .logo {
    width: 27vw;
    max-width: 150px;
    max-height: 80px;
    aspect-ratio: 1/1;
    object-position: right;
    margin-left: auto;
    margin-right: 0;
  }
}

ion-content {
  --background: var(--ion-background-color);
  --padding-bottom: var(--spacing-xl);
  &::part(inner-scroll) {
    scrollbar-gutter: stable;
  }
}

.schedule {
  width: 100%;
  z-index: 3;
  background: var(--ion-color-primary);
  color: var(--ion-color-primary-contrast);
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-md);
  padding: var(--spacing-sm);
  padding-top: 0;

  @include ion-md-up {
    position: unset;
    width: unset;
    height: calc(var(--tablet-top-bar-height) + (2 * var(--spacing-xl)));
    margin: 0;
    padding: var(--spacing-xl);
  }

  a {
    display: flex;
    flex-direction: column;
    color: var(--ion-color-primary-contrast);
    text-decoration: none;
    height: auto;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-default);
  }

  a:first-child {
    text-align: center;
    flex: 0 0 auto;
    aspect-ratio: 1;
    box-sizing: content-box;
    max-height: 60px;
    overflow: hidden;
    border: 2px solid var(--ion-color-primary-tint);

    @include phoneLandscape {
      height: auto;
    }
  }

  a:first-child {
    justify-content: space-around;
    align-items: center;
    gap: var(--spacing-sm);

    ion-label {
      font-size: var(--font-size-xxs);
      font-weight: var(--font-weight-semi-bold);
    }

    &:hover ::ng-deep stapps-icon {
      --fill: 1;
    }
  }

  a:last-child {
    flex: 1 1 65%;
    background: var(--linear-gradient);
    justify-content: center;
    z-index: 1;

    @include ion-md-up {
      flex: 1 1 100%;
    }

    @include phoneLandscape {
      flex: 1 1 85%;
    }

    ion-label {
      font-size: var(--font-size-xxs);
      font-weight: var(--font-weight-bold);
      line-height: 1.4;
    }

    ion-label:first-child {
      text-transform: uppercase;
      color: var(--ion-color-secondary);
    }

    ion-label:nth-child(2n) {
      font-size: var(--font-size-lg);
      font-weight: var(--font-weight-semi-bold);
      line-height: 1.2;
    }
  }
}
