$border-radius: 4px;
$box-shadow: 0 3px 4px rgba(0,0,0,.1);
$semi-bold: bold;
$border-color: rgba(0,0,0,.15);
$primary-color: #26abe2;
$primary-color-translucent: rgba(38, 171, 226, 0.2);
$button-height: 44px;
$disabled-color: rgba(0,0,0,.3);
$disabled-background-color: #eee;

%primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: $primary-color;
  background: $primary-color-translucent;
  border-radius: $border-radius;
  min-height: $button-height;
  height: $button-height;
  font-weight: $semi-bold;
  padding: 0 16px;
  white-space: nowrap;
  font-size: 1rem;

  &[disabled] {
    background: $disabled-background-color;
    color: $disabled-color;
  }
}

.page-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  .page-modal-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background: rgba(0, 0, 0, .5);
  }

  .page-modal-card {
    background: #fff;
    position: relative;
    border-radius: $border-radius;
    box-shadow: $box-shadow;
    z-index: 10;
    width: 70vw;
    min-width: 0px;
    max-width: 600px;

    .page-modal-header {
      display: flex;
      align-items: center;
      position: relative;
      height: 56px;
      padding: 0 20px;

      .header-title {
        flex: 1;
        font-weight: $semi-bold;
        font-size: 16px;
        color: #000;
      }

      > button {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 8px;
        height: 40px;
        width: 40px;
        background: #fff;
        border: none;
        font-size: 18px;
      }
    }

    .page-modal-body {
      border-top: 1px solid $border-color;
      padding: 20px;
    }

    .page-modal-footer {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding: 12px 20px;
      border-top: 1px solid $border-color;

      button {
        @extend %primary-button;
      }

      button:not(:first-of-type) {
        margin-left: 8px;
      }
    }
  }
}
