/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

    This file contains rules for
    BUTTONS
    that implement the UU design system specifically for Sitevision

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */


/***************************

Translate env-button and layout-header-buttons a
 to designsystem buttons

***************************/

.env-button {
    font-weight: 400;
}

.layout-header-central a.uu-text,
.layout-header-central a.env-button--link,
.uu-button-group a,
.uu-button-group button,
.uu-button-group ul a,
.env-button,
.env-button:hover,
.env-button:focus,
.env-button--primary,
.env-button--primary:hover,
.env-button--primary:focus {
    background-color: #333;
    border: 3px solid #333;
    border-radius: 4px;
    box-sizing: border-box;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-size: 1rem;
    letter-spacing: .05em;
    line-height: 1.5;
    padding: .45rem .8rem;
    text-align: center;
    text-decoration: none;
    transition: filter 200ms ease-in-out, transform 150ms ease;
    -webkit-appearance: none;
    -moz-appearance: none;
}


/* Outlined buttons */

.uu-button-group a,
.uu-button-group button,
.uu-button-group ul a,
.env-button:not(.env-button--primary),
.btn-outline,
.button-outline {
    background-color: #fff;
    color: var(--color-text);
}


/* Hover */

.layout-header-central a.uu-text:hover,
.layout-header-central a.env-button--link:hover,
.uu-button-group a:hover,
.uu-button-group button:hover,
.uu-button-group ul a:hover,
.env-button:hover,
.env-button--primary:hover,
.btn-outline:hover,
.button-outline:hover {
    background-color: #111;
    border-color: #111;
    color: #fff;
}

/* Make sure danger buttons still have the correct hover color after above rule */
.button-danger:hover,
.btn-danger:hover {
    background-color: var(--color-danger-darker);
    border-color: var(--color-danger-darker)
}


/* Text buttons */

.layout-header-central a.uu-text,
.layout-header-central a.env-button--link,
.env-button--link,
.btn-text,
.button-text {
    background-color: transparent;
    border-color: transparent;
    color: var(--color-text);
}

.layout-header-central a.uu-text:hover,
.layout-header-central a.env-button--link:hover .env-button--link:hover,
.button-text:hover,
.btn-text:hover {
    color: #fff;
}

.env-button:focus,
.env-button--primary:focus {
    outline: 3px solid var(--color-focus);
    outline-offset: -1px;
}


/* Button group */

.uu-button-group ul a {
    margin: 0.25rem;
}

.uu-button-group ul {
    display: flex;
    flex-wrap: wrap;
    margin: -0.25rem !important;
    max-width: 100%;
}


/* Make Envision link buttons have the same focus outline as our buttons. */

.env-button.env-button--link:focus {
    border-color: transparent;
    box-shadow: none;
}

.env-button.env-button--link:focus-visible {
    box-shadow: unset;
    outline: 3px solid var(--color-focus);
    outline-offset: initial;
}


/* Make arrow on Envision link buttons look like our CTA buttons. */

a.env-button.env-button.env-button--link::after {
    background-size: 24px;
    height: 24px;
}

.is-padding-button {
    padding: 0.45rem 0.8rem
}

@media print {

    .button,
    input[name=submitButton] {
        background-color: transparent !important;
    }

    .env-button {
        background-color: transparent;
    }
}


@media screen and (max-width: 576px) {
    .layout-header-buttons .button-text {
        padding: 0.45rem 0.6rem;
    }

    .layout-header-buttons {
        padding: 0 0.5rem 0 0;
    }
}

@media screen and (max-width: 375px) {
    .layout-header-buttons .button-text {
        padding: 0.45rem 0.5rem;
    }

}

/* On touch devices, the hover effect of buttons should be removed */
@media (hover: none) {
    .button-text:not(.active):hover {
        background-color: transparent;
        border-color: transparent;
        color: var(--color-text);
    }

    .button-text.active:hover {
        background-color: var(--color-grey);
        border-color: transparent;
        color: var(--color-text);
    }

    .button-text:hover::before {
        filter: invert(1);
    }

    .button-filter:hover {
        background: var(--color-grey);
        border-color: var(--color-grey);
        color: var(--color-text);
    }

    .button-filter[aria-expanded=true]:hover {
        background-color: var(--color-button-active-shadow);
        border-color: var(--color-button);
        color: #fff;
    }
}
