// region Offer banners
.serviceguide_offerbanner {
  display: block;
  height: 70px;
  background-image: linear-gradient(to bottom, lighten(@buttoncolor, 20), @buttoncolor);
  color: contrast(@buttoncolor, black, white);
  line-height: 70px;
  border: 1px solid @buttoncolor;

  img.xsp_logo {
	margin: 15px;
	float: left;
  }
}

// endregion

.servicelist {
  margin-bottom: 40px;
}


// region Compare services
#compare_services {
  position: fixed;
  left: 50%;
  margin-left: -210px;
  bottom: 50px;
  width: 400px;
  padding: 20px;
  color: contrast(@highlightcolor, black, white);
  background-color: @highlightcolor;
  z-index: 5;

  .nr {
	line-height: 30px;
	font-size: 1.6rem;
	font-weight: bold;
  }
}

// endregion

// region XSP banner/footer etc


.xsp_footer {
  padding: 20px;
  display: flex;
  flex-flow: row;

  .supportinfo {
	flex: 1 0 auto;
	width: 33%;
	line-height: 1.5em;

	h3 {
	  font-size: 1.2rem;
	  margin-bottom: 0.5rem;
	}
  }
}

.xspgrouphead {
  height: 120px;
  display: block;
  width: 100%;
  overflow: hidden;
  background-color: @highlightcolor;
  background-image: url(/media/modules/servicecategoryimages/backdrop.png);
  background-repeat: no-repeat;
  background-position: right top;

  > img.xsplogo {
	float: left;
	margin: 20px 10px 20px 20px;
  }

  > h2 {
	line-height: 70px;
	margin-left: 10px;
	font-size: 1.2rem;
	display: inline-block;
  }

  > .paragraph {
	line-height: 70px;
	margin-left: 10px;
  }
}

div.xsp_offer {
  border: 2px solid @highlightcolor;
  overflow: auto;
  margin-bottom: 20px;

  .cinfo {
	background-color: @highlightcolor;
	padding: 0.5em;
	text-align: center;
	text-transform: capitalize;
  }

  .innehall {
	padding: 20px;
	margin: 0px;
	overflow: auto;
  }

  h3 {
	color: inherit;
  }

  .offer_banner {
	border-bottom: 2px solid @backgroundcolor;
  }

  .servicelist {
	background-color: @backgroundcolor !important;
  }
}

// endregion

// region Channels


.channel_keyword {
  cursor: pointer;
  background-color: @backgroundaccentcolor;
  color: @textaccentcolor;
  padding: 5px 8px;
  display: inline-block;
  margin: 2px;

  &.selected {
	background-color: @highlightcolor !important;
	color: contrast(@highlightcolor, black, white);
  }
}


.channel_icons {
  display: flex;
  flex-flow: wrap;

  .channel_icon {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 5px;
	padding: 10px;
	width: 90px;
	height: 40px;
	background-size: contain;
	background-origin: content-box;
	background-repeat: no-repeat;
	background-position: center center;
	border: 2px solid transparent;

	&.selected {
	  border: 2px solid @highlightcolor;
	}
  }
}

#allchannels {
  display: none;
}

.service_num_channels {
  font-weight: 500;
}

// endregion


.pagehead {
  h2 {
	font-size: 1.3rem !important;
	//font-weight: bold !important;
  }

  padding: 1rem;
  //background-color: @backgroundaccentcolor;
  width: auto;

  .subline {
	color: contrast(@backgroundaccentcolor, black, white);
  }
}

.contact_info {
  border: 2px solid desaturate(@backgroundaccentcolor, 30);
  overflow: auto;

  .innehall {
	padding: 20px;
	overflow: auto;
  }
}


.service_name {
  display: block;
  font-size: 2.5rem;
  //font-weight: bold;
}


.service_logo {
  margin: 5px;
}

span.catname {
  &:last-child {
	margin-left: 0 !important;
  }
}


.service_offer {
  display: block;
  margin-bottom: 10px;
}


.badge {
  margin-left: auto;
  order: 2;
  overflow: hidden;
}

.prices {
  flex-flow: column;
  flex: 1 0 auto;
}

.service_price {
  padding: 10px 2px;
}

.service_onetime {
  padding: 10px 6px;
  text-align: center;
  min-width: 100px;
  flex: 1 0 100px;
}

.service_compare {
  padding: 10px 6px;
  text-align: center;
  min-width: 100px;
  flex: 1 0 100px;
  background-color: #feedad;
}

.service_price_details {
  display: flex;
  flex-flow: row;
  justify-content: center;
}

