/* Styles for the country-id-picker element and the ID info descriptions stored in country_id_info */

.delivery-id-info {
  border: solid 0px #848181!important;
  border-radius: 0px;
  margin-top: 0px;
}

.custom-tabs-wrap {
  background: #d9d9d9;
  border-radius: 4px;
  padding: 6px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: stretch;
  gap: 0;
  margin-bottom: 26px;
}

.custom-tabs-wrap .nav-item {
  flex: 1 1 50%;
}

.custom-tabs-wrap .nav-link.active {
  background: #fff;
  color: #222;
  box-shadow: none;
}

.tab-content-area {
  color: #222;
}

.custom-tabs-wrap .nav-link {
  width: 100%;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #6b6b6b;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  padding: 14px 10px;
  line-height: 1.1;
  white-space: nowrap;
}

.green-delivery-tab {
    background-color: #08ab71;
    border-radius: 3px;
    color: #fff;
    font-weight: bold;
    font-size: 1em;
    padding: 4px 6px 7px 6px;
    position: absolute;
    line-height: 1;
    text-align: center;
    margin: -25px 20px 0px -5px;
}

@media only screen and (min-width: 768px) {
  .green-delivery-tab {
    margin: -35px 20px 0px -5px;
  }
}

/* Japan delivery content: badges, shipping list and inline tooltips */
.id-badge-japan {
  display: inline-flex;
  align-items: center;
  border: 1px dashed #02A75A;
  border-radius: 3px;
  background: #f7fcfa;
  color: #02A75A;
  font-family: 'Open Sans', sans-serif !important;
  white-space: nowrap;
  letter-spacing: 0 !important;
  font-weight: 600;
  vertical-align: middle;
  padding: 4px 5px;
  font-size: 0.5em !important;
}

.id-badge-japan .help {
  width: 14px;
  height: 14px;
  border: 1px solid #02A75A;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif !important;
  letter-spacing: 0 !important;
  color: #02A75A;
  line-height: 1;
  flex: 0 0 14px;
  transform: translateY(0.5px);
  font-size: 8px !important;
}

@media only screen and (min-width: 375px) {
  .id-badge-japan {
    padding: 4px 6px;
    font-size: 0.6em !important;
  }
}

.japan-pick-up-grey {
  background-color: #f9f9fa;
  border-radius: 5px;
}

.japan-shipping-list {
  font-size: 17px;
  line-height: 1.5;
}

.inline-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.inline-tooltip__trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: underline dotted;
  cursor: pointer;
  line-height: 1;
}

.inline-tooltip__bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.35;
  white-space: normal;
  width: max-content;
  max-width: min(260px, calc(100vw - 16px));
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: normal;
  font-weight: 400;
  font-family: 'Open Sans', sans-serif !important;
  letter-spacing: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
}

.info-box {
  background: #fff;
  border: none;
}

/* ID requirements box, used inside the country_id_info descriptions */
.id-requirements {
  width: 100%;
  font-family: Arial, sans-serif;
  color: #24312a;
}

.id-requirements__triangle {
  width: 0;
  height: 0;
  margin: 10px auto;
  border-left: 42px solid transparent;
  border-right: 42px solid transparent;
  border-top: 35px solid #e0f3e9;
}

.id-requirements__box {
  background: #e0f3e9;
  border-radius: 5px;
  padding: 1em;
  line-height: 1.3;
}

@media only screen and (min-width: 576px) {
  .id-requirements__box {
    padding: 2em;
  }
}

.id-requirements__box p:last-child {
  margin-bottom: 0;
}

.id-tooltip-link {
    text-decoration: underline dotted;
    cursor: pointer;
}

.accepted-id-list {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.accepted-id-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
}

