/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

    This file contains rules for
    LAYOUT
    that implement the UU design system specifically for Sitevision

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

@media print {
    .layout-header {
        border-bottom: none;
    }
}

/* Overflow-x hidden is added to designsystemet to handle full width backgrounds (.is-bg-fullwidth)
  but it does not work with sticky TOCs so its reverted here and full width backgrounds are
  redeclared in 04-state.css */
.layout-main {
    overflow-x: visible;
}


/********************************

 Layout for custom modules

********************************/

main .sv-custom-module {
    margin-bottom: 1.5em;
}


/***************************

Layout for header buttons

***************************/


/* Make sitevision buttons in the header navigation display flex */

.layout-header-buttons {
    display: flex;
    justify-content: flex-end;
}

.layout-header-central-left .sv-layout {
    display: flex;
}


@media print {
    .layout-header-central {
        display: block;
    }
}


/* Header rows */

.layout-header .row {
    align-items: center;
}


/* SV adds the class twice, so this is a fix to override the double added style*/

.layout-header .col>.col {
    padding: 0;
}

/***************************

Header Logo

***************************/

/* Mobile and tablet */

.layout-header-logo img {
    margin-left: -.8rem;
    width: 100% !important;
    max-width: 120px !important;
}


/* Specificity targeting due to sv-template-portlet having display: none in print */

@media print {
    .layout-header-logo .sv-image-portlet {
        display: block;
    }
}


/* Desktop */

@media (min-width: 992px) {
    .layout-header-logo img {
        margin-left: -1rem;
        width: 120px !important;
        max-width: 120px;
    }
}


/***************************

Header site structure name

***************************/

.layout-header-name-text a {
    text-decoration: none;
}

.layout-header-name-text a:hover {
    text-decoration: underline;
}

@media screen and (max-width: 991px) {
    .layout-header-name {
        flex-grow: 1;
        max-width: 100%;
    }
}

@media screen and (min-width: 992px) {

    /*This class justify the buttons to the right for Mac Safari*/
    .layout-header-buttons .sv-layout {
        justify-content: flex-end;
    }
}

@media print {
    .layout-header-name {
        display: none;
    }
}


/***************************

BREADCRUMBS

***************************/

/* Breadcrumbs are styled in Designsystemet but we need a small adjustment so the crumbs are not
 scrollable in y axis */
.breadcrumbs {
    overflow-y: hidden;
}


/********************************

LAYOUT FOOTER
Should be added to DS CSS

********************************/

/* This should be changed in the DS CSS but we do it here until DS is updated */
.layout-footer {
    margin-bottom: 0;
}

@media only screen and (min-width: 1400px) {
    .layout-footer .sv-grid-12-columns {
        max-width: 1320px !important;
    }
}

.layout-footer .sv-row:last-child {
    border-top: 1px solid #e5e5e5;
    margin-top: 2em;
    padding: 2em 0 0;
}

.layout-footer .sv-row:last-child p {
    max-width: none;
}

@media print {

    .layout-footer,
    .layout-main footer {
        display: none !important;
    }
}

/* Designsystemet uses a relative path to the image, so we need to override it. We are still using the
   image from the designsystemet, but with a full path. */
.layout-footer-bg-img {
    background-image: url("/gray+alpha_sigill.svg");
    z-index: -2;
}


/********************************

LAYOUT MAIN

********************************/


/* Remove padding for Sitevision grid inside Bootstrap flex column class */

main>.sv-grid-12-columns {
    padding-left: 0;
    padding-right: 0;
}