/**
 * Prestaworks AB
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the End User License Agreement(EULA)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://license.prestaworks.se/license.html
 *
 * @author Prestaworks AB <info@prestaworks.se>
 * @copyright Copyright Prestaworks AB (https://www.prestaworks.se/)
 * @license http://license.prestaworks.se/license.html
 */



/**
 * Basic appearance and position of the popup and overlay
 */
.pwcountryselector {
  align-items: center;
  display: flex;
  font-size: 14px;
  justify-content: center;

  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10001;
}
  .pwcountryselector-popup {
    background-color: #fff;
    padding: var(--padding);
    max-width: 30em;
    width: calc(100% - 42px);

    position: relative;
    z-index: 2;

    --padding: 21px;
  }
    @media screen and (min-width: 576px) {
    .pwcountryselector-popup {
      --padding: calc(21px + 21 * ((100vw - 576px) / 624));
    } }
    @media screen and (min-width: 1200px) {
    .pwcountryselector-popup {
      --padding: 42px;
    } }
  .pwcountryselector-overlay {
    background-color: rgba(0, 0, 0, 0.15);
    height: 100%;
    width: 100%;

    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
  }



/**
 * The only images used are in the dropdown toggle and for each country choice
 * Set them to the same size and a margin to the label to the right
 */
.pwcountryselector img {
  height: 24px;
  margin-right: 0.5em;
  width: 24px;
}



/**
 * Button that triggers the dropdown
 */
.pwcountryselector-dropdown-toggle {
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #e0e4e8;
  cursor: pointer;
  display: flex;
  font: inherit;
  flex-wrap: nowrap;
  justify-content: flex-start;
  text-align: left;
  padding: 1em;
  width: 100%;
}
  .pwcountryselector-dropdown-toggle:hover {
    border-color: #24b9d7;
  }
  .pwcountryselector-dropdown-toggle:active {
    background-color: #f2f6fa;
    border-color: #13a8c6;
  }
  .pwcountryselector-dropdown-toggle:focus {
    border-color: #13a8c6;
    outline: 0;
  }
  .pwcountryselector-dropdown-toggle:after {
    background-image: url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 100%;
    content: '';
    display: block;
    height: 1.25em;
    margin-left: auto;
    width: 1.25em;
  }
  .pwcountryselector-dropdown-toggle[aria-expanded="true"]:after {
    transform: rotate(0.5turn);
  }



/**
 * Actual dropdown menu with all the countries
 */
.pwcountryselector-dropdown-menu {
  border-color: #13a8c6;
  border-top-color: #e0e4e8;
  list-style-type: none;
  margin: 0;
  padding: 0;
  top: calc(100% - 1px);
  width: 100%;
}
  .pwcountryselector-dropdown-menu .dropdown-item {
    padding: 3px;
  }



/**
 * A single country choice
 */
.pwcountryselector-radio {
  display: none !important;
}
.pwcountryselector-label {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: flex-start;
  margin: 0;
  padding: calc(1em - 3px);
}
  .pwcountryselector-radio:checked ~ .pwcountryselector-label {
    color: #24b9d7;
  }
  .pwcountryselector-label:hover {
    background-color: #f0f4f8;
    color: #24b9d7;
  }



/**
 * Make sure to capture the click event on the actual trigger/button
 */
[data-open-pwcountryselector] *,
[data-close-pwcountryselector] * {
  pointer-events: none !important;
}



/**
 * Form
 */
.pwcountryselector-form {
  padding-top: var(--padding);
  padding-bottom: calc(var(--padding) / 2);
}



/**
 * Final "confirm choice" button
 */
.pwcountryselector-confirm {
  display: block;
  font: inherit;
  font-weight: 700;
  padding: 1em 0;
  text-align: center;
  width: 100%;
}



/**
 * Close button for the popup
 */
.pwcountryselector-close {
  background-color: transparent;
  border-width: 0;
  cursor: pointer;
  display: block;
  padding: 0;

  position: absolute;
  top: var(--padding);
  right: var(--padding);
  z-index: 1;
}
  .pwcountryselector-close svg {
    display: block;
  }



/**
 * Popup title
 */
.pwcountryselector-popup-title {
  border-bottom: 1px solid #e0e4e8;
  display: block;
  font-weight: 700;
  padding-bottom: calc(var(--padding) / 3);
  margin-bottom: calc(var(--padding) / 3);
}



/**
 * Popup intro text
 */
.pwcountryselector-popup-text {
  display: block;
}



/**
 * Trigger
 */
.pw_country_selector_trigger {
  align-items: center;
  background-color: transparent;
  border-width: 0;
  color: inherit;
  display: flex;
  font: inherit;
  justify-content: flex-start;
}
  .pw_country_selector_trigger img {
    margin-right: 0.25em;
  }
  .pw_country_selector_trigger:focus {
    outline: 0;
  }


