// Copyright 2020 Energinet DataHub A/S
//
// Licensed under the Apache License, Version 2.0 (the "License2");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
@use "sass:math";

@use "./variables" as spaceVariables;

// Inset
@mixin inset-xs {
  padding: var(--watt-space-xs);
}

@mixin inset-s {
  padding: var(--watt-space-s);
}

@mixin inset-m {
  padding: var(--watt-space-m);
}

@mixin inset-l {
  padding: var(--watt-space-l);
}

@mixin inset-xl {
  padding: var(--watt-space-xl);
}

// Inset Squish
@mixin inset-squish-xs {
  padding: math.div(spaceVariables.$watt-space-baseline, 2) var(--watt-space-xs);
}

@mixin inset-squish-s {
  padding: var(--watt-space-xs) var(--watt-space-s);
}

@mixin inset-squish-m {
  padding: var(--watt-space-s) var(--watt-space-m);
}

@mixin inset-squish-l {
  padding: var(--watt-space-m) var(--watt-space-l);
}

// Inset Stretch
@mixin inset-stretch-s {
  padding: #{spaceVariables.$watt-space-baseline * 3} var(--watt-space-s);
}

@mixin inset-stretch-m {
  padding: #{spaceVariables.$watt-space-baseline * 6} var(--watt-space-m);
}

// Stack
@mixin stack-xxs {
  margin: 0 0 math.div(spaceVariables.$watt-space-baseline, 2) 0;
}

@mixin stack-xs {
  margin: 0 0 var(--watt-space-xs) 0;
}

@mixin stack-s {
  margin: 0 0 var(--watt-space-s) 0;
}

@mixin stack-m {
  margin: 0 0 var(--watt-space-m) 0;
}

@mixin stack-l {
  margin: 0 0 var(--watt-space-l) 0;
}

@mixin stack-xl {
  margin: 0 0 var(--watt-space-xl) 0;
}

// Inline
@mixin inline-xxs {
  margin: 0 math.div(spaceVariables.$watt-space-baseline, 2) 0 0;
}

@mixin inline-xs {
  margin: 0 var(--watt-space-xs) 0 0;
}

@mixin inline-s {
  margin: 0 var(--watt-space-s) 0 0;
}

@mixin inline-m {
  margin: 0 var(--watt-space-m) 0 0;
}

@mixin inline-l {
  margin: 0 var(--watt-space-l) 0 0;
}

@mixin inline-xl {
  margin: 0 var(--watt-space-xl) 0 0;
}
