.country-picker__trigger,
.country-picker {
  display: none;
}

@media (max-width: 767.98px) {
  /* Remove the visible card treatment around the mobile control. */
  #block-views-block-country-page-block-list,
  #block-views-block-country-page-block-list > .content,
  .dip-country-block-list {
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .country-list--mobile-enhanced .views-view-responsive-grid {
    display: none;
  }

  .country-list--mobile-enhanced .country-picker__trigger {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 3.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid #c6d0df;
    border-radius: 4px;
    background: #fff;
    color: #005ea8;
    box-shadow: none;
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
  }

  .country-picker__trigger::after {
    content: "";
    flex: 0 0 0.55rem;
    width: 0.55rem;
    height: 0.55rem;
    margin-left: 1rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-0.15rem) rotate(45deg);
  }

  .country-picker__trigger:focus-visible,
  .country-picker__close:focus-visible,
  .country-picker__back:focus-visible,
  .country-picker__list a:focus-visible {
    outline: 3px solid #8eafff;
    outline-offset: 2px;
  }

  .country-picker[open] {
    display: flex;
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    flex-direction: column;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #fff;
  }

  .country-picker::backdrop {
    background: rgb(0 0 0 / 45%);
  }

  .country-picker__header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    min-height: 5rem;
    padding: 1rem 1.25rem;
    background: #f1f2f6;
  }

  .country-picker__header strong {
    font-size: 1.25rem;
  }

  .country-picker__close {
    padding: 0.25rem 0.5rem;
    border: 0;
    background: transparent;
    color: #17233a;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
  }

  .country-picker__back {
    flex: 0 0 auto;
    align-self: flex-start;
    margin: 1rem 1.25rem;
    padding: 0.25rem 0;
    border: 0;
    background: transparent;
    color: #1673c9;
    font: inherit;
    font-size: 1.1rem;
    cursor: pointer;
  }

  .country-picker__search {
    box-sizing: border-box;
    flex: 0 0 auto;
    width: calc(100% - 2.5rem);
    min-height: 3.5rem;
    margin: 0 1.25rem 0.75rem;
    padding: 0.75rem 2.75rem 0.75rem 0.875rem;
    border: 1px solid #c6d0df;
    border-radius: 4px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2317233a' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='10.8' cy='10.8' r='7.2'/%3E%3Cpath d='m16.2 16.2 5 5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.4rem;
    font: inherit;
  }

  .country-picker__search:focus {
    border-color: #648cff;
    outline: 2px solid #8eafff;
    outline-offset: 1px;
  }

  .country-picker__list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    margin: 0;
    padding: 0 1.25rem 1rem;
    list-style: none;
    -webkit-overflow-scrolling: touch;
  }

  .country-picker__list li {
    border-bottom: 1px solid #e5e8ee;
  }

  .country-picker__list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.5rem;
    padding: 0.5rem 0.25rem;
    color: #17233a;
    font: inherit;
    text-decoration: none;
  }

  .country-picker__arrow::after {
    content: "›";
    color: #17233a;
    font-size: 1.6rem;
    line-height: 1;
  }
}
