/**
 * Contact us: locations and international representatives.
 * Loaded only on Contact and its WPML translations.
 */

.jci-contact-sites {
  padding-bottom: clamp(64px, 6vw, 96px);
}

.jci-contact-sites__grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(40px, 4vw, 72px);
  row-gap: clamp(176px, 12vw, 224px);
}

.jci-contact-sites__grid > .jci-contact-site {
  box-sizing: border-box;
  width: 100% !important;
  max-width: none;
  padding-inline: 0 !important;
}

.jci-contact-location__title {
  margin: 0 0 18px;
  line-height: 1.3;
  text-transform: uppercase;
}

.jci-contact-representatives-section {
  padding-top: clamp(64px, 6vw, 96px) !important;
}

.jci-contact-location__details {
  display: grid;
  gap: 10px;
  font-size: 14px;
  line-height: 1.25;
}

.jci-contact-location__detail {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  column-gap: 8px;
  min-width: 0;
  line-height: 1.25;
}

.jci-contact-location__detail .ico-contact,
.jci-contact-location__detail .jci-social-icon {
  align-self: start;
  width: 18px;
  height: 18px;
  margin: 0.12em 0 0;
  line-height: 18px;
  text-align: center;
}

.jci-contact-location__detail .jci-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #487cff;
  font-size: 18px;
}

.jci-contact-location__detail .jci-social-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  color: inherit !important;
}

.jci-contact-location__detail .jci-social-icon svg[fill]:not([fill="none"]),
.jci-contact-location__detail .jci-social-icon svg [fill]:not([fill="none"]) {
  fill: currentColor !important;
}

.jci-contact-location__detail .jci-social-icon svg[stroke]:not([stroke="none"]),
.jci-contact-location__detail .jci-social-icon svg [stroke]:not([stroke="none"]) {
  stroke: currentColor !important;
}