a.tooltip.cartlink {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: @buttonactivecolor;
  color: @buttonactivetextcolor;
  min-width: 50px;
  min-height: 50px;
  font-size: 1.5rem;
  font-weight: 700;
  transition: background-color 500ms;

  img.icon_in_cart {
	display: none;
  }

  &:hover {
	background-color: @buttoncolor;
	color: @buttontextcolor;
  }
}


div.service_price_container {
  display: flex;
  flex: 1 0 auto;
  background-color: @backgroundaccentcolor;
  justify-content: center;

  .service_price {
	align-self: center;
  }
}

.channels {
  order: 3;
}

.item_added {
  background-color: #2ecc56;
}

.service_head {
  .service_name {
	margin-left: 0;
	line-height: 2.7rem;
  }
}

.fixed_top {
  position: fixed;
  width: 100%;
  max-width: 940px;
  top: 0;
  z-index: 1000000;
}


#cart_count {
  position: relative;
  display: inline-block;

  > div {
	&:last-of-type {
	  justify-content: center;
	  align-items: center;
	  background: #2ecc56 !important;
	  color: #ffffff !important;
	  font-weight: bold;
	  border: 3px solid #ffffff;
	  font-size: 1rem;
	  width: 25px;
	  height: 25px;
	  border-radius: 50%;
	}
  }
}

.flex {
  display: flex;
}

.search_address {
  > .gridlist_content {
	> .shorttext {
	  width: 100%;
	  margin-right: unset;
	}
  }
}

#serviceguide_search {
  width: 100%;
}

.streetname {
  text-transform: capitalize;
}

.search_result_row {
  &:hover {
	background-color: @backgroundaccentcolor;
  }
}

.search_results {
  transition: height 500ms;
  background-color: white;
  padding: 0.5rem;
  box-shadow: 0.01rem 0.02rem 0.3rem rgba(0, 0, 0, .5);
  margin-top: 0.5rem;
  max-height: 15rem;
  overflow-y: scroll;
  z-index: 2000;
  cursor: pointer;

  .headers {
	width: 100%;
	display: grid;
	grid-template-columns: 2fr 1fr 1.4fr repeat(2, 1fr);
	font-weight: bold;
  }

  .search_result {
	width: 100%;
  }

  .search_result_row {
	width: 100%;
	display: grid;
	grid-template-columns: 2fr 1fr 1.4fr repeat(2, 1fr);
	background-color: white;
	padding: 0.3rem;
  }
}

.module_application_navigation {
  padding-top: 20px;
  margin-top: -20px;
  //background-color: @backgroundcolor;
}

//div.app_navigation_top {
//  #app_navigation_parts {
//	background-color: @backgroundcolor;
//	padding: 0;
//
//	li {
//	  background-color: @backgroundcolor;
//	  padding: 0 5px;
//
//	  div.text {
//		padding: 0;
//	  }
//
//	  a {
//		font-weight: 600;
//	  	//line-height: 2.5em;
//		font-size: 1.3em;
//	  }
//	}
//
//	li.marked {
//	  background-color: @backgroundaccentcolor;
//	  padding: 0 20px;
//
//	  div.text {
//		a {
//		  color: @textcolor !important;
//		}
//	  }
//	}
//  }
//
//  #app_navigation {
//	background-color: @backgroundaccentcolor;
//	padding: 0.5em 0 8 0;
//	flex-flow: row wrap;
//
//	a.navitem {
//	  border: 1px solid transparent;
//	  margin: 0 2px;
//
//	  div.navitem_container {
//		div.nav_text {
//		  color: @textcolor;
//		  font-size: 1.2em;
//		  font-weight: 600 !important;
//		  line-height: 2.5em;
//		  padding: 0px 10px;
//		}
//	  }
//
//	  &:hover {
//		div.nav_text {
//		  color: contrast(@highlightcolor, black, white) !important;
//		}
//	  }
//	}
//
//	a.navitem.marked {
//	  div.nav_text {
//		color: contrast(@highlightcolor, black, white) !important;
//	  }
//	}
//  }
//}

form {
  div.filter {
	.filter_part {
	  flex: 1 1 auto;
	}
  }
}