.accepted-id-emoji {
  flex: 0 0 1.5em;
  min-width: 1.5em;
  text-align: center;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.id-requirements ul li {
  font-family: 'Open Sans', sans-serif !important;
  font-size: 16px !important;
  line-height: 1.8 !important;
}

/* The uploader shows one country's box on its own, so it has nothing to point at */
.delivery-id-single .id-requirements__triangle {
  display: none;
}

/* Country picker: a Bootstrap collapse of flag buttons */
.delivery-id-picker {
  width: 100%;
  margin-top: 12px;
  font-family: 'Open Sans', sans-serif;
}

.delivery-id-picker__toggle {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border: solid 3px #848181 !important;
  border-radius: 12px;
  background: #fff;
  color: #666;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, border-radius .2s ease;
}

.delivery-id-picker__toggle:hover { border-color: #5f5f5f; }
.delivery-id-picker__toggle:focus-visible,
.delivery-id-country:focus-visible {
  outline: 3px solid rgba(0, 157, 214, .35);
  outline-offset: 2px;
}

.delivery-id-picker.is-invalid .delivery-id-picker__toggle {
  border-color: #dc3545 !important;
}

.delivery-id-picker__label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #848181;
  margin-bottom: 0;
  font-weight: bold;
}

.delivery-id-picker__label .delivery-id-country__flag {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.delivery-id-picker.has-selection .delivery-id-picker__label {
  color: #222;
}

/* Same chevron as the site's Bootstrap accordion buttons */
.delivery-id-picker__chevron {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 1.25rem;
  margin-left: auto;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23003473'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat;
  background-size: 1.25rem;
  background-position: center;
  border: 0;
  transform: rotate(0deg);
  transform-origin: center;
  transition: transform .2s ease-in-out;
}

.delivery-id-picker__toggle:not(.collapsed) .delivery-id-picker__chevron {
  transform: rotate(-180deg);
}

.delivery-id-picker__panel {
  margin-top: 10px;
  padding: 10px;
  border: 2px solid #848181;
  border-radius: 10px;
  background: #fff;
}

.delivery-id-picker__grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 5px;
}

.delivery-id-country {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  min-height: 55px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: 1px solid #dde1e5;
  border-radius: 8px;
  background: #fff;
  color: #222;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.delivery-id-country:hover {
  transform: translateY(-1px);
  border-color: #003473;
}

.delivery-id-country.is-selected {
  background: #f2fcff;
  border-color: #003473;
}

.delivery-id-country__flag {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: block;
  object-fit: contain;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.delivery-id-country__name { min-width: 0; overflow-wrap: anywhere; }
.delivery-id-country--other { grid-column: span 2; }

/* ID info for the country chosen in a picker bound to a <select> */
.delivery-id-picker__info {
  margin: 0 0 10px 0;
  padding: 5px 0;
}

@media (min-width: 360px) {
  .delivery-id-country {
    min-height: 50px;
    padding: 6px 5px;
  }
  .delivery-id-picker__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .delivery-id-picker__panel { padding: 5px; }
}

@media (min-width: 768px) {
  .delivery-id-country {
    min-height: 55px;
    padding: 6px 12px;
  }
  .delivery-id-picker__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .delivery-id-picker__panel { padding: 10px; }
}

@media (min-width: 992px) {
  .delivery-id-picker__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
}

/* Modal the product pages show a country's ID info in */
.delivery-id-bootstrap-modal .modal-dialog { max-width: 940px!important; }
.delivery-id-bootstrap-modal .modal-title {
  color: #003473;
  font-size: 20px;
  line-height: 1.25;
}
.delivery-id-bootstrap-modal .modal-body { padding: 20px; }
.delivery-id-bootstrap-modal .delivery-id-info { display: block !important; margin-top:-20px!important;}
.delivery-id-bootstrap-modal .id-requirements__triangle { display: none; }
.delivery-id-bootstrap-modal .id-requirements__box {
  margin: 0;
  font-size: 14px;
}
/* Stacks above a product modal it was opened from */
.delivery-id-bootstrap-modal { z-index: 1070; }
.delivery-id-bootstrap-backdrop { z-index: 1065; }
.delivery-id-bootstrap-modal .tooltip { z-index: 1080 !important; }

@media (max-width: 767.98px) {
  .delivery-id-country--other { grid-column: 1 / -1; }
  .delivery-id-bootstrap-modal .modal-title { font-size: 18px; }
  .delivery-id-bootstrap-modal .modal-body { padding: 12px; }
  .delivery-id-bootstrap-modal .id-requirements__box { padding: 16px; font-size: 13px; }
}
