@import '../helpers/helpers';
@import '../components/notifications';
@import '../components/leave-modal';

.personal-details {
  padding-top: 0;
  padding-bottom: 40px;

  .notification {
    &_link {
      color: $white;
      text-decoration: none;
      padding: 0 5px;

      &:hover {
        text-decoration: none;
        color: $white;
      }
    }
  }

  .globalMessages {
    @include make-container;
    @include make-container-max-widths;
    @include make-col(12);

    .notification {
      margin-bottom: 8px;
      margin-top: 16px;
    }
  }

  &__header {
    margin-top: 16px;
  }

  &__title {
    text-align: left;
    margin-bottom: 0;
    font-size: 1.625rem;
    font-weight: 500;
    line-height: 2.25rem;
  }

  .btn__change-password {
    margin-top: 24px;
  }

  .btn__edit,
  .btn__change-password {
    display: flex;
    align-items: center;
    justify-content: center;

    .icon {
      font-size: 1rem;
      margin-right: 12px;
    }
  }

  .user-form,
  .user-information {
    margin-top: 24px;

    .form-row {
      padding: 0;
    }
  }

  .user-information {
    &__list {
      padding-left: 0;
      margin-bottom: 0;
      list-style-type: none;
    }

    &__label {
      font-size: 1rem;
      font-weight: 500;
      line-height: 24px;
      margin-bottom: 8px;
    }

    &__value {
      margin-bottom: 0;
      padding-top: 8px;
      padding-bottom: 8px;
      font-size: .875rem;
      font-weight: 400;
      line-height: 1.375rem;
    }

    &__item {
      margin-bottom: 24px;
    }
  }

  .user-form {
    &__required-field {
      padding: 0;
      font-size: .75rem;
      font-weight: 500;
      line-height: 1rem;
      margin-bottom: 24px;
    }

    &__ctas {
      display: flex;
      grid-gap: 16px;
    }

    .form-row {
      &__label:not(.user-form__required-field) {
        margin-bottom: 8px;
      }

      &.row-title {
        max-width: 145px;
      }

      &__label_required::before {
        margin-right: 4px;
      }

      & + .form-row {
        margin-bottom: 24px;
      }

      &__field {
        .tbx.disabled {
          background: $gray-bg;
          color: $warm-grey;
          -webkit-text-fill-color: $warm-grey;
          pointer-events: none;
        }
      }
    }

    input[name='CSRFToken'] {
      display: none;
    }
  }
}

@include media-breakpoint-up(sm) {
  .personal-details {
    &__header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .btn__change-password {
      margin-top: 0;
      max-width: 178px;
    }

    .btn__edit {
      max-width: 195px;
    }

    .user-form {
      max-width: 390px;

      &__ctas {
        .btn_full {
          width: auto;
        }
      }
    }
  }
}

@include media-breakpoint-up(md) {
  .personal-details {
    &__title {
      font-size: 2.125rem;
      line-height: 2.875rem;
    }

    .globalMessages {
      .notification {
        margin-bottom: 24px;
      }
    }

    .notification_reminder {
      margin-bottom: 16px;
    }
  }
}

@include media-breakpoint-up(lg) {
  .personal-details {
    padding-top: 40px;
    padding-bottom: 70px;

    &__header {
      margin-top: 0;
    }

    .globalMessages {
      .notification {
        margin-top: 0;
      }
    }
  }
}
