.saas-device-profile {
  height: 100%;
  min-height: 0;

  &__page-heading {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    line-height: normal;

    .saas-device-profile__page-title {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0;
      line-height: normal !important;

      > span:first-child {
        line-height: 28px;
      }
    }
  }

  &__page-subtitle {
    color: var(--Colors-Neutral-Text-colorTextSecondary, rgba(0, 0, 0, 0.65));
    font-size: var(--Typography-Font-Size-fontSize, 14px);
    font-weight: var(--Typography-Font-Weight-fontWeightNormal, 400);
    line-height: var(--Typography-Line-Height-lineHeight, 22px) !important;
  }

  &__back-button {
    width: 32px;
    height: 32px;
    padding: 0;
  }

  &__menu-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d5db;
    margin-right: 6px;
  }

  .saas-device-profile-template-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
  }

  &--phone {
    height: 100dvh;
    overflow: hidden;

    .saas-device-profile__page-heading {
      gap: 8px;
    }

    .saas-device-profile__page-title {
      min-width: 0;

      > span:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }

    .saas-device-profile__page-subtitle {
      display: -webkit-box;
      overflow: hidden;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }

    .saas-device-profile-template-modal {
      position: fixed;
      background: #f5f6f8;
    }

    .materials-grid-actions {
      flex-direction: column;
      gap: 12px;
      margin-bottom: 12px;

      .left-wrap,
      .right-wrap {
        width: 100%;
      }

      .left-wrap {
        overflow-x: auto;
      }

      .right-wrap {
        justify-content: flex-start;
      }
    }

    .materials-grid,
    .materials-grid-form-wrap {
      min-height: 0;
    }

    .materials-grid-table-wrap {
      overflow: visible;
      padding-bottom: 0;
    }

    .ant-table-wrapper,
    .pisell-lowcode-table-wrapper {
      overflow: hidden;
    }

    .ant-pagination-options,
    .pisell-lowcode-pagination-options {
      display: none;
    }
  }
}

.create-profile-modal--phone,
.delete-profile-modal--phone {
  max-width: calc(100vw - 24px);

  .ant-modal-body,
  .pisell-lowcode-modal-body {
    max-height: calc(100dvh - 172px);
    overflow: auto;
  }

  .ant-modal-footer,
  .pisell-lowcode-modal-footer {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
}
