@import '../../components/Grid/variables.scss';
@import '../../components/Form/variables.scss';
@import './variables.scss';
@import '../Divider/variables.scss';

.grid {
    margin-bottom: -$sectionMarginBottom;
    overflow-y: hidden;
}

.grid-section {
    margin-bottom: -$fieldMarginBottom;

    &:first-child {
        .divider-container {
            margin-top: -$dividerTopMargin;
        }
    }

    &:last-child {
        margin-bottom: 0;
    }

    & + .grid-item {
        margin-top: $fieldMarginBottom;
    }
}

.grid-item + .grid-section {
    margin-top: -$fieldMarginBottom;
}

@media (max-width: $gridMinWidth) {
    .grid-section + .grid-section {
        margin-top: $fieldMarginBottom;
    }
}
