// SPDX-FileCopyrightText: 2024-2025 David Mosbach <david.mosbach@uniworx.de>, Sarah Vaupel <sarah.vaupel@uniworx.de>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
// SPDX-License-Identifier: LicenseRef-Fraport-Corporate-Design

@import 'env';

$ico-width: 30px;

$icons: new,
        ok,
        not-ok,
        warning,
        problem,
        visible,
        invisible,
        course-favourite-manual,
        course-favourite-automatic,
        course-favourite-off,
        enrol-true,
        enrol-false,
        planned,
        announce,
        exam,
        exam-register-true,
        exam-register-false,
        exam-auto-occurrence-nudge-up,
        exam-auto-occurrence-nudge-down,
        exam-auto-occurrence-ignore,
        exam-auto-occurrence-reconsider,
        comment-true,
        comment-false,
        link,
        file-donwload,
        file-upload,
        file-zip,
        file-csv,
        sft-question,
        sft-hint,
        sft-solution,
        sft-marking,
        email,
        register-template,
        no-correctors,
        remove-user,
        tooltip-default,
        notification-success,
        notification-info,
        notification-warning,
        notification-error,
        notification-nonactive,
        favourite,
        language,
        nav-container-close,
        page-action-children-close,
        menu-news,
        menu-help,
        menu-profile,
        menu-login,
        menu-logout,
        breadcrumbs-home,
        menu-extra,
        menu-course-list,
        menu-corrections,
        menu-exams,
        menu-admin,
        menu-lms,
        menu-qualification,
        page-action-primary-expand,
        page-action-secondary,
        breadcrumb-separator,
        file-upload-session,
        standalone-field-error,
        file-user,
        notification,
        notification-sent,
        no-notification,
        personal-identification,
        menu-workflows,
        video,
        submission-user-duplicate,
        submission-no-users,
        reset,
        blocked,
        certificate,
        print-center,
        letter,
        at,
        supervisor,
        supervisor-foreign,
        waiting-for-user,
        expired,
        locked,
        unlocked,
        trash,
        reset-tries,
        company,
        edit,
        user-edit,
        placeholder,
        loading;


@each $name in $icons {
  .ico-#{$name} {
    background-image: url('#{$path}/assets/icons/fradrive/#{$name}.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    aspect-ratio: 1/1;
    min-width: 1em;
    font-size: inherit;
    display: inline-block;
    vertical-align: middle;
  }
}

.white-ico {
  filter: invert(100%) sepia(20%) saturate(901%) hue-rotate(47deg) brightness(106%) contrast(101%);
}

.fw-ico {
  width: $ico-width;
}

.small-ico {
  font-size: 1em;
}

.medium-ico {
  font-size: 1.5em;
}

.large-ico {
  font-size: 2em;
}

.ico-spin {
  animation-name: ico-spin;
  animation-delay: 0s;
  animation-duration: 3s;
  animation-direction: normal;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

@media (prefers-reduced-motion: reduce) {
  .ico-spin {
    animation-delay: -1ms;
    animation-duration: 1ms;
    animation-iteration-count: 1;
    transition-delay: 0s;
    transition-duration: 0s;
  }
}

@keyframes ico-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

