/*
=========================================================
SMARTPHONE CSS
=========================================================
 * Innehåller styling för smartphones
 *
 * Copyright (C) Limepark AB.
 * https://limepark.se/licensvillkor
=========================================================*/

/*
---------------------------------------------------------
VARIABLER
--------------------------------------------------------- */

html body {
  --lp-grid-default: 1fr;
}

/*
---------------------------------------------------------
FIXAR/FÄRBÄTTRINGAR
---------------------------------------------------------*/

.sv-column-12 .sv-decoration-content :where(.sv-portlet,
.sv-layout, .sv-custom-module):not(:last-child),
.sv-column-12 .pagecontent > :where(.sv-portlet,
.sv-layout, .sv-custom-module):not(:last-child) {
  margin-bottom: var(--lp-spacing);
}

html {
  font-size: 62.5%;
  height: 100%; /* Storlek och position för off canvas */
}


/* Anpassar bilder i nyhetslistningen för mobilläge */
.lp-news-listing.sv-archive-portlet li img {
  float: none;
  padding: 0 0 1rem 0 !important;
}

/* Dölj utskriftslänk i smartphone */
.lp-print-link {
  display: none !important;
}

/* Fix så autocomplete inte kan bli bredare än tillgänglig yta */

.sv-autocomplete-search-result {
  box-sizing: border-box;
  max-width: 95% !important;
}

ul.sv-autocomplete-search-result .sv-autocomplete-result-item {
  box-sizing: border-box;
  padding: 0.3rem 1rem;
}

/* Hoppa direkt till meny-länkar */

.lp-skip-links li a.lp-skip-to-menu-smartphone {
  display: block;
}

.lp-skip-links li a.lp-skip-to-menu-desktop {
  display: none;
}

/*
---------------------------------------------------------
MARGINAL GRID
--------------------------------------------------------- */

.lp-main-grid {
  box-sizing: border-box;
  padding: var(--lp-spacing);
}

/*
---------------------------------------------------------
TABELLER
--------------------------------------------------------- */

.sv-text-portlet-content table[class*='sv-standard'] th,
.sv-text-portlet-content table[class*='sv-standard'] td {
  padding: 1rem 1.7rem;
}

.sv-tablesorter thead th {
  background-position: bottom 50% left 3px;
}

/* Tillåter radbrytning */
div.sv-responsiveTable * {
  white-space: normal !important;
}


/*
---------------------------------------------------------
GRUNDLAYOUT
--------------------------------------------------------- */

.lp-secondary-content,
.lp-submenu {
  margin-top: 0;
}

.lp-main-grid div[class*='sv-column'].lp-submenu {
  margin-bottom: 0;
}

/* Nollar marginaler under kolumner */
.lp-header div[class*='sv-column-'] {
  margin-bottom: 0;
  min-height: 0;
}

/* Justerar så att det inte blir dubbelt avstånd iom marginal under kolumner */
.pagecontent > .sv-layout.sv-row {
  margin-bottom: 0;
}

/* Tar bort avstånd under om det är en 12-kolumnare då det inte är något som staplas */
.sv-row > .sv-column-12 {
  margin-bottom: 0;
}

/* Modulavstånd i innehållsytor (ej textmoduler) */

/* .pagecontent > .sv-portlet,
.pagecontent > .sv-layout,
.pagecontent > .sv-custom-module,
.sv-decoration-content .sv-portlet,
.sv-decoration-content .sv-layout,
.sv-decoration-content .sv-custom-module {
  margin-bottom: var(--lp-spacing-large);
}

.sv-column-12 .pagecontent > .sv-portlet,
.sv-column-12 .pagecontent > .sv-layout,
.sv-column-12 .pagecontent > .sv-custom-module,
.sv-column-12 .sv-decoration-content .sv-portlet,
.sv-column-12 .sv-decoration-content .sv-layout,
.sv-column-12 .sv-decoration-content .sv-custom-module {
  margin-bottom: var(--lp-spacing-x-large);
}

.pagecontent > [class*='lp-max-width'] > .sv-portlet,
.pagecontent > [class*='lp-max-width'] > .sv-layout,
.pagecontent > [class*='lp-max-width'] > .sv-custom-module,
.sv-column-12 [class*='lp-max-width'] .pagecontent > .sv-portlet,
.sv-column-12 [class*='lp-max-width'] .pagecontent > .sv-layout,
.sv-column-12 [class*='lp-max-width'] .pagecontent > .sv-custom-module {
  margin-bottom: var(--lp-spacing-large);
} */

