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

    This file contains rules for
    COLLABORATION WEBSITE

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

/********************************
    Configuration page
********************************/

.sv-se-uu-uit-webb-webapp-collaboration-website-settings {
    margin-bottom: 0 !important;
}

/* Add a little bit of space between layouts used for the header and the footer. */
.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout *:last-child {
    margin-bottom: 0;
}

/********************************
    Header
********************************/

/* Set minimum height of header */
.layout-header {
    min-height: 64px;
}

/* Adjust the layout of the header to fit the logo and the buttons. */
.layout-header-central {
    grid-template-columns: 1fr 1fr;
}

@media (min-width: 768px) {
    .layout-header-central {
        grid-template-columns: 2fr 1fr;
    }
}

/* Remove background when hovering links in the header except for buttons. */
.layout-header-central a:hover:not(.button) {
    background: none;
}

/* A sticky container for the edit button in the header. */
.edit-button-sticky-container {
    padding: 0.6rem;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
}

/* Used when the button should be invisible but still be clickable. */
.edit-button-invisible {
    height: 43px;
    opacity: 0;
    width: 43px;
}

/********************************
    Footer
********************************/

/* Set minimum height of footer to be able to fit information about the hosting. */
.layout-footer {
    min-height: 155px;
}

.layout-footer .sv-row:last-child {
    border: none;
    margin: 0;
    padding: 0;
}

/* Add a background image to the footer with the UU logo and information about the hosting. */
.layout-footer-bg-img {
    background-color: #FFFFFF99;
    background-image: url(/uu-logo-red.svg);
    background-position: top;
    background-size: 65%;
    border-radius: 50%;
    height: 120px;
    margin: 1em;
    position: absolute !important;
    width: 120px;
    z-index: 1;
}

.layout-footer-bg-img::after {
    align-items: end;
    display: flex;
    font-size: 0.5em;
    height: 85%;
    padding: 0 0.2rem;
    text-align: center;
    width: 100%;
    z-index: 2;
}

@media screen and (min-width: 768px) {
    .layout-footer {
        min-height: 220px;
    }

    .layout-footer-bg-img {
        height: 160px;
        margin: 2em;
        width: 160px;
    }

    .layout-footer-bg-img::after {
        font-size: 0.72em;
    }
}

html[lang="sv"] .layout-footer-bg-img::after {
    content: 'Webbplatsen driftas hos Uppsala universitet';
}

html[lang="en"] .layout-footer-bg-img::after {
    content: 'This site is hosted by Uppsala University';
}

/* Make sure background image is positioned behind the content in the footer. */
.layout-footer-bg-img+div {
    position: relative;
    z-index: 2;
}

/********************************
    Card
********************************/

/* Set color of arrow button in linked cards when hovering */
.uu-block-link.image:hover .icon-call-to-action::after,
.link-call-to-action-rounded:hover::after {
    background-color: var(--color-button-hover);
}

/********************************
    Links
********************************/

a:has(img):hover {
    background-color: transparent;
}

/********************************
    Colors
********************************/

/* Define variables for the colors that can be changed in the collaboration websites */
:root {
    /* Body */
    --collaboration-website-color-body-background: var(--bs-body-bg);

    /* Header */
    --collaboration-website-color-header-background: var(--bs-body-bg);
    --collaboration-website-color-header-text: var(--color-text);

    /* Footer */
    --collaboration-website-color-footer-background: #e5e5e580;
    --collaboration-website-color-footer-text: var(--bs-body-color);

    /* Menu */
    --collaboration-website-color-menu-active-background: var(--color-grey-light);
    --collaboration-website-color-menu-active-text: var(--color-text);

    /* Cards */
    --collaboration-website-color-card-header-background: var(--color-grey-light);
    --collaboration-website-color-card-header-text: var(--color-text);
}

/* Body */

body,
.tree-menu-panel,
.nav-link {
    background-color: var(--collaboration-website-color-body-background) !important;
}

/* Header */

header {
    background-color: var(--collaboration-website-color-header-background);
    color: var(--collaboration-website-color-header-text);
    padding: 10px 0;
}

header .uu-heading,
header .uu-subheading,
header .uu-text {
    color: var(--collaboration-website-color-header-text);
}

/* Header configuration page, first and second layout is the header */

.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:first-child .uu-subheading,
.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:first-child .uu-text,
.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:first-child a,
.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:nth-child(2) .uu-subheading,
.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:nth-child(2) .uu-text,
.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:nth-child(2) a {
    color: var(--collaboration-website-color-header-text);
}

/* Footer */

.layout-footer {
    background: var(--collaboration-website-color-footer-background);
}

.layout-footer .uu-subheading,
.layout-footer .uu-text,
.layout-footer a {
    color: var(--collaboration-website-color-footer-text) !important;
}

.layout-footer a:hover {
    background-color: transparent !important;
    filter: invert(0.2);
    outline: 0 !important;
}

