/*!
 * 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';

stapps-navigation-tabs {
  @include ion-xl-up {
    display: none;
  }
}

:host {
  ion-split-pane {
    --side-max-width: 256px;

    @include phone-landscape {
      margin-bottom: 0;
    }

    @include ion-md-up {
      margin-bottom: 0;
      margin-left: var(--navigation-rail-width);
    }

    @include ion-xl-up {
      margin-left: 0;
    }

    margin-bottom: calc(var(--ion-tabbar-height) + env(safe-area-inset-bottom));
    transition: margin-top 150ms ease;
  }

  ion-toolbar.in-toolbar {
    padding-bottom: 0;

    ion-title {
      position: relative;
      padding: var(--spacing-xl) var(--spacing-md);

      .logo {
        @include ion-md-up {
          height: var(--tablet-top-bar-height);
        }

        height: 80px;
        object-position: left;
      }
    }
  }
}

stapps-offline-notice.has-error ~ ion-split-pane,
stapps-offline-notice.is-offline ~ ion-split-pane {
  margin-top: calc(var(--font-size-md) + 2 * var(--spacing-sm));
}

ion-router-outlet {
  background: var(--ion-background-color);
}

.menu-category {
  ion-label {
    font-size: 115%;
    font-weight: bold;
  }
}

.link-active > * {
  --fill: 1;

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