.pagecontent > :where(.sv-portlet, .sv-layout, .sv-custom-module),
.sv-decoration-content :where(.sv-portlet, .sv-layout, .sv-custom-module) {
  margin-bottom: var(--lp-spacing-large);
}

.sv-column-12 .sv-decoration-content :where(.sv-portlet, .sv-layout, .sv-custom-module),
.sv-column-12 .pagecontent > :where(.sv-portlet, .sv-layout, .sv-custom-module) {
  margin-bottom: var(--lp-spacing-xx-large);
}

.sv-column-12 [class*='lp-max-width'] :where(.sv-portlet, .sv-layout, .sv-custom-module),
.pagecontent > [class*='lp-max-width'] > :where(.sv-portlet, .sv-layout, .sv-custom-module) {
  margin-bottom: var(--lp-spacing-large);
}

/*
---------------------------------------------------------
SIDHUVUD
--------------------------------------------------------- */

.lp-header-layout {
  display: flex;

  justify-content: space-between;
}

/*
---------------------------------------------------------
MENY
--------------------------------------------------------- */

.lp-overlay-menu-content {
  grid-template-columns: 100%;
}

.lp-fixed-menu .lp-overlay__close-button {
  --lp-overlay-button__background-color: var(--env-ui-color-brand);
  --lp-overlay-button__background-color--hover: var(--env-ui-color-brand-80);
  --lp-overlay-button__border: 1px solid var(--env-ui-color-brand);
  --lp-overlay-button__border-color--hover: var(--env-ui-color-brand-80);
  --lp-overlay-button__font-color: var(--env-ui-color-brand-contrast);
  --lp-overlay-button__font-color--hover: var(--env-ui-color-brand-80-contrast);
}


/*
---------------------------------------------------------
SIDFOT
--------------------------------------------------------- */

.lp-footer {
  margin: 0;
}

.lp-footer .lp-main-grid .lp-footer--extra > .sv-layout:first-child {
  margin-bottom: var(--lp-spacing-x-large);
  padding-bottom: var(--lp-spacing-x-large);
  padding-right: 0;
}

.lp-footer .lp-main-grid .lp-footer--extra > .sv-layout:last-child {
  margin-bottom: 0;
  padding-left: 0;
}

.lp-footer .lp-main-grid .lp-footer--extra > .sv-layout:first-child:after {
  bottom: 0;
  height: 1px;
  left: calc(-1 * var(--lp-spacing));
  top: initial;
  width: 100vw;
}

.lp-footer .lp-main-grid .lp-footer--extra > .sv-layout {
  flex: initial;
  flex-wrap: wrap;
}

.lp-footer > .sv-layout:has( > .sv-image-portlet) {
  padding: var(--lp-spacing-x-large) var(--lp-spacing) 0;
}

.lp-footer .lp-main-grid .lp-footer--extra > .sv-layout .sv-image-portlet {
  flex-shrink: initial;
}

.lp-footer .lp-main-grid .lp-footer--extra > .sv-layout .sv-image-portlet img {
  max-height: 100% !important;
}

.lp-footer-menu:not(.lp-footer-menu--info) {
  justify-content: flex-start;
}

/*
---------------------------------------------------------
FACETTERAD SÖK
--------------------------------------------------------- */

.lp-search-hits {
  flex-wrap: wrap;
}

.sv-facetedsearch-portlet .lp-search-result {
  width: 100%;

  order: 2;
}

