.modal-overlay {
  position: fixed;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1001;
  overflow-x: hidden;
  overflow-y: auto;
}

$modalVerticalMargin: 24px;
$modalSideMargin: 40px;
$modalMaxWidth: 880px;
$modalMinWidth: 650px;
$modalXsWidth: 418px;
$modalSmallWidth: 562px;
$modalMediumWidth: 700px;
$modalLargeWidth: 800px;
$modalTopPadding: 30px;
$modalDefaultPadding: 30px;

@-webkit-keyframes fade-in  { from { margin-top: 50px; opacity:0; } to { margin-top: 0; opacity:1; } }
@-moz-keyframes fade-in     { from { margin-top: 50px; opacity:0; } to { margin-top: 0; opacity:1; } }
@keyframes fade-in          { from { margin-top: 50px; opacity:0; } to { margin-top: 0; opacity:1; } }

.view-modal {

  &-dialog {
    width: 650px;
    margin: 30px auto;
    outline: none;
  }

    &-header {
        border-bottom: 1px solid #ebebed;
        margin: 0;
        padding-bottom: 25px;
        &-auth {
          padding-top: 20px;
          align-items: flex-start;
          display: flex;
          &-name {
            margin-right: auto;
          }
          &-toggle {
            margin-left: auto;
          }
        }
    }

    &-header-title {
        margin: 0;

        &-is-large {
            font-size: 30px;
        }
    }

    &-title {
      margin: 0;
      font-weight: 400;
    }

    &-description {
      margin: 0;
      padding-top: 10px;
    }

    // Additional class to win specificity over
    // i[class^="mms-icon-"]
    // for font size
    &-header-icon, &-header i.view-modal-header-icon {
        font-size: 22px;
        color: $gray6;
    }

    &-row {
        display: flex;
        margin: 15px 0;

        &-item {
            min-width: 80px;
            margin-right: 5px;
        }
    }

    &-body {
      margin: 0;
      padding: 18px 0;
      &-service {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        width: 100%;
      }
    }

    &-back {
        background-color: transparent;
        border: none;
        text-transform: uppercase;
        font-size: 11px;
        font-weight: bold;
        position: absolute;
        top: 70px;
        color: $gray5;

        &:hover {
            color: $linkText;
        }
    }

    &-paragraph {
        font-size: 14px;
        line-height: 20px;

        &-is-secondary {
            color: $gray4;
        }

        &-is-padded {
            padding: 30px 0 10px 0;
        }

        &-is-padded-deep {
            padding: 10px 25px 10px 25px;
        }
    }

    &-close {
        /* font-size: 28px;
        font-weight: 200;
        color: $gray1;
        position: relative;
        top: -18px;
        right: -10px;
        margin-top: -2px; */

        border: none;
        background: none;
        float: right;
        font-size: ($font-size-base * 1.5);
        font-weight: bold;
        line-height: 1;
        color: #000;
        text-shadow: 0 1px 0 #fff;
        opacity: .2;

        &:hover,
        &:focus,
        &:active {
          border: none;
          background: none;
          color: #000;
          text-decoration: none;
          cursor: pointer;
          opacity: .5;
        }

        font-size: 28px;
        font-weight: 200;
        color: #464c4f;
        position: relative;
        top: -18px;
        right: -10px;
        margin-top: -2px;

        -webkit-appearance: none;
        padding: 0;
        cursor: pointer;
        background: transparent;
        border: 0;
    }

    &-overlay {
        /* background-color: #000;
        opacity: .5;

        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1050; */

        position: fixed;
        top: 0px;
        left: 0px;
        right: 0px;
        bottom: 0px;
        background-color: rgba(0, 0, 0, 0.6);
        outline: none;
        -webkit-appearance: none;
        z-index: 1050;
        overflow-x: hidden;
        overflow-y: auto;
    }

    &-layout {
        animation: fade-in 500ms cubic-bezier(0.165, 0.840, 0.440, 1.000);
        -webkit-animation: fade-in 500ms cubic-bezier(0.165, 0.840, 0.440, 1.000);
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1051;

        overflow-y: scroll;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    &-content {
        // margin: $modalVerticalMargin $modalSideMargin;
        max-width: $modalMaxWidth;
        min-width: $modalMinWidth;
        padding: $modalDefaultPadding;
        align-self: flex-start;
        color: $gray1;
        position: relative;
        background-color: #fff;
        background-clip: padding-box;
        border: 1px solid rgba(0, 0, 0, .1);
        border-radius: 3px;
        outline: none;
        -webkit-appearance: none;
        box-shadow: 0 5px 15px rgba(0, 0, 0, .3);

        &-service {
          width: 650px;
        }

        &:selected, &:active {
          outline: none;
          -webkit-appearance: none;
        }

        &-is-bordered {
            .view-modal-body {
                border-top: 1px solid $gray7;
                border-bottom: 1px solid $gray7;
                padding: 18px 0;
            }
        }

        &-is-xs {
            min-width: inherit;
            max-width: inherit;
            width: $modalXsWidth;
        }

        &-is-small {
            min-width: inherit;
            max-width: inherit;
            width: $modalSmallWidth;
        }

        &-is-medium {
            min-width: inherit;
            max-width: inherit;
            width: $modalMediumWidth;
        }

        &-is-large {
            min-width: inherit;
            max-width: inherit;
            width: $modalLargeWidth;
        }

        &-is-xlarge {
            min-width: inherit;
            max-width: inherit;
            width: $modalMaxWidth;
        }

        &-is-edit-ranges-modal {
            min-width: inherit;
            max-width: inherit;
            width: 825px;
        }
    }

    &-body {
        &-alert {
            padding: 0 15px;
        }

        &-has-padding {
            padding-bottom: 24px;
        }
    }

    &-input-row {
        display: flex;
        justify-content: center;
        align-items: baseline;

        &-is-left-aligned {
            justify-content: flex-start;
        }

        &-is-vertically-centered {
            align-items: center;
        }
    }

    &-input-row-spaced-element {
        margin-right: 5px;
    }

    &-label {
        width: 25%;
    }

    &-input {
        margin-left: 15px;

        &-error-message {
            color: $alertRedDark;
            font-style: italic;
            font-size: 14px;
            font-weight: 100;
            margin-left: 15px;
            margin-top: 10px;
        }

        &-has-error {
            border-color: $alertRedDark;
        }

        &-container {
            display: flex;
            flex-direction: column;

            &-is-wide {
                width: 290px;
            }

            &-has-left-margin {
                margin-left: 15px;
            }

            &-is-right-aligned {
                align-items: flex-end;
            }
        }
    }

    &-open {
        overflow: hidden;
    }

    &-footer {
        border-top: 1px solid #ebebed;
        padding-top: $modalVerticalMargin;
        text-align: right;
        justify-content: space-between;
        &-buttons {
          display: inline-block;
        }
    }

    &-actions {
        display: flex;
        justify-content: space-between;
    }
}
