.md {
  @import (multiple) '../../less/colors-md.less';
  @import (multiple) '../../less/vars-md.less';
  .block {
    margin: 32px 0;
    padding: 0 16px;
  }
  .block-title {
    color: rgba(0,0,0,0.54);
    margin: 32px 16px 16px;
    line-height: 16px;
    font-weight: 500;
    + .list, + .block, + .card, + .timeline, + .block-header {
      margin-top: 0px;
    }
  }
  .block-strong {
    padding: 16px;
  }
  .hairline-root('.block-strong', top, @blockBorderColor);
  .hairline-root('.block-strong', bottom, @blockBorderColor);

  .block.inset {
    margin-left: 16px;
    margin-right: 16px;
  }
  .block-strong.inset {
    border-radius: 4px;
  }
  // Header/Footer
  .block-header, .block-footer {
    padding: 0 16px;
    color: rgba(0,0,0,0.54);
  }
  .block {
    .block-header, .block-footer {
      padding: 0;
    }
  }
  .block-header {
    margin-top: 32px;
    + .list, + .block, + .card, + .timeline {
      margin-top: 10px;
    }
  }
  .block-footer {
    margin-bottom: 32px;
  }
  .list, .block, .card, .timeline {
    .block-header {
      margin-top: 0;
    }
    .block-footer {
      margin-bottom: 0;
    }
    + .block-footer {
      margin-top: -22px;
    }
  }
  .block + .block-footer {
    margin-top: -22px;
    margin-bottom: 32px;
  }
  @media (min-width:768px) {
    .block.tablet-inset {
      margin-left: 16px;
      margin-right: 16px;
      border-radius: 4px;
    }

    .block-strong.tablet-inset {
      border-radius: 4px;
    }
  }
  & when (@includeDarkTheme) {
    .theme-dark {
      .block-title {
        color: #fff;
      }
      .block-header, .block-footer {
        color: rgba(255,255,255,0.54);
      }
    }
  }
  .safe-areas-landscape({
    .safe-area-left({
      .block:not(.inset):not(.tablet-inset):not(.no-ios-edges):not(.no-ios-left-edge),
      .block-header,
      .block-footer {
        padding-left: ~"calc(16px + constant(safe-area-inset-left))";
        padding-left: ~"calc(16px + env(safe-area-inset-left))";
      }
      .block:not(.no-ios-edges):not(.no-ios-left-edge) {
        .block-header, .block-footer {
          padding-left: 0;
        }
      }
      .block.inset:not(.no-ios-edges):not(.no-ios-left-edge),
      .block-title:not(.no-ios-edges):not(.no-ios-left-edge) {
        margin-left: ~"calc(16px + constant(safe-area-inset-left))";
        margin-left: ~"calc(16px + env(safe-area-inset-left))";
      }
      @media (min-width:768px) {
        .block.tablet-inset:not(.no-ios-edges):not(.no-ios-left-edge) {
          margin-left: ~"calc(16px + constant(safe-area-inset-left))";
          margin-left: ~"calc(16px + env(safe-area-inset-left))";
        }
      }
    });
    .safe-area-right({
      .block:not(.inset):not(.tablet-inset):not(.no-ios-edges):not(.no-ios-right-edge),
      .block-header,
      .block-footer {
        padding-right: ~"calc(16px + constant(safe-area-inset-right))";
        padding-right: ~"calc(16px + env(safe-area-inset-right))";
      }
      .block:not(.no-ios-edges):not(.no-ios-right-edge) {
        .block-header, .block-footer {
          padding-right: 0;
        }
      }
      .block.inset:not(.no-ios-edges):not(.no-ios-right-edge),
      .block-title:not(.no-ios-edges):not(.no-ios-right-edge) {
        margin-right: ~"calc(16px + constant(safe-area-inset-right))";
        margin-right: ~"calc(16px + env(safe-area-inset-right))";
      }
      @media (min-width:768px) {
        .block.tablet-inset:not(.no-ios-edges):not(.no-ios-right-edge) {
          margin-right: ~"calc(16px + constant(safe-area-inset-right))";
          margin-right: ~"calc(16px + env(safe-area-inset-right))";
        }
      }
    });
  });
}