.lp-search-facets {
  margin-left: 0;
  width: 100%;

  order: 1;
}

.lp-search .sv-facetedsearch-portlet form {
  width: 100%;
}

.lp-search-details {
  width: 100%;
}

/*
---------------------------------------------------------
ANPASSNING FÖR FLÖDANDE BILDER
--------------------------------------------------------- */

.pagecontent .sv-image-portlet {
  float: none;
  margin-left: 0;
  margin-right: 0;
  position: static;
}

.lp-float-image-right,
.pagecontent .lp-float-image-right {
  float: none;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  position: static;
}

/*
---------------------------------------------------------
FILTRERBAR LISTNING
--------------------------------------------------------- */

.lp-filterable-list--template-news.lp-filterable-list--include-list-css {
  --lp-filterable-list__box-grid: 1fr;
}

.lp-filterable-list--template-news.lp-filterable-list--include-list-css .lp-filterable-list-item--prioritized-hit,
.lp-filterable-list--template-news.lp-filterable-list--include-list-css .lp-filterable-list-item,
.lp-filterable-list--template-news.lp-filterable-list--include-list-css .lp-filterable-list-list:has(.lp-filterable-list-item--prioritized-hit:first-child + li:not(.lp-filterable-list-item--prioritized-hit)) .lp-filterable-list-item--prioritized-hit {
  grid-column: initial;
}

/*
---------------------------------------------------------
MODULSEKTION
--------------------------------------------------------- */

.lp-modules-section {
  padding: var(--lp-spacing-large) var(--lp-spacing) var(--lp-spacing-large);
}

/*
---------------------------------------------------------
BILD PÅ MODULSIDA
--------------------------------------------------------- */

.lp-text-image-split {
  grid-template-columns: 100%;
}

/*
---------------------------------------------------------
BILDSCROLL
--------------------------------------------------------- */

/* .lp-image-scroll .sv-decoration-content {
  height: 150vh;
}

.lp-image-scroll .sv-image-portlet {
  height: 60vh;
  padding: 2rem;
  position: sticky;
} */

/* stylelint-disable */

/* .lp-image-scroll .sv-image-portlet img {
  animation-range: entry 100vh entry 150vh;
}

@keyframes scroll-image {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(calc(-100% + 60vh - 4rem - 48px));
  }
} */

/* stylelint-enable */

.lp-image-scroll .sv-image-portlet {
  padding: 2rem;
}

div .lp-image-scroll .sv-decoration-content,
div .lp-image-scroll .sv-image-portlet {
  height: auto;
  position: static;
}

div .lp-image-scroll .sv-image-portlet img {
  animation: none;
}

/*
---------------------------------------------------------
KONTAKTSIDA
--------------------------------------------------------- */

/* Övriga adresser */

.lp-adresses {
  grid-template-columns: 1fr;
}

/*
---------------------------------------------------------
100VW & 90VW
--------------------------------------------------------- */

.lp-width-90,
.lp-width-100 {
  grid-template-columns: 100%;
}

/*
---------------------------------------------------------
PUFFAR - HELSIDA SCROLL
--------------------------------------------------------- */

.lp-app-blurbs--helsidascroll .lp-app-blurbs-list__item__inner {
  grid-template-columns: 100vw;
}

.lp-app-blurbs--helsidascroll .lp-app-blurbs-list__item-image {
  height: 40vh;

  grid-column: 1 / -1;
}

.lp-app-blurbs--helsidascroll .lp-app-blurbs-list__item-content {
  height: 60vh;
  padding: var(--lp-spacing-large) var(--lp-spacing);

  grid-column: 1 / -1;
  justify-content: flex-start;
}

html:not(.sv-edit-mode) .lp-app-blurbs--helsidascroll .lp-app-blurbs-list {
  margin-bottom: 25vh;
}

html:not(.sv-edit-mode) .lp-app-blurbs--helsidascroll .lp-app-blurbs-list__item:last-child {
  border-bottom: 0;
}

