@use 'sass:list';
@use 'sass:map';
@use '../tools';
@use '../settings';

@if (settings.$utilities != false and map.get(settings.$misc, 'elevation') != false and list.length(settings.$utilities) > 0) {
  @property --v-elevation-overlay {
    syntax: '<color>';
    inherits: false;
    initial-value: transparent;
  }

  @include tools.layer('utilities.helpers') {
    @for $z from 0 through 5 {
      .elevation-#{$z} {
        @include tools.elevation($z);
      }
    }
    @for $z from 0 through 5 {
      .hover-elevation-#{$z}:hover {
        @include tools.elevation($z);
      }
    }

    .elevation-overlay {
      background-image: linear-gradient(var(--v-elevation-overlay), var(--v-elevation-overlay));
    }
  }
}
