/*!
 * 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 {
    width: var(--font-size-xl);
    height: var(--font-size-xl);
    margin-right: var(--spacing-sm);
  }

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

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

    object-position: right;
  }
}

ion-content {
  --background: var(--ion-background-color);
  --padding-bottom: var(--spacing-xl);

  &::part(inner-scroll) {
    scrollbar-gutter: stable;
  }
}

.schedule {
  @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);
  }

  z-index: 3;

  display: flex;
  gap: var(--spacing-md);
  justify-content: space-between;

  width: 100%;
  padding: var(--spacing-sm);
  padding-top: 0;

  color: var(--ion-color-primary-contrast);

  background: var(--ion-color-primary);

  a {
    display: flex;
    flex-direction: column;

    height: auto;
    min-height: 80px;
    padding: var(--spacing-sm);

    color: var(--ion-color-primary-contrast);
    text-decoration: none;

    border-radius: var(--border-radius-default);
  }

  a:first-child {
    @include phone-landscape {
      height: auto;
    }

    overflow: hidden;
    flex: 0 0 auto;
    gap: var(--spacing-sm);
    align-items: center;
    justify-content: center;

    height: 100%;

    text-align: center;

    border: 2px solid var(--ion-color-primary-tint);

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

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

    @include phone-landscape {
      flex: 1 1 85%;
    }

    z-index: 1;

    flex: 1 1 65%;
    justify-content: center;

    padding-inline: var(--spacing-lg);

    background: var(--linear-gradient);

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

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

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

  a:first-child:hover {
    --fill: 1;
  }
}