.xsp_grouping {
  display: flex;
  align-items: center;
  width: 100%;
  overflow: hidden;
  margin: 20px 0 0 0;
  color: @textcolor;
  background-color: @backgroundaccentcolor;
  padding: 0;

  .xsp_logotype {
	flex: 0 120px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 120px;
	height: 120px;
	//border-right: 1px solid darken(@buttoncolor, 20);

	img {
	  margin: 20px;
	  box-sizing: border-box;
	}

	.service_count {
	  position: absolute;
	  bottom: 0px;
	  left: 0px;
	  right: 0px;
	  margin: 10px;
	  background-color: @backgroundcolor;
	  corner: 3px;
	  text-align: center;
	  font-size: 11px;
	  font-weight: bold;
	  text-transform: uppercase;
	  letter-spacing: 0.2em;
	}
  }

  .xsp_banner {
	flex: 1;
	background-size: cover;
	background-position: right;
	height: 120px;

	.xsp_name {
	  font-size: 40px;
	  line-height: 120px;
	  padding-left: 40px;
	}
  }

  .xsp_banner.newbanner {
	background-position: right;
  }
}

.xsp_offer {
  .logo {
	margin-right: 20px;
	margin-bottom: 10px;
	height: 120px;
	float: right;
  }
}

.infopart {
  > a {
	color: @linkcolor !important;
  }

  .toggle_icon {
	float: left;
	padding-right: 15px;
  }
}

.service_image {
  margin: 0 0 20px 20px;
}

// region Service row

.servicelist_xsp {
  .service_row {
	border-top: 1px solid darken(@backgroundaccentcolor, 20);
	overflow: auto;
	border-top-width: 0px;

	&:first-child {
	  border-top: none;
	}

	.price_rows {
	  margin-left: 120px;
	  border: none;
	}

	.service_logotype {
	  width: 60px;
	  padding: 0 25px;
	}
  }
}

div.service_row {

  border-bottom: 2px solid #ccc;
  margin-bottom: 10px;
  display: grid;
  gap: 10px 10px;
  padding: 10px;
  background-color: @backgroundaccentcolor;
  border-bottom: none;
  border-top: none;
  grid-template-columns: 120px auto;
  grid-template-rows: auto;
  grid-template-areas: "logo name" "logo extra" "logo prices";

  .service_head {
	padding: 25px 10px 10px;
	border: none !important;
	display: flex;
	flex-flow: row;
	align-items: center;

	.service_logotype {
	  margin-right: 20px;
	  width: 60px;
	}

	.service_headline {
	  font-size: 24px;
	  line-height: 30px;
	  //font-weight: bold;
	  margin-right: 20px;
	}

	.service_subline {
	  font-size: 14px;
	  line-height: 15px;
	}
  }

  .price_row {
	border: 0px solid darken(@backgroundaccentcolor, 20);
	overflow: auto;
	border-top-width: 0;
	padding: 0;
	margin: 20px 0 10px;


	&:first-child {
	  border-top-width: 0;
	}

	.comparecheck {
	  float: left;
	  margin-right: 15px;
	}

	.price_headline {
	  font-size: 20px;
	  margin-bottom: 15px;
	  font-weight: bold;

	  .offer_value {
		font-weight: normal;
		font-size: 14px;
		color: @textaccentcolor;
	  }
	}

	a.cartlink {
	  color: @buttonactivetextcolor;
	  background-color: @buttonactivecolor;
	  font-size: 16px;
	  line-height: 40px;
	  min-width: 7rem;
	  padding: 0 1rem;
	  border-radius: 4px;
	  display: flex;
	  gap: 0.5rem;
	  justify-content: center;
	  align-items: center;
	  border-bottom-width: 0px;
	  float: none;

	  &:hover {
		color: @buttontextcolor;
		background-color: @buttoncolor;
	  }
	}

	a.cartlink.incart {
	  color: contrast(green, black, white);
	  background-color: green;
	}

	.info_squares {
	  font-size: 0.8rem;
	  display: flex;
	  justify-content: space-between;
	  flex-flow: row;
	  line-height: 1.5rem;
	  overflow: hidden;

	  .info_square {
		float: left;
		min-width: 70px;
		padding-right: 10px;
		flex: 1 1 auto;

		.value {
		  font-weight: bold;
		  font-size: 1.1em;
		}
	  }

	  .info_square.pricebutton {
		text-align: center;

		.warning {
		  display: block;
		  line-height: 1rem;
		  margin-top: 0.5rem;
		}
	  }
	}
  }

  &:nth-of-type(1) {
	border-top-width: 0px !important;
  }

  span.highlight {
	padding: 0 0.2em;
	border-radius: 5px;
	margin-right: 0.5em;
  }

  .service_logotype {
	grid-area: logo;
	place-self: self-start;
	background-color: white;
	border-radius: 10px;
	padding: 0 !important;
	width: 100% !important;

	img {
	  padding: 15px;
	  box-sizing: border-box;
	}
  }

  .service_xspname {
	grid-area: xsp;
	font-weight: bold;
  }

  h2 {
	grid-area: name;
	text-align: left !important;
	//font-weight: bold;
  }

  .service_subline {
	grid-area: extra;
  }

  .price_rows {
	grid-area: prices;
	margin: 0 !important;
  }
}