/* stylelint-disable */
html:not(.sv-edit-mode) .lp-app-blurbs--helsidascroll .lp-app-blurbs-list__item-content {
  animation-range-end: cover 40vh;
  animation-range-start: cover 40vh;
}
/* stylelint-enable */

.lp-app-blurbs--helsidascroll .lp-app-blurbs-list__item-description {
  max-height: 6em;
  overflow: hidden;
  position: relative;
}

.lp-app-blurbs--helsidascroll .lp-app-blurbs-list__item-description:before {
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, var(--lp-body--background) 50%);
  content: '\200C';
  display: block;
  position: absolute;
  right: 0;
  top: 4.5em;
  width: 25%;
  text-align: center;
}

/*
---------------------------------------------------------
PUFFAR - OMDÖMEN
--------------------------------------------------------- */

/* .lp-app-blurbs--omdomen .lp-app-blurbs-list {
  grid-template-columns: 100%;
}

.lp-app-blurbs--omdomen .lp-app-blurbs-list__item,
.lp-app-blurbs--omdomen .lp-app-blurbs-list__item:nth-child(even) {
  margin-bottom: var(--lp-spacing-large);
  margin-top: 0;
}

.lp-app-blurbs--omdomen .lp-app-blurbs-list__item:nth-child(4n+2),
.lp-app-blurbs--omdomen .lp-app-blurbs-list__item:nth-child(4n+3) {
  background-color: var(--lp-color--green-medium);
}

.lp-app-blurbs--omdomen .lp-app-blurbs-list__item:nth-child(2n+1) {
  background-color: var(--lp-color--green-light-hover);
} */


.lp-app-blurbs--omdomen .lp-app-blurbs-list {
  gap: 0 var(--lp-spacing-large);
  columns: 1;
}

.lp-app-blurbs--omdomen .lp-app-blurbs-list__item {
  margin-bottom: var(--lp-spacing-large);
}

/*
---------------------------------------------------------
AKTUELLT
--------------------------------------------------------- */

.lp-news-section {
  padding: var(--lp-spacing) 0;
}

/*
---------------------------------------------------------
FOKUS
--------------------------------------------------------- */

.lp-focus-section > .sv-layout {
  grid-template-columns: 100vw;
  grid-template-rows: 40vh 60vh;
}

html:not(.sv-edit-mode) .lp-focus-section > .sv-layout > *,
.lp-focus-section > .sv-layout > * {
  margin: 0;
  min-height: 0;
}

html:not(.sv-edit-mode) .lp-focus-section > .sv-layout > .sv-image-portlet,
.lp-focus-section > .sv-layout > .sv-image-portlet {
  box-sizing: border-box;
  height: 40vh;
  margin-bottom: 60vh;
  padding: var(--lp-spacing-large) var(--lp-spacing-large) 0;
}

html:not(.sv-edit-mode) .lp-focus-section > .sv-layout > .sv-image-portlet img,
.lp-focus-section > .sv-layout > .sv-image-portlet img {
  height: 100%;
  width: auto;

  object-fit: contain;
}

/* stylelint-disable */
html:not(.sv-edit-mode) .lp-focus-section > .sv-layout > .sv-layout,
.lp-focus-section > .sv-layout > .sv-layout {
  height: 60vh;
  padding: var(--lp-spacing-x-large) var(--lp-spacing-large);
  top: 40vh;

  animation-range-end: cover 60vh;
  animation-range-start: cover 60vh;
  justify-content: start;
  order: 2;
}
/* stylelint-enable */

/*
---------------------------------------------------------
BILDSEKTION
--------------------------------------------------------- */

.lp-image-section > .sv-layout {
  padding: var(--lp-spacing);
}

/*
---------------------------------------------------------
SKRIBENT
--------------------------------------------------------- */

.lp-author__content {
  flex: initial;
}

/* Limepark 25 år */

.lp-footer .lp-footer-grid > .sv-layout:last-child .sv-image-portlet {
  margin-left: initial;
}