@import '../variables';
@import '../mixins';
@import 'components/buttons';
@import 'components/forms';
@import 'config/import';

#onboarding-container {
  min-height: calc(100vh - 350px);
}

.pages-onboarding {
  min-height: initial;
}

// modal box card
.onboarding-main {
  border: none;

  @media screen and (min-width: 600px) {
    border-width: 2px;
  }

  a {
    color: var(--link-branded-color);
  }
}

// modal inner content spacing
.onboarding-content {
  box-sizing: border-box;
  padding: var(--su-4);
  width: 100%;
  min-height: 100%;
  overflow: auto;

  &__tags {
    min-height: auto;
    margin-bottom: 100px;
  }

  &__subforems {
    min-height: auto;
    margin-bottom: 0px;
  }

  @media screen and (min-width: $breakpoint-s) {
    justify-content: center;
    padding: var(--su-8);
  }
}

// terms and conditions view
.terms-and-conditions-wrapper {
  $content-height: 90%;
  height: auto;

  button {
    @extend .crayons-btn;
  }
  .terms-and-conditions-content {
    height: $content-height;
    overflow-y: scroll;
    margin-top: 10px;
  }
}

// window background
.onboarding-body {
  -moz-background-size: cover;
  -o-background-size: cover;
  -webkit-background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  height: 100vh;
  justify-content: start;
  line-height: 200%;
  margin: 0;
  overflow-y: scroll;
  position: fixed;
  top: 0;
  width: 100%;

  @media screen and (min-width: 600px) {
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  &:before {
    display: block;
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.65);
    height: 100%;
    width: 100%;
  }
}

.onboarding-content-separator {
  position: absolute;
  bottom: 160px;
  left: var(--su-4);
  width: calc(100% - 2 * var(--su-4));
  height: 96px;
  background-image: linear-gradient(
    rgba(var(--tag-onboarding-bg), 0) 25%,
    rgba(var(--tag-onboarding-bg), 1) 75%
  );
  pointer-events: none;

  @media screen and (min-width: $breakpoint-s) {
    left: var(--su-8);
    width: calc(100% - 2 * var(--su-8));
    bottom: 168px;
  }
}

.onboarding-email-digest {
  position: absolute;
  bottom: 112px;
  left: var(--su-4);
  width: calc(100% - 2 * var(--su-4));
  z-index: 1;
  align-items: center;
  border-radius: 0px 6px 6px 0px;
  border: 1px solid rgba(var(--tag-onboarding-border), 1);
  background-color: var(--card-secondary-bg);

  @media screen and (min-width: $breakpoint-s) {
    left: var(--su-8);
    width: calc(100% - 2 * var(--su-8));
  }

  &__rectangle {
    position: absolute;
    width: 4px;
    top: 0;
    bottom: 0;
    background: rgba(var(--accent-brand-rgb), 1);
  }
}

