/*!
 * 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 'src/theme/util/_mixins.scss';

:host {
  display: block;
}

ion-item::part(native) {
  height: 100%;
}

.ion-text-wrap ::ng-deep ion-label {
  white-space: normal !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

ion-item {
  --border-color: transparent;
  @include border-radius-in-parallax(var(--border-radius-default));
  overflow: hidden;
  --inner-padding-end: 0;
  --padding-start: var(--spacing-sm);
  margin: var(--spacing-sm);

  ion-thumbnail {
    --ion-margin: var(--spacing-xs);
  }

  ion-label {
    width: 100%;

    div {
      display: flex;
      flex-direction: column;
    }
  }
}

:host.square ::ng-deep {
  ion-item {
    margin: 0;
  }

  ion-row {
    flex-direction: column;
    justify-content: space-between;
    height: 120px;
  }

  ion-col {
    flex-grow: 0;
    flex-basis: min-content;
  }

  .title {
    display: -webkit-box;
    white-space: break-spaces;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .title-sub {
    display: none;
  }

  // fix for Safari
  stapps-offers-in-list {
    position: absolute;
    bottom: 0;
    right: 0;
  }

  stapps-offers-in-list .place {
    display: none;
  }
}
