// Copyright (c) 2017-2025, CKSource Holding sp. z o.o. All rights reserved.
// For licensing, see LICENSE.md.

@use 'helpers/color';
@use 'helpers/globals';
@use 'helpers/spacing';
@use 'sass:meta';

.main {
	display: flex;
	justify-content: flex-end;
	flex-direction: row-reverse;
	flex-wrap: nowrap;
	min-height: calc( 100vh - #{ globals.$u-top-height } );

	@include globals.u-responsive-narrow {
		background: color.u-color( 'background-bright' );
		min-height: calc( 100vh - #{ globals.$u-top-height } - #{ globals.$u-footer-height } );
	}

	@include meta.load-css('content');
	@include meta.load-css('navigation');

	// We need to move it up, because of no subheader
	&--home {
		margin-top: globals.$u-top-sub * -1;

		@include globals.u-responsive-narrow {
			min-height: calc( 100vh - #{ globals.$u-top-sub } - #{ globals.$u-footer-height } );
		}
	}

	&--no-sitenav {
		.side-navigation {
			display: none;
		}

		.main__content {
			padding-right:0;
		}

		.main__content-inner {
			width: auto;
			margin: auto;
			max-width: globals.$u-content-max-width + 2 * globals.$u-content-margin;
			padding: {
				left: globals.$u-content-margin;
				right: globals.$u-content-margin;
			}

			@include globals.u-responsive-mobile {
				padding: {
					left: spacing.u-spacing( 0 );
					right: spacing.u-spacing( 0 );
				}
			}
		}
	}
}
