// ----------------------------------------------------------------------------
// Responsive behaviour configuration
// ----------------------------------------------------------------------------

/// Silent mode
///
/// @type Bool
$o-grid-is-silent: true !default;


/// Grid mode
/// - fluid: full width up to the largest layout's width
/// - snappy: fluid width until the layout defined in $o-grid-start-snappy-mode-at (default: M),
///           and then snaps into a larger fixed layout at each breakpoint
/// - fixed: always fixed-width with the layout defined by $o-grid-fixed-layout (default: L)
///
/// @type String - one of fluid (default), snappy, fixed
$o-grid-mode: 'fluid' !default;

/// Layout to default to when the grid has a fixed width (not fluid)
///
/// @type String - One of $o-grid-layouts
$o-grid-fixed-layout: 'L' !default;

/// When the grid start snapping between fixed-width layouts
/// in the case where a row has the `o-grid-row--snappy` class
///
/// @type String
$o-grid-start-snappy-mode-at: 'M' !default;

// ----------------------------------------------------------------------------
// Grid settings and dimensions
// ----------------------------------------------------------------------------

/// Number of columns
///
/// @type Number (unitless)
$o-grid-columns: 12 !default;

/// Minimum width, in pixels
///
/// @type Number
$o-grid-min-width: 240px !default;

/// Layouts
///
/// Each layout is calculated following a specific column width,
/// in order to base breakpoints on the structure of the grid itself
///
/// @type Map
$o-grid-layouts: (
	S:  490px,  // column-width: 30px, inner width: 470px
	M:  740px,  // column-width: 40px, inner width: 700px
	L:  980px,  // column-width: 60px, inner width: 940px
	XL: 1220px, // column-width: 80px, inner width: 1180px
) !default;

/// Layout names
///
/// @access private
/// @type List
$_o-grid-layout-names: map-keys($o-grid-layouts);

/// Gutter sizes
///
/// @type Map
$o-grid-gutters: (
	default: 10px,
	M:       20px,
) !default;

// If layouts have changed but gutters haven't,
// prune non-existant layouts.
@each $layout-name, $gutter-size in $o-grid-gutters {
	@if ($layout-name != 'default') and (not map-has-key($o-grid-layouts, $layout-name)) {
		$o-grid-gutters: map-remove($o-grid-gutters, $layout-name);
	}
}

/// Maximum grid width
/// Defaults to the largest layout width
///
/// @access private
/// @type Number
$_o-grid-max-width: map-get($o-grid-layouts, nth($_o-grid-layout-names, -1));