// modal navigation
.onboarding-navigation {
  align-self: flex-end;
  flex-shrink: 0;
  width: 100%;
  border-top: 1px solid var(--divider);

  .navigation-content {
    display: flex;
    justify-content: space-between;
    padding: var(--su-4);

    button {
      @extend .crayons-btn;
    }

    .back-button-container,
    .next-button {
      // Explicitly set width to avoid next-button re-sizing with text,
      // and to ensure that back-button-container takes up the same amount of space.
      width: var(--su-10);
    }

    .back-button {
      @extend .crayons-btn;
      @extend .crayons-btn--ghost;
      @extend .crayons-btn--icon;

      $button-size: 40px; // Explicitly set size for accessibility.

      border-radius: 100%;
      min-width: $button-size;
      height: $button-size;
      align-items: center;
      display: flex;

      &:hover,
      &:active {
        background: var(--base-10);
      }
    }

    .hide-button {
      visibility: hidden;
    }

    .skip-for-now {
      @extend .crayons-btn;
      @extend .crayons-btn--secondary;
    }

    .stepper {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .dot {
      $dot-size: 10px;

      background-color: var(--base-30);
      border-radius: 50%;
      width: $dot-size;
      height: $dot-size;
      margin: var(--su-1);
    }

    .active {
      background-color: var(--accent-brand);
    }
  }
}

// modal header
.onboarding-content-header {
  margin-bottom: var(--su-4);

  @media screen and (min-width: $breakpoint-s) {
    margin-bottom: var(--su-6);
  }

  .title,
  .subtitle {
    margin: 0;
  }

  .title {
    font-weight: var(--fw-heavy);
    margin-bottom: var(--su-1);
    text-align: left;
  }

  .subtitle {
    color: var(--card-color-secondary);
    font-size: var(--fs-xl);
    font-weight: var(--fw-medium);
    letter-spacing: normal;
    line-height: var(--lh-base);
  }
}

// override crayons notice
.onboarding-body {
  .crayons-notice {
    display: block;
    margin-bottom: var(--su-2);
  }
}
// modal overflow scrolling
.onboarding-modal-scroll-container {
  height: calc(100vh - 289px);
  overflow-y: scroll;
  border-bottom: 1px solid var(--base-20);

  @media screen and (min-height: 800px) {
    max-height: 520px;
  }
}

// tag styles
.onboarding-tags {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: var(--su-2);
  width: 100%;
  padding-bottom: 48px;

  @media screen and (min-width: $breakpoint-s) {
    padding-bottom: 24px;
  }

  @media screen and (min-width: 800px) {
    grid-template-columns: repeat(3, 1fr);
  }

  &__item {
    border: 1px solid rgba(var(--tag-onboarding-border), 1);
    background: var(--tag-onboarding-bg);
    border-radius: var(--radius);
    padding: var(--su-3) var(--su-4);
    position: relative;
    overflow: hidden;
    height: 73px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    $item: &;

    input[type='checkbox'] {
      border-radius: 50%;
      background-color: var(--checkbox-default-bg);
      background-image: none;
    }

    &:hover {
      background: var(--white);
      border: 1px solid rgba(var(--accent-brand-rgb), 1);
      box-shadow: var(--shadow-smooth);

      input[type='checkbox'] {
        border: 1px solid rgba(var(--accent-brand-rgb), 1);
      }
    }

    &__inner {
      width: 100%;
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      align-items: center;

      &__content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 0px;
        gap: 4px;
      }

      &__content-name {
        font-weight: var(--fw-medium);
        font-size: var(--fs-base);
        line-height: var(--lh-base);
        letter-spacing: -0.02em;
        color: var(--color-primary);
      }

      &__content-count {
        font-weight: var(--fw-normal);
        font-size: var(--fs-s);
        line-height: var(--lh-base);
        letter-spacing: -0.02em;
        color: var(--tag-prefix);
      }
    }

    &--selected {
      background: rgba(var(--accent-brand-rgb), 0.1);
      border: 1px solid rgba(var(--accent-brand-rgb), 1);
      box-shadow: var(--shadow-smooth);

      &:hover {
        background: rgba(var(--accent-brand-rgb), 0.1);
        border: 1px solid rgba(var(--accent-brand-rgb), 1);
        box-shadow: var(--shadow-smooth);
      }

      input[type='checkbox'] {
        border: 1px solid rgba(var(--accent-brand-rgb), 1);
        background-color: rgba(var(--accent-brand-rgb), 1);
        background-image: url("data:image/svg+xml,%3Csvg width='12' height='10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.157.933a.75.75 0 01.077 1.058L4.817 9.407a.75.75 0 01-1.134 0L.766 6.037a.75.75 0 011.135-.982L4.25 7.77l5.85-6.76a.75.75 0 011.057-.077z' fill='%23fff'/%3E%3C/svg%3E");
      }
    }

    &--original {
      border: 2px solid rgba(var(--accent-brand-rgb), 1);
      background: rgba(var(--accent-brand-rgb), 0.05);
      position: relative;

      &:hover {
        background: rgba(var(--accent-brand-rgb), 0.1);
        border: 2px solid rgba(var(--accent-brand-rgb), 1);
      }

      .onboarding-tags__item__inner__content-badge {
        background: rgba(var(--accent-brand-rgb), 1);
        color: white;
        font-size: var(--fs-xs);
        font-weight: var(--fw-medium);
        padding: 2px 6px;
        border-radius: var(--radius);
        margin-bottom: 4px;
        display: inline-block;
      }
    }
  }
}

// Onboarding Intro
.onboarding-main.introduction {
  .onboarding-content {
    background: var(--base-100);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: start;
    padding: var(--su-8);
    height: auto;

    @media screen and (min-width: $breakpoint-s) {
      justify-content: center;
    }
  }

  figure {
    margin: 0 0 var(--su-2) 0;

    .sticker-logo {
      height: var(--su-8);
      width: var(--su-8);
      box-sizing: content-box;
      transform: rotate(-30deg);
      padding: var(--su-3);
      vertical-align: middle;
    }
  }

  .introduction-title,
  .introduction-subtitle {
    margin: 0;
  }

  .introduction-title {
    color: var(--base-inverted);
    font-size: var(--fs-2xl);
    font-weight: var(--fw-heavy);
    line-height: var(--lh-tight);
    margin-bottom: var(--su-1);

    @media (min-width: $breakpoint-s) {
      font-size: var(--fs-4xl);
    }
  }

  .introduction-subtitle {
    color: var(--base-inverted);
    font-size: var(--fs-l);
    font-weight: var(--fw-normal);
    line-height: var(--lh-base);

    @media (min-width: $breakpoint-s) {
      font-size: var(--fs-xl);
    }
  }

  .navigation-content {
    padding: var(--su-7);
    justify-content: center;

    button {
      @extend .crayons-btn;
    }
  }
}