// endregion
#tg_navigation {
  .tg_top {
	#cartinfo {
	  text-align: right;
	  width: 33.333%;
	  position: relative;
	  flex-flow: row;
	  display: flex;
	  justify-content: flex-end;
	  align-items: center;
	}
  }
}

#cart_counter {
  display: flex;
  opacity: 1;
  justify-content: center;
  align-items: center;
  background: @highlightcolor;
  color: white !important;
  font-weight: 800;
  text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.8);
  border: 3px solid #ffffff;
  font-size: 1.5rem;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  font-family: Proxima Nova, sans-serif;
}

#cart_counter.hidden {
  opacity: 0;
}

#target_nav {
  max-width: 600px;
  margin: 0 auto;

  h3 {
	line-height: 3em;
	text-align: center;
  }

  .thumbnails {
	.thumbnail {
	  corner: 10px;
	  background-color: @buttoncolor;
	  border: 3px solid darken(@buttoncolor, 10);

	  figure {
		margin: 20px;
	  }

	  &:hover {
		background-color: @buttoncolor;
		border: 3px solid darken(@buttonactivecolor, 10);
		color: @textcolor !important;
	  }
	}

	.thumbnail.marked {
	  background-color: @buttoncolor;
	  border: 3px solid darken(@buttonactivecolor, 10);
	  color: @textcolor !important;
	}
  }
}

//div.service_row.whitetext {
//  color: white;
//
//  a {
//	color: white;
//	border-bottom: 1px dotted white;
//  }
//
//  span.highlight {
//	background-color: white;
//	color: black !important;
//  }
//}
//
//div.service_row.blacktext {
//  color: black;
//
//  a {
//	color: black;
//	border-bottom: 1px dotted black;
//  }
//
//  span.highlight {
//	background-color: black;
//	color: white !important;
//  }
//}

#service_filters {
  #filterform {
	ol {
	  display: flex;
	  flex-flow: row wrap;
	  gap: 5px;

	  li {
		flex: 1 1 40%;
		box-sizing: border-box;
		background-color: @backgroundaccentcolor;
	  }
	}
  }
}

.serviceguide_navigation_container {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  align-content: stretch;
  margin-bottom: 0.3em;
  gap: 0.3rem;

  > a {
	flex: 1 1 !important;
	display: flex;
	flex-flow: column;
	align-items: center;

	img, svg {
	  margin-bottom: 0.5rem;
	}

	text-align: center;
	background-color: @backgroundaccentcolor;
	color: contrast(@backgroundaccentcolor, black, white);
	padding: 1rem 0.5rem;
	//line-height: 4rem !important;

	&:hover, &.marked {
	  background-color: @highlightcolor;
	  color: contrast(@highlightcolor, black, white);
	}
  }

  > a#target_navlink {
	font-weight: bold;
	background-color: @buttoncolor;
	color: contrast(@buttoncolor, black, white);
  }

  > div.buttonwrapper, > form {
	margin-left: auto;
	justify-content: space-between;

	input {
	  border-color: transparent !important;
	}
  }

  > a#cart_link {
	background-color: @buttoncolor;
	color: contrast(@buttoncolor, black, white);
	margin-left: auto;
	white-space: nowrap;
  }
}

.serviceguide_navigation_container.targets {
  justify-content: start;
  flex-flow: row;

  > a {
	//line-height: 2.5rem !important;
	flex: 0 1 !important;
	//font-size: 1.2rem;
	padding: 1rem;
	//background-color: transparent;
  }
}

.bigcategory {
  margin-top: 1rem;
  background-size: cover;
  background-position: center center;
  height: 150px;
  padding: 2rem;
  display: flex;
  flex-flow: column;
  justify-content: end;
  position: relative;
  z-index: 1;

  &::before {
	content: "";
	background-image: inherit;
	background-size: inherit;
	background-position: inherit;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	display: block;
	z-index: -1;
  }

  .info {
	h2 {
	  color: inherit;
	  font-size: 2rem;
	  line-height: 2.5rem;
	}

	.subline {
	  color: inherit;
	  font-size: 1rem;
	  line-height: 1.2rem;
	}
  }
}

.bigcategory.darken {
  &::before {
	filter: brightness(0.5);
  }
}

.bigcategory.lighten {
  &::before {
	filter: ~"contrast(50%)" brightness(1.5);
  }
}

