/* Flylink-style Change currency (aligned with store.flylinking.com data-v-0be17dd3) */

.ae-currency-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.ae-currency-trigger.header-store-right-icon-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  color: #424552;
  font: inherit;
  line-height: 1.2;
  white-space: nowrap;
}

.ae-currency-trigger:hover {
  background: #f2f4f7;
}

.header-store-right-icon.currency {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.header-store-right-icon-span {
  font-size: 13px;
  font-weight: 500;
  color: #424552;
}

.ae-currency-layer {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.ae-currency-layer[hidden] {
  display: none !important;
}

.ae-currency-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.ae-currency-panel.layer-body {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 12px 12px 0 0;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}

.layer-body-title-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid #e5e5e5;
}

.layer-body-title {
  color: #222;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  padding: 16px 0;
}

.layer-body-title-close {
  border: none;
  background: transparent;
  color: #424552;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.layer-body-content {
  overflow: auto;
  max-height: calc(85vh - 56px);
  padding-bottom: 16px;
}

.h1 {
  color: #222;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  padding: 16px 12px;
}

.h2 {
  align-items: center;
  border-top: 1px solid #e5e5e5;
  display: flex;
  padding: 16px 12px;
}

.h2 .label {
  color: #424552;
  font-weight: 500;
  margin-right: 4px;
  font-size: 14px;
  line-height: 20px;
}

.h2 .value {
  color: #222;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
}

.h3 {
  border-top: 1px solid #e5e5e5;
  color: #686a6c;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  padding: 16px 12px 0;
}

.search-container {
  padding: 8px 14px;
}

.ae-currency-search {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

.currency-list {
  padding: 0 6px;
}

.currency-item {
  align-items: center;
  cursor: pointer;
  display: flex;
  padding: 10px;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font: inherit;
}

.currency-item:hover {
  background: #f5f7fa;
  border-radius: 6px;
}

.currency-item.active {
  cursor: default;
}

.currency-item.active .currency-item-code {
  color: #3369ff;
}

.currency-item .check {
  display: none;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #3369ff;
}

.currency-item.active .check {
  display: block;
}

.currency-item .center {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.currency-item .img {
  border: 0.7px solid #e5e5e5;
  border-radius: 1px;
  height: 14px;
  margin: 0 10px 0 2px;
  overflow: hidden;
  width: 19.6px;
  object-fit: cover;
  flex-shrink: 0;
}

.currency-item-code {
  color: #222;
  font-size: 14px;
  font-weight: 400;
  line-height: 19.6px;
}

@media screen and (min-width: 768px) {
  .ae-currency-layer {
    position: static;
    inset: auto;
    display: block;
  }

  .ae-currency-layer:not([hidden]) {
    display: block;
  }

  .ae-currency-backdrop {
    display: none;
  }

  .ae-currency-panel.layer-body {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 414px;
    max-height: calc(100vh - 80px);
    border-radius: 12px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.1), 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: none;
  }

  .ae-currency-wrap {
    position: relative;
  }

  .layer-body-title-close {
    display: block;
  }
}

@media screen and (max-width: 900px) {
  .ae-currency-trigger-label,
  .ae-currency-trigger .header-store-right-icon-span {
    display: none;
  }

  .ae-currency-trigger {
    padding: 6px 8px;
  }
}

/* Dark topbar (WP 首页 / Flask PDP): 与 Account 同为白色；放文件末尾以免被上方默认灰覆盖 */
.anbuyer-hb-header.ae-topbar .ae-currency-trigger,
.anbuyer-hb-header.ae-topbar .ae-currency-trigger.header-store-right-icon-button,
.ae-topbar .ae-currency-trigger,
.ae-topbar-tools .ae-currency-trigger {
  color: #fff !important;
}

.anbuyer-hb-header.ae-topbar .ae-currency-trigger .header-store-right-icon-span,
.anbuyer-hb-header.ae-topbar .ae-currency-trigger-label,
.ae-topbar .ae-currency-trigger .header-store-right-icon-span,
.ae-topbar .ae-currency-trigger-label,
.ae-topbar-tools .ae-currency-trigger .header-store-right-icon-span {
  color: #fff !important;
}

.anbuyer-hb-header.ae-topbar .ae-currency-trigger .header-store-right-icon,
.ae-topbar .ae-currency-trigger .header-store-right-icon,
.ae-topbar-tools .ae-currency-trigger .header-store-right-icon {
  color: #fff;
}

.anbuyer-hb-header.ae-topbar .ae-currency-trigger:hover,
.ae-topbar .ae-currency-trigger:hover,
.ae-topbar-tools .ae-currency-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
}