// follow users slide
$onboarding-user-unselected-hover: rgba(71, 85, 235, 0.05);
$onboarding-user-selected: rgba(71, 85, 235, 0.1);
$onboarding-user-selected-hover: rgba(71, 85, 235, 0.2);

.onboarding-body {
  .content-row {
    background-color: var(--base-inverted); // Specify background for Safari.
    align-items: center;
    border: none;
    box-sizing: border-box;
    color: var(--body-color);
    display: flex;
    padding: var(--su-2) var(--su-4);
    text-align: left;
    width: 100%;

    &.unselected {
      &:hover {
        background-color: $onboarding-user-unselected-hover;
        cursor: pointer;
      }

      button {
        @extend .crayons-btn;
        @extend .crayons-btn--outlined;
      }
    }

    &.selected {
      background-color: $onboarding-user-selected;

      &:hover {
        background-color: $onboarding-user-selected-hover;
        cursor: pointer;
      }

      button {
        @extend .crayons-btn;
      }
    }
  }

  .user-avatar-container {
    align-self: baseline;
    margin: 0 var(--su-4) 0 0;

    @media screen and (min-width: $breakpoint-s) {
      align-self: center;
    }
  }

  .user-avatar {
    border-radius: 100%;
    height: var(--su-8);
    width: var(--su-8);
    object-fit: cover;
    border: 1px solid var(--base-10);
  }

  .current-user-info {
    text-align: center;
    margin-bottom: 1rem;

    .current-user-avatar-container {
      width: 80px;
      height: 80px;
    }

    .current-user-avatar {
      border-radius: 100%;
      width: inherit;
      height: inherit;
      object-fit: cover;
      border: 2px solid var(--base-90);
    }

    h3 {
      margin-top: var(--su-2);
      line-height: var(--lh-tight);
    }

    p {
      font-size: var(--fs-base);
      line-height: var(--lh-tight);
      color: var(--base-70);
    }
  }

  .user-name,
  .user-summary {
    color: var(--base);
    margin: 0;
    line-height: var(--lh-tight);

    // overflow-wrap: anywhere isn't supported in Safari, in which case this fallback applies
    overflow-wrap: break-word;
    overflow-wrap: anywhere;
  }

  .user-name {
    font-size: var(--fs-base);
  }

  .user-info {
    width: 100%;
  }

  .user-summary {
    font-size: var(--fs-s);
  }

  .user-following-status {
    margin-left: var(--su-7);
  }
}

// closing slide
.onboarding-what-next {
  display: flex;
  flex-direction: column;
  overflow: auto;
  min-height: 250px;

  @media screen and (min-width: $breakpoint-s) {
    flex-direction: column;
  }

  p {
    align-items: center;
    display: inline-flex;
  }

  a {
    background: #d9e7ff;
    margin: 4px auto;
    border-radius: 3px;
    display: block;
    font-weight: 800;
    width: 100%;
    padding: 0.25em;
    position: relative;
    text-align: center;
    box-sizing: border-box;

    .whatnext-emoji {
      text-align: center;
      font-size: 32px;
      margin-right: 8px;
    }
  }
}

.onboarding-previous-location {
  text-align: center;
  margin-top: 10px;
  font-weight: bold;
  display: none;

  @media screen and (min-width: 600px) {
    display: block;
  }

  code {
    font-size: 0.6em;
    margin-top: -10px;
    display: block;
    font-weight: 400;
  }
}

// Follow user
.onboarding-body {
  .content-row {
    align-items: center;
    color: #202428;
    display: flex;
    padding: 8px 16px;
    text-align: left;
    width: 100%;

    &:hover,
    &:focus-within {
      background-color: var(--content-row-hover-bg) !important;
    }
  }

  .user-avatar-container {
    margin: 0 16px 0 0;
  }

  .user-avatar {
    border-radius: 100%;
    height: 48px;
    width: 48px;
    object-fit: cover;
    border: 1px solid #eef0f1;
  }

  .user-name,
  .user-summary {
    margin: 0;
  }
}

