/*
=========================================================
SEARCH CSS
=========================================================
 * Innehåller styling av modulen Sök och Sök Facetterad
 * som är modifierad med exempelvis SVG-ikon
 *
 * Copyright (C) Limepark AB.
 * https://limepark.se/licensvillkor
=========================================================*/


/*
---------------------------------------------------------
Sidhuvud och startsida
--------------------------------------------------------- */

header .sv-searchform-portlet div,
.lp-hello-box .sv-searchform-portlet div,
.lp-search form > div {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  flex-direction: row;
}

header .sv-searchform-portlet input[type='text'],
.lp-hello-box .sv-searchform-portlet input[type='text'],
.lp-search form input[type='text'] {
  border: 1px solid #006b4e;
  border-radius: 27px 0 0 27px;
  border-right: none;
  box-sizing: border-box;
  margin: 0;
  padding: 1.2rem;
  transition: 0.3s;

  -webkit-appearance: none;
  -webkit-box-flex: 1;
  flex: 1 1 auto;
}

header .sv-searchform-portlet input[type='text'] {
  background-color: transparent;
}

.lp-hello-box .sv-searchform-portlet input[type='text'],
.lp-search form input[type='text'] {
  background-color: #fff;
}

header .sv-searchform-portlet input[type='text']:focus,
.lp-hello-box .sv-searchform-portlet input[type='text']:focus,
.lp-search form input[type='text']:focus {
  border: 1px solid #006b4e;
  outline: none;
}

header .sv-searchform-portlet input[type='text']:hover,
header .sv-searchform-portlet input[type='text']:focus {
  background-color: rgba(255,255,255,0.4);
}

.lp-hello-box .sv-searchform-portlet input[type='text']:hover,
.lp-hello-box .sv-searchform-portlet input[type='text']:focus,
.lp-search form input[type='text']:hover,
.lp-search form input[type='text']:focus {
  background-color: rgba(226,223,217,0.5);
}

header .sv-searchform-portlet input[type='text']::-webkit-input-placeholder,
.lp-hello-box .sv-searchform-portlet input[type='text']::-webkit-input-placeholder,
.lp-search form input[type='text']::-webkit-input-placeholder {
  /* Chrome, Firefox, Opera, Safari 10.1+ */
  color: #000;
  opacity: 1; /* Firefox */
}

header .sv-searchform-portlet input[type='text']:-ms-input-placeholder,
.lp-hello-box .sv-searchform-portlet input[type='text']:-ms-input-placeholder,
.lp-search form input[type='text']:-ms-input-placeholder {
  /* Chrome, Firefox, Opera, Safari 10.1+ */
  color: #000;
  opacity: 1; /* Firefox */
}

header .sv-searchform-portlet input[type='text']::-ms-input-placeholder,
.lp-hello-box .sv-searchform-portlet input[type='text']::-ms-input-placeholder,
.lp-search form input[type='text']::-ms-input-placeholder {
  /* Chrome, Firefox, Opera, Safari 10.1+ */
  color: #000;
  opacity: 1; /* Firefox */
}

header .sv-searchform-portlet input[type='text']::placeholder,
.lp-hello-box .sv-searchform-portlet input[type='text']::placeholder,
.lp-search form input[type='text']::placeholder {
  /* Chrome, Firefox, Opera, Safari 10.1+ */
  color: #000;
  opacity: 1; /* Firefox */
}

header .sv-searchform-portlet input[type='text']:-ms-input-placeholder,
.lp-hello-box .sv-searchform-portlet input[type='text']:-ms-input-placeholder,
.lp-search form input[type='text']:-ms-input-placeholder {
  /* Internet Explorer 10-11 */
  color: #000;
}

header .sv-searchform-portlet input[type='text']::-ms-input-placeholder,
.lp-hello-box .sv-searchform-portlet input[type='text']::-ms-input-placeholder,
.lp-search form input[type='text']::-ms-input-placeholder {
  /* Microsoft Edge */
  color: #000;
}

/* Sökruta - Knapp */
header .sv-searchform-portlet button,
.lp-hello-box .sv-searchform-portlet button,
.lp-search form button {
  background: transparent;
  border: 1px solid #006b4e;
  border-left: none;
  border-radius: 0 27px 27px 0;
  color: #000;
  font-size: 2.4rem;
  margin: 0;
  padding: 0.5rem 2rem;
}

header .sv-searchform-portlet input[type='text']:hover + button,
.lp-hello-box .sv-searchform-portlet input[type='text']:hover + button,
.lp-search form input[type='text']:hover + button {
  background-color: rgba(226,223,217,0.5);
}

header .sv-searchform-portlet input[type='text']:focus + button,
.lp-hello-box .sv-searchform-portlet input[type='text']:focus + button,
.lp-search form input[type='text']:focus + button {
  background: #006b4e;
  color: #fff;
}


/*
---------------------------------------------------------
SÖK + Sök facetterad
--------------------------------------------------------- */

.lp-search form {
  margin: 0 0 3rem;
}

/* Facetter */
.lp-search .lp-facets {
  margin: 1rem 0 0;
}

.lp-search .lp-facet-sort,
.lp-search .lp-facet-field {
  display: inline-block;
  margin: 0 1rem 0 0;
}

.lp-search .lp-facets h2 {
  font-size: 1.4rem;
  font-weight: bold;
  margin: 0.5rem 0;
}

.lp-search .lp-facets ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.lp-search .lp-facets li {
  display: inline-block;
  margin: 0 0.4rem 1rem 0;
}

.lp-search .lp-facets a,
.lp-search .lp-facets span {
  border: 1px solid #ccc;
  display: inline-block;
  font-size: 1.2rem;
  line-height: 1.4;
  padding: 0.5rem 1rem;
  text-decoration: none;
}

.lp-search .lp-facets a:hover {
  background: #ccc;
}

.lp-search .lp-facets span {
  color: #888;
  font-style: italic;
}

.lp-search .lp-sort-active,
.lp-search .lp-facet-selected a {
  background: #ccc;
  color: #000;
}

.lp-search .lp-facets .lp-icon {
  height: 1.2rem;
  margin: 0 0.5rem 0 0;
  width: 1.2rem;
}


/* Sökresultat */
.lp-search .sv-search-result li {
  padding: 1rem !important;
}

.lp-search .sv-search-result li:nth-child(odd) {
  background: #f5f5f5;
}

.lp-search .sv-search-result li div:last-child span:last-child a:first-child {
  display: none;
}