.jci-contact-location__detail a {
  min-width: 0;
  color: inherit;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.jci-contact-location__detail a:hover,
.jci-contact-location__detail a:focus-visible {
  color: #487cff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.jci-contact-location__detail a:focus-visible,
.jci-contact-representatives .aim-btn:focus-visible {
  outline: 2px solid #487cff;
  outline-offset: 3px;
}

.jci-contact-representatives__intro {
  max-width: 70ch;
  color: #487cff;
}

.jci-contact-representatives__intro :where(p, li, strong, em, a) {
  color: inherit;
}

.jci-contact-representatives__layout {
  box-sizing: border-box;
  overflow: visible;
}

.jci-contact-representatives__layout > .col-12 {
  box-sizing: border-box;
  width: min(91vw, 1600px) !important;
  max-width: none !important;
  padding-inline: 0 !important;
}

.jci-contact-representatives .jci-agent-layout,
.jci-contact-representatives .jci-agent-list-column,
.jci-contact-representatives .jci-agent-map-column,
.jci-contact-representatives .aim-map-wrap {
  min-width: 0;
  position: relative;
}

.jci-contact-representatives .jci-agent-map-column {
  flex: 1 1 0;
}

.jci-contact-representatives .aim-map-wrap > svg {
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
}

.jci-contact-representatives .aim-map-wrap svg :is(path, polygon) {
  transition: fill 150ms ease;
}

.jci-contact-representatives .aim-map-wrap svg :is(path, polygon).jci-has-representative:is(:hover, :focus, .hovered, .active, .jci-map-active) {
  fill: #487cff !important;
}

.jci-contact-representatives .aim-map-wrap svg :is(path, polygon).jci-has-representative {
  cursor: pointer;
}

.jci-contact-representatives .aim-map-wrap svg :is(path, polygon).jci-no-representative {
  pointer-events: none;
  cursor: default;
}

.jci-contact-representatives .jci-agent-card {
  box-sizing: border-box;
  width: clamp(320px, 30vw, 460px);
  max-width: 100%;
  padding-right: 48px;
  overflow-wrap: anywhere;
}

.jci-contact-representatives .jci-agent-card .aim-row > :is(a, span),
.jci-contact-representatives .jci-agent-card a[href^="mailto:"] {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: none;
}

.jci-agent-card__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #07183a;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.jci-agent-card__close:hover {
  color: #487cff;
}

.jci-agent-card__close:focus-visible {
  outline: 2px solid #487cff;
  outline-offset: 2px;
}

.jci-agent-scroll-indicator {
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  width: 100%;
  height: 38px;
  background: linear-gradient(to bottom, rgba(236, 242, 255, 0), #ecf2ff 55%);
  color: #487cff;
  font-size: 24px;
  line-height: 1;
  pointer-events: none;
}

.jci-agent-scroll-indicator[hidden],
.jci-agent-connector[hidden] {
  display: none;
}

.jci-agent-connector {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.jci-agent-connector polyline {
  fill: none;
  stroke: #487cff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

@media (min-width: 769px) {
  .jci-contact-representatives .jci-agent-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 150px) minmax(0, 1fr);
    column-gap: 24px;
    align-items: stretch;
    width: 100% !important;
    min-height: clamp(540px, 43vw, 760px);
  }

  .jci-contact-representatives .jci-agent-list-column {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    width: 150px;
    min-height: 0;
    max-height: none;
  }

  .jci-contact-representatives .aim-list.desktop {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100% !important;
    max-width: 150px !important;
    min-height: 0;
    max-height: none !important;
    padding: 0;
    overflow: visible !important;
  }

  .jci-contact-representatives .aim-list.desktop::-webkit-scrollbar {
    display: none;
  }

  .jci-contact-representatives .aim-list.desktop > * {
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
  }

  .jci-contact-representatives .aim-list.mobile,
  .jci-contact-representatives .aim-dropdown {
    display: none !important;
  }

  .jci-contact-representatives .jci-agent-map-column {
    grid-column: 2;
    width: 100%;
    min-height: clamp(540px, 43vw, 760px);
  }

  .jci-contact-representatives .aim-map-wrap {
    flex: 1 1 0 !important;
    width: 100% !important;
    min-height: clamp(540px, 43vw, 760px) !important;
    max-width: none !important;
    overflow: visible;
  }

  .jci-contact-representatives .jci-agent-card {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
  }

  .jci-contact-representatives .jci-agent-card.is-position-left {
    left: 16px;
    right: auto;
  }

  .jci-contact-representatives .jci-agent-card.is-position-right {
    right: 16px;
    left: auto;
  }

  .jci-contact-representatives .jci-agent-card.is-position-top {
    top: 16px;
    bottom: auto;
  }

  .jci-contact-representatives .jci-agent-card.is-position-bottom {
    bottom: 16px;
    top: auto;
  }
}

@media (max-width: 768px) {
  .jci-contact-sites {
    padding-bottom: 56px;
  }

  .jci-contact-sites__grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 152px;
  }

  .jci-contact-sites__grid > .jci-contact-site {
    max-width: none;
  }

  .jci-contact-representatives-section {
    padding-top: 56px !important;
  }

  .jci-contact-representatives__layout {
    width: 100%;
  }

  .jci-contact-representatives__layout > .col-12 {
    width: 100% !important;
  }

  .jci-contact-representatives .jci-agent-layout {
    display: flex;
    flex-direction: column;
  }

  .jci-contact-representatives .jci-agent-list-column {
    display: none;
  }

  .jci-contact-representatives .aim-list.mobile {
    display: block !important;
    width: 100%;
    max-width: 100%;
  }

  .jci-contact-representatives .aim-dropdown {
    display: block;
  }

  .jci-contact-representatives .aim-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 8px;
    background: #eaf0ff;
    color: #487cff;
    font-weight: 500;
    list-style: none;
    cursor: pointer;
  }

  .jci-contact-representatives .aim-dropdown-toggle::-webkit-details-marker {
    display: none;
  }

  .jci-contact-representatives .aim-chevron {
    transition: transform 200ms ease;
  }

  .jci-contact-representatives .aim-dropdown[open] .aim-chevron {
    transform: rotate(180deg);
  }

  .jci-contact-representatives .aim-options {
    display: flex;
    flex-direction: column;
    max-height: min(50vh, 420px);
    margin-top: 4px;
    border: 1px solid #e0e6f5;
    border-radius: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .jci-contact-representatives .aim-options::-webkit-scrollbar {
    display: none;
  }

  .jci-contact-representatives .aim-options .aim-btn {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-bottom: 1px solid #f0f3fa;
    background: #fff;
    text-align: left;
    cursor: pointer;
  }

  .jci-contact-representatives .aim-options .aim-btn:last-child {
    border-bottom: 0;
  }

  .jci-contact-representatives .aim-options .aim-btn:hover,
  .jci-contact-representatives .aim-options .aim-btn:focus-visible {
    background: #f5f8ff;
  }

  .jci-contact-representatives .jci-agent-card {
    position: relative;
    width: 100%;
  }

  .jci-agent-scroll-indicator,
  .jci-agent-connector {
    display: none;
  }
}

@media (min-width: 769px) and (max-width: 1099px) {
  .jci-contact-sites__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 48px;
    row-gap: 168px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jci-contact-representatives .aim-map-wrap svg :is(path, polygon),
  .jci-contact-representatives .aim-chevron {
    transition: none;
  }
}