/**
 * Netsilla specific
 */
.pwcountryselector-form > .dropdown ~ .dropdown {
  margin-top: 1em;
}
#pwcountrylanguageselector-dropdown-toggle img,
.pwcountryselector label[for*="pwcountrylanguageselector"] img {
  height: 11px;
  width: 16px;
}
.pwcountryselector-popup {
  --padding: 1.5em;
  max-width: 400px;
  position: absolute;
  top: var(--top-offset);
  left: var(--left-offset);
  right: var(--right-offset);
  position: relative;
  inset: 0;
  max-width: 640px;
}
.pwcountryselector-confirm,
.pwcountryselector-dropdown-toggle {
  border-radius: 10px;
}
.pwcountryselector-dropdown-toggle[aria-expanded="true"] {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}
.pwcountryselector-dropdown-menu,
.pwcountryselector-dropdown-menu .dropdown-item:last-child {
  border-bottom-right-radius: 10px;
  border-bottom-left-radius: 10px;
}
.pw_country_selector_trigger {
  padding: 0.5625rem;
}
.pw_country_selector_trigger img {
  border-radius: 100%;
  margin-right: 0.5em;
  outline-offset: 2px;
  outline: 1px solid #001a2f;
}
.pw_country_selector_trigger span {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}


.pwcountryselector {
  font-size: 12px;
}
  @media (min-width: 576px) {
    .pwcountryselector {
      font-size: 13px;
    }
  }
.pwcountryselector-dropdown-toggle * {
  pointer-events: none;
}
.pwcountryselector .row {
  margin: 0 calc(var(--padding) / -6);
}
.pwcountryselector .row > [class*="col"] {
  padding-right: calc(var(--padding) / 6);
  padding-left: calc(var(--padding) / 6);
}
  @media (min-width: 576px) {
  .pwcountryselector .row {
    margin: 0 calc(var(--padding) / -4);
  }
  .pwcountryselector .row > [class*="col"] {
    padding-right: calc(var(--padding) / 4);
    padding-left: calc(var(--padding) / 4);
  } }
.pwcountryselector-label {
  border-radius: 10px;
}
.pwcountryselector-label span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;;
}
.pwcountryselector-dropdown-menu {
  border-radius: 0;
  display: flex;
  flex-wrap: wrap;
  position: static;
  margin: 0 calc(var(--padding) / -6);
  
  max-height: calc(var(--dd-maxheight) * 1px);
  max-height: none;
  overflow-y: auto;
  top: calc(100% - 1px) !important;
  transform: none !important;
  width: auto;
}
  @media (min-width: 576px) {
  .pwcountryselector-dropdown-menu {
    padding-left: calc(var(--padding) / -4);
    padding-right: calc(var(--padding) / -4);
  } }
.pwcountryselector-dropdown-menu > li {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 0 calc(var(--padding) / 6) calc(var(--padding) / 6);
}
  @media (min-width: 576px) {
  .pwcountryselector-dropdown-menu > li {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
    padding: 0 calc(var(--padding) / 4) calc(var(--padding) / 4);
  } }
@media (max-width: 991px) {
.pw_country_selector_trigger span {
  display: none !important;
}
.pwcountryselector-popup {
  left: auto;
}}
.pwcountryselector-dropdown-toggle span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pwcountryselector-dropdown-menu:after,
.pwcountryselector-dropdown-menu:before {
  background-color: #e0e4e8;
  content: '';
  display: block;
  flex: 0 0 calc(100% - (var(--padding) / 3));
  height: 1px;
  margin-right: calc(var(--padding) / 6);
  margin-left: calc(var(--padding) / 6);
  width: calc(100% - (var(--padding) / 3));
}
  .pwcountryselector-dropdown-menu:before {
    margin-bottom: calc(var(--padding) / 6);
    margin-top: calc(var(--padding) / 3);
  }
    @media (min-width: 576px) {
      .pwcountryselector-dropdown-menu:after,
      .pwcountryselector-dropdown-menu:before {
        flex: 0 0 calc(100% - (var(--padding) / 2));
        margin-right: calc(var(--padding) / 4);
        margin-left: calc(var(--padding) / 4);
        width: calc(100% - (var(--padding) / 2));
      }
      .pwcountryselector-dropdown-menu:before {
        margin-bottom: calc(var(--padding) / 4);
        margin-top: calc(var(--padding) / 2);
      }
    }
.pwcountrylanguageselector-radio:checked ~ .pwcountryselector-label,
.pwcountryselector-radio:checked ~ .pwcountryselector-label {
  background-color: #f0f4f8;
  color: #24b9d7;
  font-family: "Open Sans Bold";
  font-weight: 400;
}
@media (max-width: 575px) {
  .pwcountryselector-label {
    padding-top: 0.25em;
    padding-bottom: 0.25em;
  }
  .pwcountryselector img {
    height: 18px;
    width: 18px;
  }
}