/* Spinners, contact card lists, and select controls. */

/*--------------------------------------------------------------
# Spinner
--------------------------------------------------------------*/

.cimcorp-spinner,
.cimcorp-spinner div {
  box-sizing: border-box;
}

.cimcorp-spinner {
  @apply text-accent;

  display: block;
  position: relative;
  width: 2.5rem;
  height: 2.5rem;

  div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 2.5rem;
    height: 2.5rem;
    border: 0.25rem solid currentcolor;
    border-radius: 50%;
    animation: spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: currentcolor transparent transparent;

    &:nth-child(1) {
      animation-delay: -0.45s;
    }

    &:nth-child(2) {
      animation-delay: -0.3s;
    }

    &:nth-child(3) {
      animation-delay: -0.15s;
    }
  }
}
@keyframes spinner {

  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/*--------------------------------------------------------------
# Contact Card List
--------------------------------------------------------------*/

.js-contact-results {

  ul {

    li.type-cim_contact + li.type-cim_location,
    li.type-cim_location + li.type-cim_contact {
       grid-column: 1;
    }
  }
}

:root :where(.wp-block-button.is-style-arrow-link-read-more-underline .wp-block-button__link) {
    background-color: transparent !important;
    border-width: 0;
    color: var(--wp--preset--color--rich-black);
    text-align: left;
    font-size: var(--wp--preset--font-size--large);
    font-weight: 400;
    letter-spacing: 0;
    padding-top: 0;
    padding-right: 0;
    padding-bottom: 0;
    padding-left: 0;
    text-transform: none;
}

/*--------------------------------------------------------------
# Select
--------------------------------------------------------------*/

.wp-element-select,
.ginput_container_select {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 12rem;
  gap: 0.5rem;

  label {
    font-size: var(--wp--preset--font-size--small);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
  }

  select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--wp--preset--color--rich-black);
    border-radius: 0.25rem;
    background-color: #fff;
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0.75 0.75 L5 5.25 L9.25 0.75' fill='none' stroke='%23121212' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.625rem;
    padding: 1.25rem 2.5rem 1.25rem 1.25rem;
    line-height: 1.2;
    font-size: var(--wp--preset--font-size--lg);
    font-family: inherit;
    color: var(--wp--preset--color--rich-black);
    cursor: pointer;
    transition: border-color 0.15s cubic-bezier(0.4,0,0.2,1);
  }
}
@media (max-width: 600px) {

  .wp-element-select {
    min-width: 0;
  }

  .wp-element-select select {
    width: 100%;
  }
}

.pll-switcher-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0.75 0.75 L5 5.25 L9.25 0.75' fill='none' stroke='%23121212' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0 center;
  background-size: 0.625rem;
  padding: 0.1875rem 0.8rem 0.1875rem 0.25rem;
  line-height: 1.3;
  font-size: var(--wp--preset--font-size--lg);
  font-family: inherit;
  color: var(--wp--preset--color--rich-black);
  cursor: pointer;
  border: none;
  font-weight: 700;
  letter-spacing: 0.0625rem;
  text-transform: uppercase;
  font-size: var(--wp--preset--font-size--small);

  &:focus-visible {
    outline: none;
  }

  &:hover,
  body.is-tabbing &:focus-visible {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0.75 5.25 L5 0.75 L9.25 5.25' fill='none' stroke='%23121212' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  }

  body.is-tabbing &:focus-visible {
    outline: 0.125rem solid #000;
    outline-offset: 0.25rem;
  }

  option {
    text-transform: none;
  }
}

.wp-block-polylang-language-switcher {
  position: relative;

  &::before {
    --underline-color: currentColor;
    --underline-offset: 90%;
    --underline-height: clamp(1px, 0.0625em, 2px);
    content: ' ';
    position: absolute;
    bottom: 0;
    left: 0.25rem;
    right: 0.25rem;
    display: block;
    width: calc(100% - 0.25rem);
    height: 2px;
    text-decoration: none;
    background-image: linear-gradient(
      transparent calc(100% - var(--underline-height)),
      var(--underline-color) var(--underline-height)
    );
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size var(--underline-duration, 450ms) cubic-bezier(0.22, 1, 0.36, 1) 100ms;
    background-size: 0% var(--underline-offset) !important;
    transform: translateY(0.0625rem);
  }

  &:hover {

    &::before {
      background-size: 99% var(--underline-offset) !important;
    }
  }
}
