/* Merchant Yellow-Pages header on normal WordPress pages */
:root {
  --gaa-page-max: 1180px;
}

body.gaa-merchant-normal-page .entry-title,
body.gaa-merchant-normal-page .post-title,
body.gaa-merchant-normal-page .page-title {
  display: none !important;
}

body.gaa-merchant-normal-page .entry-content,
body.gaa-merchant-normal-page .post-content,
body.gaa-merchant-normal-page .page-content {
  overflow: visible;
}


/* Keep the merchant page canvas transparent so the per-merchant background image
 * selected in the WordPress editor remains visible. Header/footer keep their theme styles. */
body.gaa-merchant-normal-page #page,
body.gaa-merchant-normal-page .site,
body.gaa-merchant-normal-page .site-content,
body.gaa-merchant-normal-page .content-area,
body.gaa-merchant-normal-page .site-main,
body.gaa-merchant-normal-page article.page,
body.gaa-merchant-normal-page .entry-content,
body.gaa-merchant-normal-page .post-content,
body.gaa-merchant-normal-page .page-content {
  background: transparent !important;
}


.gaa-directory-card {
  --gaa-accent: #0a84ff;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: min(var(--gaa-page-max), calc(100% - 32px));
  margin: 0 auto 24px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .30);
  border-radius: 28px;
  background: rgba(255,255,255,.10);
  box-shadow: 0 16px 44px rgba(31, 57, 88, .10), inset 0 1px 0 rgba(255,255,255,.34);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  backdrop-filter: blur(20px) saturate(120%);
  color: #203149;
}

.gaa-directory-card::before {
  display: none;
}

.gaa-directory-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 300px);
  align-items: stretch;
  gap: 22px;
}

.gaa-directory-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 18px;
  padding: 4px 0;
}

.gaa-directory-logo {
  flex: 0 0 auto;
  display: block;
  width: 82px !important;
  height: 82px !important;
  max-width: 82px !important;
  max-height: 82px !important;
  margin: 0 !important;
  border: 1px solid rgba(121,145,176,.16);
  border-radius: 21px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 10px 26px rgba(32,56,86,.12);
}

.gaa-directory-namebox {
  min-width: 0;
}

.gaa-directory-titleline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  min-width: 0;
}

.gaa-directory-titleline.has-mongol {
  align-items: flex-start;
  flex-wrap: nowrap;
}

.gaa-directory-title {
  margin: 0 !important;
  padding: 0 !important;
  color: #172840;
  font-size: clamp(29px, 4vw, 44px) !important;
  font-weight: 800 !important;
  line-height: 1.08 !important;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.gaa-directory-tagline {
  max-width: 680px;
  margin: 0 !important;
  color: #63758d;
  font-size: 14px;
  line-height: 1.72;
}

.gaa-directory-title.is-mongol,
.gaa-directory-tagline.is-mongol,
.gaa-directory-facts strong.is-mongol {
  writing-mode: vertical-lr;
  text-orientation: sideways-right;
  letter-spacing: 0;
}

.gaa-directory-title.is-mongol {
  width: auto;
  min-height: 118px;
  max-height: 178px;
  font-size: 30px !important;
  line-height: 1.22 !important;
}

.gaa-directory-tagline.is-mongol {
  min-height: 92px;
  max-height: 155px;
}

.gaa-directory-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.gaa-directory-chips span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid rgba(92,122,160,.13);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #526980;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.gaa-directory-chips span.is-status {
  border-color: color-mix(in srgb, var(--gaa-accent) 24%, transparent);
  background: color-mix(in srgb, var(--gaa-accent) 9%, white);
  color: var(--gaa-accent);
}

.gaa-directory-cover {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 154px;
  max-height: 196px;
  margin: 0 !important;
  border: 1px solid rgba(109,136,169,.14);
  border-radius: 20px;
  object-fit: cover;
  background: #eaf1fa;
  box-shadow: 0 9px 24px rgba(42,67,98,.10);
}

.gaa-directory-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.gaa-directory-facts > div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(93,123,160,.11);
  border-radius: 16px;
  background: rgba(255,255,255,.58);
}

.gaa-directory-facts span {
  display: block;
  margin-bottom: 5px;
  color: #8a98a9;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
}

