/*!
 * 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/>.
 */
@use 'sass:math';

$width: 108px;

ion-item {
  --border-radius: var(--border-radius-default);
  --inner-padding-start: unset;
  --inner-padding-end: unset;
  --padding-start: unset;
  --padding-end: unset;

  height: 96px;

  &::part(native) {
    width: 100%;
    height: 100%;
  }

  > div {
    width: 100%;
    height: 100%;
  }

  div,
  ion-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 0 var(--spacing-xs) 0 var(--spacing-xs);

    font-size: var(--font-size-sm);
    text-align: center;
    white-space: normal;
  }
}

simple-swiper {
  --swiper-slide-width: #{$width};

  container-type: inline-size;

  ion-item {
    @each $i in 7, 6, 5, 4, 3, 2, 1 {
      $max: #{($width + 8px) * $i};
      @container (inline-size < #{$max}) {
        --swiper-slide-width: #{math.div(100cqi, $i)};
      }
    }
  }
}

.log-in-hint {
  height: 100%;
  padding: var(--spacing-xl);
  background: var(--ion-color-light-tint);
  box-shadow: none;
}