@media screen and (max-width: 600px) {
  .xsp_grouping {
	.xsp_logotype {
	  flex: 0 70px !important;
	  width: 70px !important;
	  height: 70px !important;
	}

	.xsp_banner {
	  height: 70px !important;

	  .xsp_name {
		line-height: 70px !important;
		font-size: 25px !important;
		padding-left: 25px !important;
	  }
	}
  }

  #tg_navigation {
	.tg_top {
	  flex-flow: row wrap;

	  > a {
		width: 40%;
		padding: 0 10px;
	  }

	  #mypages_nav {
		order: 2;
		text-align: right;
	  }

	  #target_navlink {
		order: 1;
		text-align: left;
	  }

	  #cartinfo {
		order: 3;
		with: 100%;
		background-color: @buttoncolor;
		corner: 2px;
		padding: 0;
		text-align: center;
	  }
	}
  }

  div.service_row {
	grid-template-columns: auto;
	grid-template-areas: "logo" "name" "extra" "prices";

	h2 {
	  //font-weight: bold;
	}

	.price_rows {
	  padding-left: 0;

	  .price_row {
		.info_squares {
		  flex-flow: column;

		  .info_square {
			flex: 1 100%;
			width: 100%;
			min-width: 100%;
			display: flex;

			.key {
			  flex: 1 50%;
			}

			.value {
			  flex: 1 50%;
			}
		  }
		}
	  }
	}

	.service_logotype {
	  display: flex;
	  align-items: center;

	  img {
		padding: 15px 5px;
		width: 150px;
		margin: 0 auto;
	  }
	}
  }

  .serviceguide_navigation_container {
	flex-flow: row wrap;

	a#target_navlink {
	  flex: 0 100%;
	}

	a#cart_link {
	  margin-left: inherit;
	}

	> div.buttonwrapper, > form {
	  margin-left: inherit;
	  width: 100%;
	  justify-content: flex-end;
	}
  }

  .serviceguide_navigation_container.targets {
	flex-flow: row wrap;
	justify-content: initial;

	> a {
	  flex: 1 1 !important;
	}
  }

  #service_filters {
	#filterform {
	  ol {
		flex-flow: column;

		li {
		  flex: 1;
		  box-sizing: border-box;
		  background-color: @backgroundaccentcolor;
		}
	  }
	}
  }
}

@media screen and (max-width: 768px) {
  .xsp_grouping {
	.xsp_banner {
	  height: 80px;
	}

	.xsp_logotype {
	  width: 80px;
	  height: 80px;
	  flex: 0 80px;
	}
  }
}

@media only screen and (max-width: 600px) {
  .xsp_grouping {
	.xsp_logotype {
	  img {
		max-width: 50px;
		height: auto;
	  }
	}
  }

  div.gridlist {
	.prio2 {
	  max-width: none !important;
	}
  }

  div.gridlist_item.prio3 {
	flex: 1 1 100% !important;
  }

  div.gridlist_item.prio1 {
	> .gridlist_content {
	  height: auto;
	}
  }

  div.service_row {
	.service_head {
	  flex-flow: row wrap;

	  .service_logotype {
		margin-bottom: 4px;
		width: 100%;
	  }
	}

	.price_rows {
	  padding-left: 1rem;

	  .price_row {
		display: flex;
		flex-flow: column;
		padding: 0;

		.info_squares {
		  flex-flow: column;
		  order: 0;

		  .info_square {
			flex: 1;
			box-sizing: border-box;
		  }
		}

		.info_square.pricebutton {
		  order: 1;
		  display: flex;
		  flex-flow: column;
		  flex: 1 0 60%;
		  align-self: flex-end;
		  justify-self: flex-end;
		  justify-content: center;
		  align-items: center;
		  margin: 1rem 0.5rem 1rem auto;
		  margin-bottom: 0;
		  width: 60%;
		  max-width: 60%;
		  padding: 0.5em;

		  .warning {
			margin-top: 1rem;
			line-height: 0.9em;
		  }
		}
	  }
	}

	.price_row {
	  .price_headline {
		line-height: 1.2em;

		.offer_value {
		  width: 100%;
		  display: block;
		}
	  }
	}
  }

  .servicelist_xsp {
	.service_row {
	  .price_rows {
		margin-left: 0;
	  }
	}
  }

  #appnav_mobile_parts {
	li {
	  list-style-type: none;
	}
  }

  #appnav_mobile_views {
	li {
	  list-style-type: none;
	}
  }

  .xsp_footer {
	flex-flow: column !important;
	align-items: center;

	.xsp_logo {
	  width: 200px !important;
	  height: auto;
	}

	.supportinfo {
	  width: 80% !important;
	  padding: 20px;
	  //font-size: 1.3rem;
	}
  }
}