.gaa-directory-facts strong {
  display: block;
  color: #334c68;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.gaa-directory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.gaa-directory-action {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  margin: 0 !important;
  padding: 0 16px;
  border: 1px solid rgba(80,113,154,.15);
  border-radius: 999px;
  background: rgba(255,255,255,.77);
  box-shadow: 0 4px 14px rgba(43,67,97,.05);
  color: #395672 !important;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.gaa-directory-action:hover,
.gaa-directory-action:focus-visible {
  transform: translateY(-1px);
  background: #fff;
  box-shadow: 0 7px 18px rgba(40,65,96,.09);
}

.gaa-directory-action.is-primary {
  border-color: var(--gaa-accent);
  background: var(--gaa-accent);
  color: #fff !important;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--gaa-accent) 26%, transparent);
}

.gaa-merchant-wechat-panel,
.gaa-merchant-offer-detail {
  box-sizing: border-box;
  margin-top: 13px;
  padding: 14px 15px;
  border: 1px solid rgba(80,117,163,.13);
  border-radius: 16px;
  background: rgba(255,255,255,.68);
  color: #465d77;
  font-size: 12px;
  line-height: 1.65;
}

.gaa-merchant-wechat-panel {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gaa-merchant-wechat-panel[hidden],
.gaa-merchant-offer-detail[hidden] {
  display: none !important;
}

.gaa-merchant-wechat-panel img {
  display: block;
  width: 84px !important;
  height: 84px !important;
  margin: 0 !important;
  border-radius: 12px;
  object-fit: cover;
}

.gaa-merchant-offer-detail strong,
.gaa-merchant-offer-detail span {
  display: block;
}

.gaa-merchant-offer-detail strong {
  margin-bottom: 3px;
  color: #253a52;
}

/* Normal WordPress content remains editable by the administrator, but gets a
 * clean page frame by default. alignfull can still escape to full viewport. */
.gaa-merchant-custom-content {
  box-sizing: border-box;
  width: min(var(--gaa-page-max), calc(100% - 32px));
  max-width: var(--gaa-page-max);
  margin: 0 auto 72px;
  min-width: 0;
}

.gaa-merchant-custom-content > :first-child {
  margin-top: 0;
}

.gaa-merchant-custom-content img,
.gaa-merchant-custom-content video,
.gaa-merchant-custom-content iframe {
  max-width: 100%;
}

.gaa-merchant-custom-content .alignwide {
  max-width: 100%;
}

.gaa-merchant-custom-content .alignfull {
  position: relative;
  left: 50%;
  width: 100vw;
  max-width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
}

.gaa-merchant-custom-content.is-horizontal {
  writing-mode: horizontal-tb;
}

.gaa-merchant-custom-content.is-vertical,
.gaa-mongol-vertical {
  box-sizing: border-box;
  min-height: 58vh;
  max-height: 82vh;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 18px 14px;
  writing-mode: vertical-lr;
  text-orientation: sideways-right;
  -webkit-overflow-scrolling: touch;
}

.gaa-merchant-custom-content.is-vertical p,
.gaa-mongol-vertical p {
  margin: 0 0 1em 1em;
}

.gaa-merchant-custom-content.is-vertical img,
.gaa-merchant-custom-content.is-vertical video,
.gaa-merchant-custom-content.is-vertical iframe,
.gaa-mongol-vertical img,
.gaa-mongol-vertical video,
.gaa-mongol-vertical iframe {
  max-width: min(72vw, 680px);
  height: auto;
}

@media (max-width: 760px) {
  .gaa-reader-ad {
    padding: 12px;
  }

  .gaa-ad-card {
    display: block;
    width: min(440px, 96%);
    max-height: 92%;
    overflow: auto;
    border-radius: 23px;
  }

  .gaa-ad-image-wrap {
    min-height: 0;
    height: min(31vh, 230px);
  }

  .gaa-ad-copy {
    padding: 24px 22px 22px;
  }

  .gaa-ad-copy h3 {
    font-size: 26px;
  }

  .gaa-legacy-merchant-shell,
  .gaa-directory-card,
  .gaa-merchant-custom-content {
    width: min(100% - 18px, 760px);
  }

  .gaa-legacy-merchant-shell {
    margin: 14px auto 42px;
  }

  .gaa-directory-card {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 22px;
  }

  .gaa-directory-head {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .gaa-directory-identity {
    align-items: flex-start;
    gap: 12px;
  }

  .gaa-directory-logo {
    width: 62px !important;
    height: 62px !important;
    max-width: 62px !important;
    max-height: 62px !important;
    border-radius: 16px;
  }

  .gaa-directory-cover {
    height: 150px !important;
    min-height: 150px;
    max-height: 150px;
    border-radius: 16px;
  }

  .gaa-directory-titleline {
    gap: 6px 10px;
  }

  .gaa-directory-title {
    font-size: 25px !important;
  }

  .gaa-directory-title.is-mongol {
    min-height: 102px;
    max-height: 145px;
    font-size: 24px !important;
  }

  .gaa-directory-tagline {
    font-size: 12px;
  }

  .gaa-directory-facts {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 14px;
  }

  .gaa-directory-facts > div {
    padding: 11px 12px;
  }

  .gaa-directory-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .gaa-directory-action {
    width: 100%;
    min-height: 46px;
    padding: 0 10px;
  }

  .gaa-merchant-wechat-panel {
    align-items: flex-start;
  }

  .gaa-merchant-custom-content {
    margin-bottom: 48px;
  }

  .gaa-merchant-custom-content.is-vertical,
  .gaa-mongol-vertical {
    min-height: 64vh;
    max-height: 76vh;
    padding: 12px 8px;
  }
}

@media (max-width: 430px) {
  .gaa-directory-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gaa-directory-cover {
    height: 132px !important;
    min-height: 132px;
    max-height: 132px;
  }
}


/* v1.8.0 — native ad at the top of every normal article.
 * Fully scoped to .gaa-article-ad so it cannot alter the theme Header/Footer. */
.gaa-article-ad {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 980px);
  margin: 0 auto 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 24px;
  background: linear-gradient(135deg,#e9eef5,#f7f9fc);
  box-shadow: 0 16px 42px rgba(28,48,78,.12);
  isolation: isolate;
}
.gaa-article-ad-link {
  position: relative;
  display: block;
  min-height: 300px;
  color: inherit;
  text-decoration: none !important;
}
.gaa-article-ad-image {
  display: block;
  width: 100%;
  height: clamp(300px, 36vw, 520px);
  object-fit: cover;
  object-position: center;
}
.gaa-article-ad-mark {
  position: absolute;
  z-index: 3;
  top: 16px;
  left: 16px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(17,24,39,.64);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(0,0,0,.16);
}
.gaa-article-ad-copy {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  transform: translate(-50%,-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 72%;
  max-height: 76%;
  color: #172033;
  pointer-events: none;
}
.gaa-article-ad-title,
.gaa-article-ad-text {
  margin: 0;
  filter: drop-shadow(0 0 8px rgba(255,255,255,.96)) drop-shadow(0 0 20px rgba(255,255,255,.78));
  text-shadow: 0 0 8px rgba(255,255,255,.98), 0 0 18px rgba(255,255,255,.90), 0 2px 12px rgba(255,255,255,.75), 0 3px 12px rgba(16,28,46,.20);
}
.gaa-article-ad-title {
  font-size: clamp(28px,3.8vw,48px);
  font-weight: 800;
}
.gaa-article-ad-text {
  font-size: clamp(17px,2vw,25px);
  font-weight: 500;
}
.gaa-article-ad-title.is-mongol,
.gaa-article-ad-text.is-mongol {
  writing-mode: vertical-lr;
  -webkit-writing-mode: vertical-lr;
  text-orientation: sideways;
  -webkit-text-orientation: sideways-right;
  direction: ltr;
  max-height: 320px;
  line-height: 1.5;
}
.gaa-article-ad.no-image .gaa-article-ad-link {
  min-height: 260px;
}
.gaa-article-ad.no-image .gaa-article-ad-copy {
  position: relative;
  inset: auto;
  transform: none;
  min-height: 260px;
  margin: auto;
  padding: 32px;
}
@media (max-width: 760px) {
  .gaa-article-ad {
    width: min(100% - 18px, 680px);
    margin-bottom: 22px;
    border-radius: 22px;
  }
  .gaa-article-ad-link {
    min-height: 420px;
  }
  .gaa-article-ad-image {
    height: min(68vh, 620px);
    min-height: 420px;
  }
  .gaa-article-ad-copy {
    gap: 10px;
    max-width: 68%;
    max-height: 64%;
  }
  .gaa-article-ad-title {
    font-size: clamp(24px,7vw,34px);
  }
  .gaa-article-ad-text {
    font-size: clamp(14px,4.1vw,19px);
  }
  .gaa-article-ad-title.is-mongol,
  .gaa-article-ad-text.is-mongol {
    max-height: min(50vh,390px);
  }
  .gaa-article-ad-mark {
    top: 12px;
    left: 12px;
  }
}


/* v2.0.5 — Gaiha Ads global card UI.
 * Clean single-source styling: centered ad card, GAds pill, perfectly aligned close control. */
body.gaa-global-ad-open{overflow:hidden!important}
.gaa-global-gateway{
  position:fixed;
  z-index:2147483000;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  padding:76px 32px 44px;
  background:rgba(12,15,18,.88);
  -webkit-backdrop-filter:blur(10px) saturate(108%);
  backdrop-filter:blur(10px) saturate(108%);
}
.gaa-global-card{
  position:relative;
  width:min(1180px,92vw);
  height:min(74vh,760px);
  min-height:420px;
  overflow:hidden;
  border:1.5px solid rgba(255,255,255,.92);
  border-radius:30px;
  background:#111820;
  box-shadow:0 28px 90px rgba(0,0,0,.34);
}
.gaa-global-link{
  position:absolute;
  inset:0;
  display:block;
  color:inherit;
  text-decoration:none!important;
}
.gaa-global-image{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}
.gaa-global-card.no-image .gaa-global-link{
  background:radial-gradient(circle at 18% 22%,rgba(255,255,255,.95),transparent 34%),linear-gradient(135deg,#dfe7f1,#f8fafc);
}
.gaa-global-copy{
  position:absolute;
  z-index:2;
  inset:50% auto auto 50%;
  transform:translate(-50%,-50%);
  display:flex;
  justify-content:center;
  align-items:center;
  gap:20px;
  max-width:72%;
  max-height:74%;
  color:var(--gaa-global-text,#111827);
  pointer-events:none;
}
.gaa-global-title,.gaa-global-text,.gaa-global-small{
  margin:0;
  filter:drop-shadow(0 0 9px rgba(255,255,255,.98)) drop-shadow(0 0 24px rgba(255,255,255,.86)) drop-shadow(0 0 44px rgba(255,255,255,.62));
  text-shadow:0 0 9px rgba(255,255,255,1),0 0 22px rgba(255,255,255,.94),0 2px 13px rgba(255,255,255,.78),0 3px 14px rgba(14,23,40,.18);
}
.gaa-global-title{font-size:var(--gaa-global-title-size,48px);font-weight:800}
.gaa-global-text{font-size:var(--gaa-global-text-size,28px);font-weight:600}
.gaa-global-title.is-mongol,.gaa-global-text.is-mongol,.gaa-global-small.is-mongol{
  writing-mode:vertical-lr;
  -webkit-writing-mode:vertical-lr;
  text-orientation:sideways;
  -webkit-text-orientation:sideways-right;
  direction:ltr;
  line-height:1.45;
}
.gaa-global-title.is-mongol,.gaa-global-text.is-mongol{max-height:430px}
.gaa-global-small{
  position:absolute;
  z-index:3;
  left:24px;
  bottom:22px;
  font-size:var(--gaa-global-small-size,18px);
  font-weight:700;
  color:var(--gaa-global-text,#111827);
}

/* Left badge: straight, centered, stable. */
.gaa-global-mark{
  position:absolute;
  z-index:5;
  top:18px;
  left:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  min-width:66px;
  height:36px;
  padding:0 14px;
  margin:0;
  border:1px solid rgba(255,255,255,.94);
  border-radius:999px;
  background:rgba(246,247,249,.88);
  color:#46515d;
  box-shadow:0 6px 18px rgba(0,0,0,.14);
  -webkit-backdrop-filter:blur(10px) saturate(115%);
  backdrop-filter:blur(10px) saturate(115%);
  font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,"PingFang SC","Microsoft YaHei",sans-serif;
  font-size:13px;
  font-weight:800;
  line-height:1;
  letter-spacing:.02em;
  white-space:nowrap;
  text-align:center;
}

/* Close button lives outside the card. The X is drawn with two bars so it cannot lean or sit off-center. */
.gaa-global-close{
  position:absolute;
  z-index:10;
  top:max(22px,calc(env(safe-area-inset-top) + 12px));
  right:max(24px,calc(env(safe-area-inset-right) + 18px));
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  width:56px;
  height:56px;
  min-width:56px;
  min-height:56px;
  padding:0;
  margin:0;
  border:1.5px solid rgba(255,255,255,.94);
  border-radius:50%;
  background:rgba(225,228,232,.92);
  color:#34404d;
  box-shadow:0 8px 24px rgba(0,0,0,.22);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
  font-size:14px;
  font-weight:800;
  line-height:1;
  text-align:center;
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
}
.gaa-global-close:not(.is-ready)::before{
  content:attr(data-countdown);
  display:block;
  line-height:1;
}
.gaa-global-close.is-ready::before,
.gaa-global-close.is-ready::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:22px;
  height:3.5px;
  border-radius:999px;
  background:currentColor;
  transform-origin:center;
}
.gaa-global-close.is-ready::before{transform:translate(-50%,-50%) rotate(45deg)}
.gaa-global-close.is-ready::after{transform:translate(-50%,-50%) rotate(-45deg)}
.gaa-global-close[disabled]{
  cursor:default;
  opacity:.96;
}

.gaa-global-logo{
  position:absolute;
  z-index:4;
  right:22px;
  bottom:20px;
  width:48px;
  height:48px;
  object-fit:contain;
  border-radius:14px;
  background:rgba(255,255,255,.24);
  box-shadow:0 8px 25px rgba(0,0,0,.14);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
}

/* Mobile default follows the approved screenshot:
 * full dark backdrop + inset portrait ad card + separate close button. */
@media(max-width:760px){
  .gaa-global-gateway{
    align-items:center;
    justify-content:center;
    padding:
      max(118px,calc(env(safe-area-inset-top) + 88px))
      24px
      max(64px,calc(env(safe-area-inset-bottom) + 42px));
    background:rgba(20,20,20,.96);
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
  }
  .gaa-global-card{
    width:min(100%,680px);
    height:min(74dvh,820px);
    min-height:520px;
    max-height:calc(100dvh - 190px);
    border:1.5px solid rgba(255,255,255,.96);
    border-radius:26px;
    box-shadow:0 22px 54px rgba(0,0,0,.34);
  }
  .gaa-global-copy{
    gap:10px;
    max-width:68%;
    max-height:62%;
  }
  .gaa-global-title{font-size:min(var(--gaa-global-title-size,36px),9vw)}
  .gaa-global-text{font-size:min(var(--gaa-global-text-size,21px),5.3vw)}
  .gaa-global-title.is-mongol,.gaa-global-text.is-mongol{max-height:58vh}
  .gaa-global-small{
    left:16px;
    bottom:18px;
    font-size:min(var(--gaa-global-small-size,16px),4vw);
  }
  .gaa-global-mark{
    top:16px;
    left:16px;
    min-width:64px;
    height:36px;
    padding:0 13px;
    font-size:13px;
  }
  .gaa-global-close{
    top:max(18px,calc(env(safe-area-inset-top) + 12px));
    right:max(20px,calc(env(safe-area-inset-right) + 16px));
    width:56px;
    height:56px;
    min-width:56px;
    min-height:56px;
  }
  .gaa-global-logo{
    right:16px;
    bottom:16px;
    width:42px;
    height:42px;
  }
}

@media(max-width:430px){
  .gaa-global-gateway{
    padding-left:22px;
    padding-right:22px;
  }
  .gaa-global-card{
    width:100%;
    height:min(72dvh,760px);
    min-height:500px;
    border-radius:24px;
  }
}

