.student-place-offer {
  $component-name: ".student-place-offer";
  $padding-content: $page-padding-side;
  $padding-content-wide: -1;
  $padding-icon: -3;
  $padding-icon-wide: -1;
  $size-icon: 1;
  $size-icon-wide: 2;
  $margin-header: -2;
  $z-index-content: $z-index-just-above-static + 1;

  $artwork-da-foreground: url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M80 60c0-2.773-.527-5.373-1.58-7.8-1.053-2.427-2.48-4.547-4.28-6.36-1.8-1.813-3.92-3.24-6.36-4.28C65.34 40.52 62.747 40 60 40v10c1.36 0 2.647.26 3.86.78a10.046 10.046 0 0 1 3.18 2.14 10.328 10.328 0 0 1 2.16 3.18c.533 1.213.8 2.513.8 3.9h10Zm4.96-10c.693 0 1.347-.133 1.96-.4a5.131 5.131 0 0 0 1.6-1.08 5.131 5.131 0 0 0 1.08-1.6c.267-.613.4-1.267.4-1.96 0-.667-.133-1.307-.4-1.92a4.893 4.893 0 0 0-1.08-1.58 5.315 5.315 0 0 0-1.6-1.06 4.862 4.862 0 0 0-1.96-.4c-.693 0-1.34.133-1.94.4-.6.267-1.12.62-1.56 1.06a5.06 5.06 0 0 0-1.06 1.58 4.766 4.766 0 0 0-.4 1.92c0 .693.133 1.347.4 1.96s.62 1.147 1.06 1.6c.44.453.96.813 1.56 1.08.6.267 1.247.4 1.94.4Zm9.16 30L120 54.16V40L80 80h14.12Zm-40 40L80 94.16V80l-40 40h14.12Zm45.88 0c2.773 0 5.373-.527 7.8-1.58 2.427-1.053 4.547-2.48 6.36-4.28 1.813-1.8 3.24-3.913 4.28-6.34s1.56-5.027 1.56-7.8h-10c0 1.36-.26 2.647-.78 3.86a10.046 10.046 0 0 1-2.14 3.18 10.328 10.328 0 0 1-3.18 2.16 9.584 9.584 0 0 1-3.9.8 9.487 9.487 0 0 1-3.86-.8 10.328 10.328 0 0 1-3.18-2.16 10.328 10.328 0 0 1-2.16-3.18A9.487 9.487 0 0 1 90 100H80c0 1.84.24 3.613.72 5.32a20.28 20.28 0 0 0 2.02 4.78 19.94 19.94 0 0 0 3.12 4.04 19.94 19.94 0 0 0 4.04 3.12 20.28 20.28 0 0 0 4.78 2.02c1.707.48 3.48.72 5.32.72Z' fill='%23000' fill-rule='nonzero'/%3E%3C/svg%3E");

  $artwork-en-foreground: url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.12 80 80 54.16V40L40 80h14.12ZM100 60V50h10V40H80v10h10v10h10Zm-45.88 60L80 94.16V80l-40 40h14.12Zm45.88 0c2.773 0 5.373-.527 7.8-1.58 2.427-1.053 4.547-2.48 6.36-4.28 1.813-1.8 3.24-3.913 4.28-6.34s1.56-5.027 1.56-7.8h-10c0 1.36-.26 2.647-.78 3.86a10.046 10.046 0 0 1-2.14 3.18 10.328 10.328 0 0 1-3.18 2.16 9.584 9.584 0 0 1-3.9.8 9.487 9.487 0 0 1-3.86-.8 10.328 10.328 0 0 1-3.18-2.16 10.328 10.328 0 0 1-2.16-3.18A9.487 9.487 0 0 1 90 100H80c0 1.84.24 3.613.72 5.32a20.28 20.28 0 0 0 2.02 4.78 19.94 19.94 0 0 0 3.12 4.04 19.94 19.94 0 0 0 4.04 3.12 20.28 20.28 0 0 0 4.78 2.02c1.707.48 3.48.72 5.32.72Z' fill='%23000' fill-rule='nonzero'/%3E%3C/svg%3E");

  $artwork-da-admitted: url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m20 40 20-20V5.84L12.92 32.92 0 20v14.12L5.88 40H20Zm30-20V10h20V0H40v20h10Zm20 20V30H40v10h30Zm50 0V30H90V20H80v20h40ZM40 80 20 60l20-20H25.84l-20 20 20 20H40Zm20 0c1.84 0 3.613-.24 5.32-.72a20.28 20.28 0 0 0 4.78-2.02 19.94 19.94 0 0 0 4.04-3.12 19.94 19.94 0 0 0 3.12-4.04 20.28 20.28 0 0 0 2.02-4.78c.48-1.707.72-3.48.72-5.32 0-2.773-.527-5.373-1.58-7.8-1.053-2.427-2.48-4.547-4.28-6.36-1.8-1.813-3.92-3.24-6.36-4.28C65.34 40.52 62.747 40 60 40c-2.773 0-5.373.52-7.8 1.56-2.427 1.04-4.547 2.467-6.36 4.28-1.813 1.813-3.24 3.933-4.28 6.36C40.52 54.627 40 57.227 40 60c0 2.773.52 5.373 1.56 7.8 1.04 2.427 2.467 4.54 4.28 6.34 1.813 1.8 3.933 3.227 6.36 4.28C54.627 79.473 57.227 80 60 80Zm0-10a9.584 9.584 0 0 1-3.9-.8 10.328 10.328 0 0 1-3.18-2.16 10.046 10.046 0 0 1-2.14-3.18A9.696 9.696 0 0 1 50 60c0-1.387.26-2.687.78-3.9a10.046 10.046 0 0 1 2.14-3.18 10.046 10.046 0 0 1 3.18-2.14A9.795 9.795 0 0 1 60 50c1.36 0 2.647.26 3.86.78a10.046 10.046 0 0 1 3.18 2.14 10.328 10.328 0 0 1 2.16 3.18c.533 1.213.8 2.513.8 3.9 0 1.36-.267 2.647-.8 3.86a10.328 10.328 0 0 1-2.16 3.18 10.328 10.328 0 0 1-3.18 2.16c-1.213.533-2.5.8-3.86.8Zm40 4.12 20-20V40l-20 20-20-20v14.12l20 20Zm-80 40 20-20V80l-20 20L0 80v14.12l20 20ZM50 100V90h20V80H40v20h10Zm20 20v-10H40v10h30Zm50 0v-14.16L94.12 80H80l40 40Z' fill='%23000' fill-rule='nonzero'/%3E%3C/svg%3E");

  $artwork-en-admitted: url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m20 40 20-20V5.84L12.92 32.92 0 20v14.12L5.88 40H20Zm40 0 20-20V5.84L52.92 32.92 40 20v14.12L45.88 40H60Zm30-20V10h20V0H80v20h10Zm20 20V30H80v10h30ZM40 80V70H10V60H0v20h40Zm20 0V70a9.795 9.795 0 0 1-3.9-.78 10.046 10.046 0 0 1-3.18-2.14 10.046 10.046 0 0 1-2.14-3.18A9.795 9.795 0 0 1 50 60c0-1.36.26-2.647.78-3.86a10.046 10.046 0 0 1 2.14-3.18 10.328 10.328 0 0 1 3.18-2.16A9.584 9.584 0 0 1 60 50V40c-2.773 0-5.373.527-7.8 1.58-2.427 1.053-4.547 2.48-6.36 4.28-1.813 1.8-3.24 3.92-4.28 6.36C40.52 54.66 40 57.253 40 60c0 2.773.52 5.373 1.56 7.8 1.04 2.427 2.467 4.547 4.28 6.36 1.813 1.813 3.933 3.24 6.36 4.28C54.627 79.48 57.227 80 60 80Zm40 0c1.84 0 3.613-.24 5.32-.72a20.28 20.28 0 0 0 4.78-2.02 19.94 19.94 0 0 0 4.04-3.12 19.94 19.94 0 0 0 3.12-4.04 20.28 20.28 0 0 0 2.02-4.78c.48-1.707.72-3.48.72-5.32 0-2.773-.527-5.373-1.58-7.8-1.053-2.427-2.48-4.547-4.28-6.36-1.8-1.813-3.92-3.24-6.36-4.28-2.44-1.04-5.033-1.56-7.78-1.56-2.773 0-5.373.52-7.8 1.56-2.427 1.04-4.547 2.467-6.36 4.28-1.813 1.813-3.24 3.933-4.28 6.36C80.52 54.627 80 57.227 80 60c0 2.773.52 5.373 1.56 7.8 1.04 2.427 2.467 4.54 4.28 6.34 1.813 1.8 3.933 3.227 6.36 4.28C94.627 79.473 97.227 80 100 80Zm0-10a9.584 9.584 0 0 1-3.9-.8 10.328 10.328 0 0 1-3.18-2.16 10.046 10.046 0 0 1-2.14-3.18A9.696 9.696 0 0 1 90 60c0-1.387.26-2.687.78-3.9a10.046 10.046 0 0 1 2.14-3.18 10.046 10.046 0 0 1 3.18-2.14A9.795 9.795 0 0 1 100 50c1.36 0 2.647.26 3.86.78a10.046 10.046 0 0 1 3.18 2.14 10.328 10.328 0 0 1 2.16 3.18c.533 1.213.8 2.513.8 3.9 0 1.36-.267 2.647-.8 3.86a10.328 10.328 0 0 1-2.16 3.18 10.328 10.328 0 0 1-3.18 2.16c-1.213.533-2.5.8-3.86.8Zm-80 44.12 20-20V80l-20 20L0 80v14.12l20 20ZM50 100V90h20V80H40v20h10Zm20 20v-10H40v10h30Z' fill='%23000' fill-rule='nonzero'/%3E%3C/svg%3E");

  $artwork-da-rejected: url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 40V25.84L14.12 0H0l40 40Zm70 0V30H80v10h30Zm-70 0h14.12L80 14.16V20h10V10h20V0H80L40 40ZM10 60c0-1.36.26-2.647.78-3.86a10.046 10.046 0 0 1 2.14-3.18 10.328 10.328 0 0 1 3.18-2.16A9.584 9.584 0 0 1 20 50V40c-1.84 0-3.613.24-5.32.72a20.28 20.28 0 0 0-4.78 2.02 19.94 19.94 0 0 0-4.04 3.12 19.94 19.94 0 0 0-3.12 4.04 20.28 20.28 0 0 0-2.02 4.78C.24 56.387 0 58.16 0 60h10Zm10 20c2.773 0 5.373-.527 7.8-1.58 2.427-1.053 4.547-2.48 6.36-4.28 1.813-1.8 3.24-3.913 4.28-6.34S40 62.773 40 60H30c0 1.36-.26 2.647-.78 3.86a10.046 10.046 0 0 1-2.14 3.18 10.328 10.328 0 0 1-3.18 2.16 9.584 9.584 0 0 1-3.9.8v10Zm40-20V50h10V40H40v10h10v10h10Zm30 0V50h20V40H80v20h10Zm20 20V70H80v10h30ZM4.96 90c.693 0 1.347-.133 1.96-.4a5.131 5.131 0 0 0 1.6-1.08 5.131 5.131 0 0 0 1.08-1.6c.267-.613.4-1.267.4-1.96 0-.667-.133-1.307-.4-1.92a4.893 4.893 0 0 0-1.08-1.58 5.315 5.315 0 0 0-1.6-1.06 4.862 4.862 0 0 0-1.96-.4c-.693 0-1.34.133-1.94.4-.6.267-1.12.62-1.56 1.06A5.06 5.06 0 0 0 .4 83.04a4.766 4.766 0 0 0-.4 1.92c0 .693.133 1.347.4 1.96s.62 1.147 1.06 1.6c.44.453.96.813 1.56 1.08.6.267 1.247.4 1.94.4Zm9.16 30L40 94.16V80L0 120h14.12ZM80 100c0-2.773-.527-5.373-1.58-7.8-1.053-2.427-2.48-4.547-4.28-6.36-1.8-1.813-3.92-3.24-6.36-4.28C65.34 80.52 62.747 80 60 80v10c1.36 0 2.647.26 3.86.78a10.046 10.046 0 0 1 3.18 2.14 10.328 10.328 0 0 1 2.16 3.18c.533 1.213.8 2.513.8 3.9h10Zm0 20-20-20v14.12l5.88 5.88H80Z' fill='%23000' fill-rule='nonzero'/%3E%3C/svg%3E");

  $artwork-en-rejected: url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 40V25.84L14.12 0H0l40 40Zm10-20V10h20V0H40v20h10Zm20 20V30H40v10h30Zm30-20L80 0v14.12L85.84 20H100Zm-5.88 20 5.88-5.88V20L80 40h14.12ZM120 40V25.84L114.12 20H100l20 20ZM20 60V50h10V40H0v10h10v10h10Zm40 0L40 40v14.12L45.84 60H60Zm-5.88 20L80 54.12V40L60 60 40 80h14.12ZM90 60V50h20V40H80v20h10Zm20 20V70H80v10h30Zm-95.88 40L40 94.16V80L0 120h14.12ZM80 100c0-2.773-.527-5.373-1.58-7.8-1.053-2.427-2.48-4.547-4.28-6.36-1.8-1.813-3.92-3.24-6.36-4.28C65.34 80.52 62.747 80 60 80v10c1.36 0 2.647.26 3.86.78a10.046 10.046 0 0 1 3.18 2.14 10.328 10.328 0 0 1 2.16 3.18c.533 1.213.8 2.513.8 3.9h10Zm0 20-20-20v14.12l5.88 5.88H80Z' fill='%23000' fill-rule='nonzero'/%3E%3C/svg%3E");

  position: relative;
  padding: spacing(1) 0;

  @include breakpoint("medium") {
    padding: spacing($page-padding-side) 0 spacing($page-padding-side) spacing($page-padding-side);
  }

  @include breakpoint("wide") {
    padding: spacing($page-padding-side);
  }

  //SIGNAL COLORS, ICONS AND ARTWORK
  &--admitted {
    #{$component-name}__content__item {
      @include set-colors("utility-confirm-background");
      border-color: color("utility-confirm");

      &--header {
        &::before {
          @include set-icon("student-place-offered");
          @include set-colors("utility-confirm");
        }
      }

      &--remark {
        @include set-colors("utility-attention-background");
        border-color: color("utility-attention");
      }

      &__wrapper {
        @include set-colors("utility-confirm-background", $rewrite-css-vars: true);
      }
    }
  }

  &--standby {
    #{$component-name}__content__item {
      @include set-colors("utility-attention-background");
      border-color: color("utility-attention");

      &--header {
        &::before {
          @include set-icon("student-place-standby");
          @include set-colors("utility-attention");
        }
      }

      &__wrapper {
        @include set-colors("utility-attention-background", $rewrite-css-vars: true);
      }
    }
  }

  &--rejected {
    #{$component-name}__content__item {
      @include set-colors("background-secondary");
      border-color: color("theme");

      &--header {
        &::before {
          @include set-icon("student-place-not-offered");
          @include set-colors("theme");
        }
      }

      &__wrapper {
        @include set-colors("background-secondary", $rewrite-css-vars: true);
      }
    }

    #{$component-name}__artwork--background {
      --artwork: #{$artwork-en-rejected};

      html[lang*="da"] & {
        --artwork: #{$artwork-da-rejected};
      }
    }
  }

  //style the buttons
  @include utility-button;

  .button:not(.button--text) {
    padding-left: spacing($button-padding-vertical-large);
    padding-right: spacing($button-padding-vertical-large);
    width: 100%;

    @include breakpoint("medium") {
      width: auto;
      padding-left: spacing($button-padding-horizontal-large);
      padding-right: spacing($button-padding-horizontal-large);
    }
  }

  .button-container {
    justify-content: space-around;
    align-items: flex-start; //Fix for Firefox: by default this is set to baseline in .button-container, but here we have a special button with two lines of text and for some reason Firefox baselines to the second line (or something) when we're at out max-with breakpoint or wider.
    @include breakpoint("medium") {
      justify-content: flex-start;
    }
  }


  &__artwork {
    display: none; //hidden in narrow viewports
    position: absolute;
    top: spacing($page-padding-side);
    bottom: spacing($page-padding-side);
    left: spacing($page-padding-side);
    right: spacing($page-padding-side);

    $mask: var(--artwork) 100% 0 / auto 100% no-repeat;

    -webkit-mask: $mask;
    mask: $mask;

    @include breakpoint("wide") {
      display: block;
    }

    &--foreground {
      --artwork: #{$artwork-en-foreground};
      background-color: color("theme");
      z-index: $z-index-just-above-static;

      html[lang*="da"] & {
        --artwork: #{$artwork-da-foreground};
      }
    }

    &--background {
      background-color: color("theme-secondary");
      --artwork: #{$artwork-en-admitted};

      html[lang*="da"] & {
        --artwork: #{$artwork-da-admitted};
      }
    }
  }



  &__content {
    position: relative;
    z-index:  $z-index-content;

    @include breakpoint("wide") {
      margin: spacing(-1) 0;
      padding-right: spacing(2);
      min-width: calc(100% - #{spacing(2)} * 1.7);
      width: fit-content;
    }

    &__item {
      position: relative;
      display: flex;
      padding: spacing($page-padding-side);

      &::before {
        content: "";
        position: absolute;
        flex: 0 0 auto;
        font-size: font-size($size-icon);
        line-height: line-height("single");
        width: spacing($padding-icon, $times: 2, $add: line-height("single", $include-calc: false));
      }

      @include breakpoint("medium") {
        border-left-style: solid;
        border-left-width: $width-border-utility;
      }

      @include breakpoint("wide") {
        padding: spacing($padding-content-wide) spacing($page-padding-side) spacing($padding-content-wide) 0;
        border: none;

        &::before {
          position: static;
          font-size: font-size($size-icon-wide);
          width: spacing($padding-icon-wide, $times: 2, $add: line-height("single", $include-calc: false));
          z-index:  $z-index-content + 2;
          margin-right: spacing($padding-content-wide);
        }

        &::after {
          content: "";
          position: absolute;
          top: 0;
          bottom: 0;
          left: 0;
          background-color: color("background");
          border-width: 0;
          border-right-width: $width-border-utility;
          border-style: solid;
          border-color: inherit;
          font-size: font-size($size-icon-wide);
          width: spacing($padding-icon-wide, $times: 2, $add: "(#{line-height("single", $include-calc: false)} + #{$width-border-utility})", $divideby: 2);
          z-index:  $z-index-content + 1;
        }
      }

      &__wrapper {
        @include content-container;
        width: 100%;
      }

      &__pre-header {
        @include set-font(1, "single", $weight: "regular");
        margin: 0;

        @include breakpoint("medium") {
          margin-bottom: spacing($margin-header, $times: -1, $add: spacing(-5));
        }
      }

      &__title {
        @include set-font($typography-h1-fontsize, "single", $weight: "bold", $max-width: 1);
        margin: spacing($margin-header) 0;

        & + #{$component-name}__content__item__startdate {
          margin-top: spacing($margin-header, $times: -1, $add: spacing(-5));
        }
      }

      &__startdate {
        @include set-font(0, "single");
        margin: 0;
      }

      &__deadline {
        display: block;
        @include set-font(-1, "single");
        color: color("foreground-secondary");
      }

      &__info {
        @include set-font(1, "multiple", $weight: "light");
      }

      &--header {
        border-top-width: $width-border-utility;
        border-top-style: solid;
        padding-top: spacing(0);

        @include breakpoint("medium") {
          border-top: none;
          padding-top: spacing($padding-content-wide);
        }

        @include icon-style {
          display: flex;
          align-items: center;
          justify-content: center;
          background-color: color("background-secondary");
          border-radius: 50%;
          height: spacing($padding-icon, $times: 2, $add: line-height("single", $include-calc: false));
          top: spacing($padding-icon, $times: -2, $subtract: "#{line-height("single", $include-calc: false)} + #{$width-border-utility}", $divideby: 2);

          @include breakpoint("medium") {
            top: unset;
            left: spacing($padding-icon, $times: -2, $subtract: "#{line-height("single", $include-calc: false)} + #{$width-border-utility}", $divideby: 2);
          }

          @include breakpoint("wide") {
            height: spacing($padding-icon-wide, $times: 2, $add: line-height("single", $include-calc: false));
          }
        }
      }

      &--remark {
        padding-top: spacing(-2);
        padding-bottom: spacing(-2);
        margin: $width-border 0;

        &:last-child {
          margin-bottom: 0;
        }

        p {
          margin: spacing(-4) 0;
          line-height: line-height("single");
        }

        &--large {
          padding-top: spacing($padding-content-wide);
          padding-bottom: spacing($padding-content-wide);

          p {
            @include set-font(1, "multiple", $weight: "light");
          }
        }

        &--standby {
          margin-top: spacing(-1);

          border-top-style: solid;
          border-top-width: $width-border-utility;
          border-top-color: inherit;

          @include breakpoint("medium") {
            border-top: none;
          }

          #{$component-name}__content__item__wrapper {
            display: flex;
            flex-direction: row;
            align-items: center;

            @include icon-style {
              @include set-icon("student-place-standby");
              display: block;
              align-self: flex-start;
              flex: 0 0 auto;
              margin-right: spacing(-3);
              text-align: center;
              line-height: line-height("single");
              width: spacing(-4, $times: 2, $add: line-height("single", $include-calc: false));
              height: spacing(-4, $times: 2, $add: line-height("single", $include-calc: false));
              @include set-colors("utility-attention");
              border-radius: 50%;
              padding: spacing(-4);
            }
          }
        }

        #{$component-name}__content__item__wrapper {
          @include set-colors("utility-attention-background", $rewrite-css-vars: true);
        }
      }

      &--actions {
        #{$component-name}__content__item--header + & {
          padding-top: 0;
        }
      }
    }
  }
}