// Forms
.onboarding-main {
  fieldset {
    padding: 0;
    border: none;
    margin-bottom: var(--su-6);

    &:last-child {
      margin-bottom: 0;
    }

    ul {
      list-style-type: none;
      margin: 0;
      padding-left: 0;
    }
  }

  legend {
    color: var(--body-color);
    font-weight: var(--fw-medium);
  }

  input[type='text'],
  textarea {
    @extend .crayons-textfield;
    box-sizing: border-box;
  }

  textarea {
    min-height: 77px;
  }

  label {
    @extend .crayons-field;

    a {
      margin-top: 0;
    }

    &:last-child {
      margin-bottom: 0;
    }
  }

  .checkbox-form-wrapper {
    padding: var(--su-7);

    .checkbox-form {
      padding-bottom: var(--su-6);
    }
  }

  .crayons-field--checkbox {
    align-items: center;
  }

  // Checkboxes
  .checkbox-item {
    label {
      @extend .crayons-field__label;
      align-items: baseline;
      border-radius: var(--radius);
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      align-items: center;
      padding: 0 var(--su-1);
      width: 100%;

      &:hover {
        background: var(--body-bg);
        cursor: pointer;
      }

      &:last-child {
        margin-bottom: 0;
      }

      input[type='checkbox'] {
        @extend .crayons-checkbox;
        margin-right: var(--su-2) !important;
      }
    }
  }

  .onboarding-profile-sub-section {
    margin-bottom: var(--su-2);
  }

  @media screen and (max-height: 790px) {
    .onboarding-form-input--last {
      margin-bottom: 25px;
    }
  }
}

.onboarding-profile-details-container {
  display: flex;
  align-items: center;
  padding: 0px;
  gap: 24px;
}

.onboarding-profile-image {
  width: 80px;
  height: 80px;
  aspect-ratio: 1/1;
  border-radius: 40px;
  border: 1.5px solid #d4d4d4;
}

.onboarding-profile-details-sub-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0px;
  gap: 10px;
}

.onboarding-profile-user-name {
  font-weight: var(--fw-bol);
  font-size: var(--fs-xl);
  line-height: var(--lh-base);
}

.onboarding-profile-upload-error {
  color: darken($red, 8%);
  font-size: 0.8em;
}

// Adjusting modals... This is naughty... Santa won't come.
.onboarding-main {
  --onboarding-modal-height: 800px;

  &.introduction {
    --onboarding-modal-height: unset;
  }

  .crayons-modal__box {
    @media (min-width: $breakpoint-s) {
      height: var(--onboarding-modal-height);
    }
  }
}

.onboarding-actions-list {
  margin-top: var(--su-6);

  &__item {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding: var(--su-3);
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    background-color: var(--card-bg-color);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    user-select: none;

    &:not(:last-child) {
      margin-bottom: var(--su-3);
    }

    &:hover {
      border-color: rgba(var(--accent-brand-rgb), 1);
      box-shadow: var(--shadow-smooth);
    }

    &.--selected {
      background: rgba(var(--accent-brand-rgb), 0.1);
      border: 1px solid rgba(var(--accent-brand-rgb), 1);

      &:hover {
        background: rgba(var(--accent-brand-rgb), 0.15);
      }

      .onboarding-actions-list__label-text::before {
        background-color: rgba(var(--accent-brand-rgb), 1);
        border-color: rgba(var(--accent-brand-rgb), 1);
        background-image: url("data:image/svg+xml,%3Csvg width='12' height='10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.157.933a.75.75 0 01.077 1.058L4.817 9.407a.75.75 0 01-1.134 0L.766 6.037a.75.75 0 011.135-.982L4.25 7.77l5.85-6.76a.75.75 0 011.057-.077z' fill='%23fff'/%3E%3C/svg%3E");
        background-position: center;
        background-repeat: no-repeat;
      }
    }
  }

  &__checkbox {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
  }

  &__label-text {
    padding-left: var(--su-8);
    position: relative;
    font-size: var(--fs-base);
    color: var(--body-color);
    font-weight: var(--fw-medium);
    line-height: 1.6em;

    &::before {
      content: '';
      position: absolute;
      left: var(--su-2);
      top: 0.91em;
      transform: translateY(-50%);
      height: 26px;
      width: 26px;
      border: 1px solid var(--divider);
      border-radius: 4px;
      background-color: var(--checkbox-default-bg);
      transition: all 0.2s ease;
    }
  }
}

