.saas-device-profile-setting {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f5f6f8;

  &__btn-link {
    padding: 0;
  }

  &__drawer-footer {
    display: flex;
    justify-content: flex-end;
  }

  &__header {
    padding: 16px 24px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
  }

  &__header-left {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  &__title {
    font-size: 18px;
    font-weight: 600;
  }

  &__subtitle {
    color: #8c8c8c;
    font-size: 12px;
    margin-top: 4px;
  }

  &__alert-wrap {
    padding: 12px 16px 0;
  }

  &__main {
    flex: 1;
    display: flex;
    gap: 16px;
    padding: 16px;
    overflow: hidden;
  }

  &__menu-card {
    width: 240px;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    overflow: auto;

    .ant-menu {
      border-inline-end: none;
      background: transparent;
    }
  }

  &__content-card {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    overflow: auto;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  }

  &__loading-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
  }

  &__section {
    margin-bottom: 16px;
  }

  &__section-title {
    font-size: 16px;
    font-weight: 600;
  }

  &__save-actions {
    display: flex;
    justify-content: center;
    margin-top: 24px;
  }
}

.saas-device-profile--phone {
  .saas-device-profile-setting {
    height: 100dvh;
  }

  .saas-device-profile-setting__header {
    padding: 12px 16px;
  }

  .saas-device-profile-setting__header-left {
    align-items: flex-start;
  }

  .saas-device-profile-setting__title {
    font-size: 16px;
    line-height: 24px;
  }

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

  .saas-device-profile-setting__main {
    flex-direction: column;
    gap: 12px;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  }

  .saas-device-profile-setting__menu-card {
    flex: 0 0 auto;
    width: 100%;
    max-height: 160px;
    padding: 8px;
  }

  .saas-device-profile-setting__content-card {
    flex: 1;
    min-height: 0;
  }

  .saas-device-profile-setting__save-actions {
    position: sticky;
    bottom: 0;
    margin-top: 16px;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    background: #fff;

    button {
      width: 100%;
      min-height: 40px;
    }
  }
}
