/*
	Abstracts are helpers, variables and functions
	for scss compliation.
*/
/*
	@TODO: Add to theme: new division fix for updated sass package.
*/
/**==================================================================================================================================
BREAKPOINT
@TODO: remove? What is use case?? either use simple global points or write custom line. why does first breakpoint have to be 0?
 ==================================================================================================================================*/
/**==================================================================================================================================
BREAKPOINT ENDS
==================================================================================================================================*/
span.edit-link {
  display: inline-block;
  background-color: yellow;
  font-weight: 700;
  position: fixed;
  left: 0;
  bottom: 3.125rem;
  transform: translateX(-45px);
  transition: all 0.2s;
}

span.edit-link a {
  display: block;
  padding: 0.9375rem;
}

span.edit-link:hover {
  transform: translateX(0);
}

/*
	Variables for compliation
	NB! Colors should be added to base/config file as css root variable.
*/
/**
 * Block section background colors.
 * Include the background options ACF fields group to use these.
 */
/*
 * makes ul/ol as a dropdown select (normaly in mobile)
 * Structure: div > title > list > li > a
*/
/*
	Variables for legacy dc plugins
*/
section.text-and-image {
  --background-color: var(--color__warm-white);
  --background-color-grey: var(--color__greige);
  --text-color: var(--color__dark-grey, #000);
  --accent-color: var(--color__dark-grey, #000);
  --border-color: var(--color__light-grey, #cccacb);
}

section.text-and-image.image-left {
  background-color: var(--background-color-grey);
  margin: 0 auto;
}

section.text-and-image.image-left + section.image-cta {
  margin: 0 auto var(--spacing-block) !important;
}

section.text-and-image.image-left .block-section-wrapper {
  margin: 0 auto;
  padding: var(--spacing-block) 0;
}

section.text-and-image .block-section-wrapper {
  display: flex;
  gap: var(--column-gap-large);
}

@media screen and (max-width: 1460px) {
  section.text-and-image .block-section-wrapper {
    gap: var(--column-gap);
  }
}
@media screen and (max-width: 1210px) {
  section.text-and-image .block-section-wrapper {
    flex-direction: column;
    gap: calc(var(--spacing-content) + 10px);
  }
}
section.text-and-image .block-section-wrapper .text-and-image__content {
  flex: 1;
  color: var(--text-color);
}

section.text-and-image .block-section-wrapper .text-and-image__content .text-and-image__category::before {
  background-color: var(--accent-color);
}

section.text-and-image .block-section-wrapper .text-and-image__content .text-and-image__header {
  margin: 0 0 var(--spacing-content);
  font-weight: 300;
  text-wrap: pretty;
}

section.text-and-image .block-section-wrapper .text-and-image__content .text-and-image__paragraph {
  font-weight: 300;
  text-wrap: pretty;
}

section.text-and-image .block-section-wrapper .text-and-image__content .text-and-image__paragraph p {
  margin: 0 0 var(--spacing-content-small);
}

section.text-and-image .block-section-wrapper .text-and-image__content .text-and-image__paragraph p:last-of-type {
  margin: 0 0 var(--spacing-content);
}

section.text-and-image .block-section-wrapper .text-and-image__content .text-and-image__link-button {
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
}

section.text-and-image .block-section-wrapper .text-and-image__content .numbers-header {
  margin-bottom: 1.25rem;
  font-weight: 400;
}

section.text-and-image .block-section-wrapper .text-and-image__content .number-display-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
}

section.text-and-image .block-section-wrapper .text-and-image__content .number-display-container .number-display-item {
  border-left: 1px solid var(--border-color);
  flex: 1 1 0;
  padding: 1rem 1.25rem;
}

section.text-and-image .block-section-wrapper .text-and-image__content .number-display-container .number-display-item .number-display-value {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 300;
}

section.text-and-image .block-section-wrapper .text-and-image__content .number-display-container .number-display-item .number-display-value span {
  font-size: 1.25rem;
}

section.text-and-image .block-section-wrapper .text-and-image__content .number-display-container .number-display-item .number-display-text {
  font-size: 1.25rem;
  font-weight: 300;
}

section.text-and-image .media-container {
  flex: 1;
}

section.text-and-image .media-container .text-and-image__image,
section.text-and-image .media-container .section-video {
  height: 100%;
  width: 100%;
  max-height: 720px;
  max-width: 580px;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: right;
     object-position: right;
  -webkit-clip-path: polygon(2.5rem 0, 100% 0, 100% calc(100% - 3.845rem), calc(100% - 2.5rem) 100%, 0 100%, 0 3.845rem);
          clip-path: polygon(2.5rem 0, 100% 0, 100% calc(100% - 3.845rem), calc(100% - 2.5rem) 100%, 0 100%, 0 3.845rem);
}

@media screen and (max-width: 1210px) {
  section.text-and-image .media-container .text-and-image__image,
section.text-and-image .media-container .section-video {
    max-height: 100%;
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16/9;
  }
}
section.text-and-image.image-left .block-section-wrapper {
  background-color: var(--background-color-grey);
  flex-direction: row-reverse;
}

@media screen and (max-width: 1210px) {
  section.text-and-image.image-left .block-section-wrapper {
    flex-direction: column;
  }
}
section.text-and-image.image-left .block-section-wrapper .media-container .text-and-image__image,
section.text-and-image.image-left .block-section-wrapper .media-container .section-video {
  -o-object-position: left;
     object-position: left;
  -webkit-clip-path: polygon(2.5rem 0, 100% 0, 100% calc(100% - 3.845rem), calc(100% - 2.5rem) 100%, 0 100%, 0 3.845rem);
          clip-path: polygon(2.5rem 0, 100% 0, 100% calc(100% - 3.845rem), calc(100% - 2.5rem) 100%, 0 100%, 0 3.845rem);
}
