.input-wrapper {
  --_input-wrapper-padding: 1rem;

  label {
    display: none;
  }

  &.password-wrapper .toggle-password {
    top: var(--_input-wrapper-padding);
  }

  &:not(.input-file-wrapper) > label {
    display: none !important;
  }

  > input,
  .select-box .selected > input,
  select,
  textarea,
  .dropdown-toggle {
    border: 1px solid #e4e4ff;
    background-color: #fcfcff;

    &::placeholder {
      color: #3a394b;
    }
  }

  .bootstrap-select > select.mobile-device:focus + .dropdown-toggle,
  .bootstrap-select .dropdown-toggle:focus {
    outline: 1px solid var(--secondary-clr-900) !important;
  }

  .filter-option-inner-inner {
    color: #3a394b;
  }

  .upload-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    background-color: var(--white-clr-900);
    border-radius: 0.5rem;
  }

  .dropdown-toggle {
    text-align: left;
    color: #3a394b;
  }
}

.input-file-wrapper {
  display: grid;
  grid-template-columns: [label-start input-start] auto [label-end] 1fr [icon-start] auto [icon-end input-end];
  grid-template-rows: [label-start input-start icon-start] 1fr [label-end input-end icon-end];
  border: 1px solid #e4e4ff;
  border-radius: 0.75rem;
  background-color: #fcfcff;

  [type="file"] {
    grid-column: input;
    grid-row: input;
    opacity: 0;
  }

  .label {
    padding-bottom: 0px;
    align-self: center;
    padding-left: var(--_input-wrapper-padding);
    grid-row: label;
    grid-area: label;
    color: #3a394b;

    /* truncate text */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .upload-icon {
    margin: 0.375rem;
    grid-row: icon;
    grid-area: icon;
  }
}

.card-list {
  .card {
    display: flex;
    flex-direction: column;
    background-color: var(--white-clr);
    padding: 1.25rem;
    border-radius: 2rem;
    border: 1px solid var(--white-clr);
  }

  .card-profile img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-inline: auto;
  }

  .card-post,
  .card-name {
    text-align: center;
  }

  .card-name {
    display: block;
    font-weight: var(--fw-700);
    font-size: var(--fs-450);
    color: var(--tertiary-clr-900);
  }

  .card-post {
    display: block;
    font-weight: var(--fw-500);
    font-size: var(--fs-400);
    padding-bottom: 1.25rem;
  }

  .icon-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;

    &.border {
      padding-bottom: 1rem;
      margin-bottom: 1rem;
      border-bottom: 1px solid #e8e8f7;
    }
  }

  .icon-key {
    flex-shrink: 0;
    display: flex;
    gap: 0.375rem;
    align-items: center;
    justify-content: center;

    .icon {
      flex-shrink: 0;
    }
  }

  .title {
    color: #a9a9b8;
    font-weight: var(--fw-500);
    font-size: var(--fs-300);
  }

  .icon-value {
    --_line-clamp: 1;

    color: #090820;
    font-weight: var(--fw-500);
    font-size: var(--fs-300);
  }

  .btns {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: var(--fs-300);
    /* Add this to create a stable hover area */
    padding: 0.5rem;
    margin: -0.5rem; /* compensate for padding */
  }

  .btns .btn-pill {
    transition: flex 500ms ease, width 500ms ease, padding 300ms ease;
    height: 2.875rem;
    font-weight: var(--fw-700);
    --_btn-fs: 0.75rem;
    /* Add a small invisible border to prevent layout shifts */
    box-shadow: 0 0 0 1px transparent;
  }

  .btns {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: var(--fs-300);

    .btn-pill {
      --_btn-fs: 0.75rem;
      will-change: flex, width, padding;
      height: 2.875rem;
      /* contain: size; */
      contain: content;
      font-weight: var(--fw-700);
      transition: flex 500ms ease, width 500ms ease;
    }

    /* > .btn-pill:not(:nth-child(2)) { */
    /* TODO: ititally make second button expand without flicker */
    /* > .btn-pill {
      padding: 1rem;
      flex: 0 0 2.875rem;
      border-radius: 50%;
      min-width: 0;
      width: 2.875rem;
      .btn-text {
        display: none;
        pointer-events: none;
        transition: width 300ms ease;
        }
        } */

    > .btn-pill {
      padding: 0;
      flex: 0 0 2.875rem;
      border-radius: 50%;
      min-width: 0;
      aspect-ratio: 1;

      .btn-text {
        pointer-events: none;
        display: none;
      }
    }

    > .btn-pill:is(:hover, :focus-visible) {
      flex-grow: 1;
      aspect-ratio: revert;
      border-radius: 100vw;
      padding: 0;
      padding: 1rem;

      .btn-text {
        display: block;
      }
    }

    &:has(.btn-pill:hover) .btn-pill:not(:hover),
    &:has(.btn-pill:focus-visible) .btn-pill:not(:focus-visible) {
      padding: 0;
      flex: 0 0 2.875rem;
      border-radius: 50%;
      min-width: 0;
      aspect-ratio: 1;

      .btn-text {
        pointer-events: none;
        display: none;
      }
    }
  }

  .btn-round {
    height: 2.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: 50%;
    background: #ffffff;
    color: var(--text-clr-700);
    border: 1px solid #eaeaf0;
    aspect-ratio: 1;

    .btn-icon {
      flex-shrink: 0;
      width: 1.5rem;
      height: 1.5rem;
    }

    svg {
      width: 100%;
      height: 100%;
    }

    .btn-text {
      display: none;
    }

    &:hover {
      background-color: var(--tertiary-clr-900);
      color: var(--white-clr);
      border-color: var(--tertiary-clr);
    }
  }

  .card-body {
    margin-top: 1.25rem;
    padding: 1.125rem 1rem;
    font-weight: var(--fw-500);
    font-style: Medium;
    font-size: var(--fs-300);
    color: #090820;
    background-color: #ededf6;
    border-radius: 0.5rem;
  }

  .card-tags {
    max-height: 74px;
    overflow-y: clip;
    margin-block: 1.125rem;
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    gap: 0.375rem;
  }

  .card-tag {
    padding: 0.375rem 0.5rem;
    font-weight: var(--fw-500);
    background-color: #f8f8f9;
    border: 1px solid #c8cad9;
    font-size: var(--fs-200);
    border-radius: 100vw;
  }
}
