.c-icon-teaser__border {
    border: 1px solid;
}

.c-icon-teaser {
    background-color: #fff;
    position: relative;
    width: 100%;
    height: 100%;
    padding: 1rem;
    text-decoration: none;
    overflow: hidden;
    transition: background-color $transition-time, color $transition-time;

    @screen sm {
        padding: 2.5rem 1rem;
    }

    /* stylelint-disable */

    &[href] {
        &:hover,
        &:focus {
            color: #fff;

            .c-icon-teaser__headline,
            .c-icon-teaser__arrow,
            .c-icon-teaser__icon  {
                color: #fff;
            }

            @screen sm {
                .c-icon-teaser__content {
                    transform: translateY(-.25rem);
                }
            }
        }
    }
    /* stylelint-enable */
}

.c-icon-teaser__content {
    display: flex;
    align-items: center;
    text-align: center;
    flex-direction: column;
    backface-visibility: hidden;
    padding: 0;
    transition: transform $transition-time;
    height: 100%;
}

.c-icon-teaser__icon {
    max-width: 100%;
    transition: color $transition-time;

    img {
        height: auto;
        width: auto;
        max-width: 2.5rem;
    }

    svg {
        height: auto;
        max-height: 2rem;
        width: 2.5rem;

        @screen md {
            height: 2rem;
            max-height: none;
            width: auto;
            max-width: 2.5rem;
        }

        * {
            fill: currentColor;
        }
    }
}

.c-icon-teaser__icon + .c-icon-teaser__text {
    margin-top: 1.5rem;
}

h3.c-icon-teaser__headline {
    font-family: 'BaseFontFamily', sans-serif;
    font-size: 1.125rem;
    color: theme('colors.gray.900');
    font-weight: 600;
    line-height: 1.25;
    margin: 1.5rem 0 0;
    text-transform: initial;
    transition: color $transition-time;
}

.c-icon-teaser__text {
    margin-top: .5rem;
    font-size: .875rem;
}

.c-icon-teaser__arrow-wrapper {
    margin-top: auto;
}

.c-icon-teaser__arrow {
    font-size: 1.5rem;
    position: relative;
    margin: 0 auto;
    backface-visibility: hidden;
    transition: color $transition-time;
    margin-top: 1rem;

    .c-icon-teaser:not([href]) & {
        display: none;
    }
}

// Accent Color Modifiers

// Primary (Standard)
.c-icon-teaser--primary {
    border-color: theme('colors.primary.200');

    &[href] {
        &:hover,
        &:focus {
            background-color: theme('colors.primary.500');
        }
    }

    .c-icon-teaser__icon {
        color: theme('colors.primary.500');
    }

    .c-icon-teaser__arrow {
        color: theme('colors.primary.500');
    }
}

// Secondary
.c-icon-teaser--secondary {
    border-color: theme('colors.secondary.200');

    &[href] {
        &:hover,
        &:focus {
            background-color: theme('colors.secondary.500');
        }
    }

    .c-icon-teaser__icon {
        color: theme('colors.secondary.500');
    }

    .c-icon-teaser__arrow {
        color: theme('colors.secondary.500');
    }
}

// Accent
.c-icon-teaser--accent {
    border-color: theme('colors.accent.200');

    &[href] {
        &:hover,
        &:focus {
            background-color: theme('colors.accent.500');
        }
    }

    .c-icon-teaser__icon {
        color: theme('colors.accent.500');
    }

    .c-icon-teaser__arrow {
        color: theme('colors.accent.500');
    }
}

// CTA
.c-icon-teaser--cta {
    border-color: theme('colors.cta.200');

    &[href] {
        &:hover,
        &:focus {
            background-color: theme('colors.cta.500');
        }
    }

    .c-icon-teaser__icon {
        color: theme('colors.cta.500');
    }

    .c-icon-teaser__arrow {
        color: theme('colors.cta.500');
    }
}

// Ambient
.c-icon-teaser--ambient {
    border-color: theme('colors.ambient.200');

    &[href] {
        &:hover,
        &:focus {
            background-color: theme('colors.ambient.500');
        }
    }

    .c-icon-teaser__icon {
        color: theme('colors.ambient.500');
    }

    .c-icon-teaser__arrow {
        color: theme('colors.ambient.500');
    }
}