// Subforem selection styles
.subforems-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--su-3);
  margin-bottom: var(--su-6);

  @media screen and (min-width: $breakpoint-s) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media screen and (min-width: $breakpoint-m) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.subforem-card {
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background-color: var(--card-bg-color);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  user-select: none;
  overflow: hidden;

  &:hover {
    border-color: rgba(var(--accent-brand-rgb), 0.5);
    box-shadow: var(--shadow-smooth);
  }

  &.selected {
    background: rgba(var(--accent-brand-rgb), 0.1);
    border: 1px solid rgba(var(--accent-brand-rgb), 1);
    box-shadow: var(--shadow-smooth);

    &:hover {
      background: rgba(var(--accent-brand-rgb), 0.15);
    }
  }

  &.original {
    border: 2px solid rgba(var(--accent-brand-rgb), 0.8);
    position: relative;

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: linear-gradient(90deg, rgba(var(--accent-brand-rgb), 1), rgba(var(--accent-brand-rgb), 0.6));
    }
  }

  &__header {
    display: flex;
    align-items: center;
    padding: var(--su-3);
    border-bottom: 1px solid var(--divider);
    position: relative;
  }

  &__logo {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    margin-right: var(--su-2);
    object-fit: cover;
    flex-shrink: 0;
  }

  &__info {
    flex: 1;
    min-width: 0;
  }

  &__name {
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    color: var(--body-color);
    margin: 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__badge {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    color: rgba(var(--accent-brand-rgb), 1);
    background: rgba(var(--accent-brand-rgb), 0.1);
    padding: 2px var(--su-1);
    border-radius: var(--radius);
    margin-top: var(--su-1);
  }

  &__checkbox {
    flex-shrink: 0;
    margin-left: var(--su-2);

    input[type="checkbox"] {
      width: 20px;
      height: 20px;
      accent-color: rgba(var(--accent-brand-rgb), 1);
    }
  }

  &__body {
    padding: var(--su-3);
  }

  &__description {
    font-size: var(--fs-s);
    color: var(--body-color);
    margin: 0 0 var(--su-2) 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  &__stats {
    display: flex;
    gap: var(--su-3);
    font-size: var(--fs-xs);
    color: var(--body-color);

    span {
      display: flex;
      align-items: center;
      gap: var(--su-1);
    }
  }
}

// Subforems grid layout
.onboarding-subforems-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--su-3);
  margin-bottom: var(--su-4);

  @media screen and (min-width: $breakpoint-l) {
    grid-template-columns: repeat(2, 1fr);
  }
}

.onboarding-subforems__item {
  background: var(--card-bg);
  border: 2px solid var(--divider);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;

  &:hover {
    border-color: var(--accent-brand);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  &--selected {
    border-color: var(--accent-brand);
    background: rgba(var(--accent-brand-rgb), 0.05);

    .onboarding-subforems__item__logo-placeholder {
      background: var(--accent-brand);
      color: white;
    }
  }

  &--original {
    border-color: rgba(var(--accent-brand-rgb), 0.8);
    position: relative;

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: linear-gradient(90deg, rgba(var(--accent-brand-rgb), 1), rgba(var(--accent-brand-rgb), 0.6));
    }
  }

  &--placeholder {
    cursor: default;
    opacity: 0.6;

    &:hover {
      transform: none;
      box-shadow: none;
    }
  }

  &__inner {
    display: flex;
    align-items: flex-start;
    padding: var(--su-4);
    gap: var(--su-3);
    position: relative;
  }

  &__logo {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--divider);
  }

  &__logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  &__logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--divider);
    color: var(--body-color);
    font-weight: var(--fw-bold);
    font-size: var(--fs-l);
  }

  &__logo-placeholder--loading {
    background: var(--divider);
    position: relative;
    overflow: hidden;

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
      animation: shimmer 1.5s infinite;
    }
  }

  &__content {
    flex: 1;
    min-width: 0;
  }

  &__name {
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    color: var(--body-color);
    margin: 0 0 var(--su-1) 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: var(--su-2);
    flex-wrap: wrap;
  }

  &__name--loading {
    height: 20px;
    background: var(--divider);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
      animation: shimmer 1.5s infinite;
    }
  }

  &__description {
    font-size: var(--fs-s);
    color: var(--body-color);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  &__description--loading {
    height: 16px;
    background: var(--divider);
    border-radius: var(--radius);
    margin-top: var(--su-1);
    position: relative;
    overflow: hidden;

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
      animation: shimmer 1.5s infinite;
    }
  }

  &__badge {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    color: rgba(var(--accent-brand-rgb), 1);
    background: rgba(var(--accent-brand-rgb), 0.1);
    padding: 2px var(--su-1);
    border-radius: var(--radius);
    white-space: nowrap;
  }

  .crayons-checkbox {
    position: absolute;
    top: var(--su-3);
    right: var(--su-3);
    margin: 0;
  }
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}