@import '../../../styles/core.scss';

.Box {
  border-radius: 6px;
  box-sizing: border-box;
  padding: ms(0);

  &_flat {
    background: get(grays, -1);
  }

  &_rule,
  &_pop,
  &_modal {
    border: 1px solid rgba(0, 0, 0, 0.05);
  }

  &_pop {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.025), 0 1px 10px rgba(0, 0, 0, 0.025);
  }

  &_modal {
    @extend .Box_rule;
    background-color: #fff;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05), 0 2px 20px rgba(0, 0, 0, 0.05);
  }

  & > &_inner {
    $offset: -1 * ms(0);
    $offset: calc(#{$offset} - 1px);

    &:first-child { margin-top:    $offset; }
    &:last-child  { margin-bottom: $offset; }

    margin-left: $offset;
    margin-right: $offset;
    border-radius: 0;
  }
}