/* Footer configuration page, third and fourth layout is the footer */

.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:nth-child(3),
.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:nth-child(4) {
    background-color: var(--collaboration-website-color-footer-background);
}

.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:nth-child(3) .uu-subheading,
.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:nth-child(3) .uu-text,
.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:nth-child(3) a,
.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:nth-child(4) .uu-subheading,
.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:nth-child(4) .uu-text,
.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:nth-child(4) a {
    color: var(--collaboration-website-color-footer-text) !important;
}

.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:nth-child(3) a:hover,
.sv-se-uu-uit-webb-webapp-collaboration-website-settings+.pagecontent>.sv-layout:nth-child(4) a:hover {
    background-color: transparent !important;
    filter: invert(0.2);
    outline: 0 !important;
}

/* Menu */

.nav-link {
    border-bottom: 1px solid var(--collaboration-website-color-menu-active-background);
}

.nav-link+.nav-button {
    border-bottom: 1px solid var(--collaboration-website-color-menu-active-background);
    border-left: 1px solid var(--collaboration-website-color-menu-active-background);
}

.navbar-collapse>ul>li:first-child>div:first-child {
    border-top: 1px solid var(--collaboration-website-color-menu-active-background) !important;
}

.tree-menu-panel-content-list>ul>li:first-child>div>a,
.tree-menu-panel-content-list>ul>li:first-child>div>button {
    border-top: 1px solid var(--collaboration-website-color-menu-active-background);
}

@media (hover: none) {
    .nav-expandable .nav-item .nav-button:hover {
        border-bottom: 1px solid var(--collaboration-website-color-menu-active-background) !important;
        border-left: 1px solid var(--collaboration-website-color-menu-active-background) !important;
    }

    .navbar-collapse>ul>li:first-child>div>button:hover,
    .tree-menu-panel-content-list>ul>li:first-child>div>button:hover {
        border-top: 1px solid var(--collaboration-website-color-menu-active-background) !important;
    }
}

.nav-button:hover,
.nav-link:hover {
    background-color: var(--collaboration-website-color-menu-active-background) !important;
    color: var(--collaboration-website-color-menu-active-text);
}

.nav-link[aria-current=page],
.nav-link[aria-current=true],
.nav-link[aria-current=page]:focus,
.nav-link[aria-current=true]:focus,
.layout-header-central a[aria-current=page]:hover:not(.button) {
    background-color: var(--collaboration-website-color-menu-active-background) !important;
    color: var(--collaboration-website-color-menu-active-text);
}

.nav-link[aria-current=page]:hover,
.nav-link[aria-current=true]:hover {
    color: var(--collaboration-website-color-menu-active-text);
}

/* Last updated */

.layout-main-last-row,
.layout-footer-last-row {
    border-top: 1px solid var(--collaboration-website-color-menu-active-background);
}

/* Cookies consent banner */

.sv-cookie-consent-banner {
    background-color: var(--collaboration-website-color-body-background) !important;
}

.sv-cookie-consent-banner .env-button--ghost {
    background-color: #fff;
}

.sv-cookie-consent-banner .env-button--ghost:hover {
    background-color: #111;
    border-color: #111;
}

/* Cards */

.card-header,
a.env-collapse-header.env-collapse--expanded,
a.env-collapse-header,
a.env-collapse-header:hover,
.uu-block-link.card-call-to-action,
.uu-block-link.card-call-to-action:hover {
    background-color: var(--collaboration-website-color-card-header-background);
    filter: grayscale(0);
}

.card-header .uu-subheading,
.card-header h2,
.card-header h3,
a.env-collapse-header,
.uu-block-link.card-call-to-action .card-body a,
.uu-block-link.card-call-to-action .card-body .card-text {
    color: var(--collaboration-website-color-card-header-text);
}

.uu-block-link.card-call-to-action .card-body a:hover {
    background-color: transparent;
    filter: invert(0.2);
}

.card-call-to-action:hover,
.card-call-to-action:hover a {
    background-color: transparent;
}

.process-horizontal a.env-collapse-header {
    color: var(--color-text);
}

/* Puff event */

.puff-event .event-date {
    background-color: var(--color-white)
}

.puff-event:hover {
    background-color: var(--color-white);
}

.puff-event:hover a {
    background-color: var(--color-white);
}

/* Filter */

.button-filter {
    background-color: var(--collaboration-website-color-card-header-background);
    border: 3px solid var(--collaboration-website-color-card-header-background);
    color: var(--collaboration-website-color-card-header-text);
}

/* Buttons */

.env-button.env-button--primary {
    background-color: var(--collaboration-website-color-card-header-background);
    border: 3px solid var(--collaboration-website-color-card-header-background);
    color: var(--collaboration-website-color-card-header-text);
}

.env-button.env-button--primary:hover {
    background-color: var(--color-button-hover);
    border-color: var(--color-button-hover);
    color: #fff;
}