/* ==========================================================================
   Google Preferred Source CTA — Newsroom Minimal (scoped, ไม่ชน theme เดิม)
   ใช้กับ THE STANDARD และ THE STANDARD GLOBAL
   ========================================================================== */

/* ---------- Share rows: ใส่ class นี้ที่ container ที่ห่อ ul.single-share ---------- */
.tsd-top-share,
.tsd-bottom-share {
  --tsd-share-size: 32px;  /* ขนาดไอคอน social และความสูงปุ่ม */
  --tsd-share-gap: 8px;    /* ระยะห่างระหว่างไอคอน */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  /*gap: 10px 12px;*/
}

.tsd-bottom-share {
  /*border-top: 1px solid #ddd;*/
  /*padding-top: 14px;*/
}

/* จัดไอคอน social เดิมให้อยู่แนวเดียวกัน ขนาดเท่ากัน ไม่ซ้อนกัน */
.tsd-top-share .single-share,
.tsd-bottom-share .single-share {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: var(--tsd-share-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tsd-top-share .single-share > li,
.tsd-bottom-share .single-share > li {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  float: none;
  width: var(--tsd-share-size);
  height: var(--tsd-share-size);
  margin: 0;
  padding: 0;
  top: auto;
  transform: none;
  line-height: 1;
}

.tsd-top-share .single-share > li:empty,
.tsd-bottom-share .single-share > li:empty {
  display: none;
}

.tsd-top-share .single-share > li > a,
.tsd-bottom-share .single-share > li > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  position: static;
  top: auto;
  line-height: 1;
}

.tsd-top-share .single-share > li img,
.tsd-top-share .single-share > li svg,
.tsd-bottom-share .single-share > li img,
.tsd-bottom-share .single-share > li svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: contain;
  vertical-align: middle;
}

/* ---------- Shared button base ---------- */
.tsd-ps-compact,
.tsd-ps-bottom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: #fff;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tsd-ps-compact .google-g,
.tsd-ps-bottom .google-g {
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

.tsd-ps-compact:focus-visible,
.tsd-ps-bottom:focus-visible {
  outline: 2px solid #8ab4f8;
  outline-offset: 3px;
}

.tsd-ps-compact[aria-busy="true"],
.tsd-ps-bottom[aria-busy="true"] {
  opacity: .6;
  cursor: progress;
}

/* ---------- Top: "Preferred Source" ---------- */
.tsd-ps-compact {
  height: var(--tsd-share-size, 32px);
  gap: 6px;
  padding: 8px;
  border: 1px solid #b8b8b8;
  color: #333;
  font: 700 12px/1 Kanit, system-ui, "Noto Sans Thai", sans-serif;
  letter-spacing: .02em;
}

.tsd-ps-compact .google-g {
  width: 14px;
  height: 14px;
}

.tsd-ps-compact:hover,
.tsd-ps-compact:focus-visible {
  border-color: #e62227;
  color: #e62227;
  text-decoration: none;
}

/* ---------- Bottom: "เพิ่มเป็นแหล่งข่าวโปรด" ---------- */
.tsd-ps-bottom {
  height: var(--tsd-share-size, 32px);
  gap: 6px;
  margin-left: 0;
  padding: 8px;
  border: 1px solid #b7bcc0;
  color: #444;
  font: 700 12px/1.2 Kanit, "Arial", sans-serif;
}

.tsd-ps-bottom .google-g {
  width: 16px;
  height: 16px;
}

.tsd-ps-bottom:hover,
.tsd-ps-bottom:focus-visible {
  border-color: #e62227;
  color: #e62227;
  text-decoration: none;
}

/* ---------- THE STANDARD GLOBAL: ใช้ font ของ Global theme ---------- */
.tsd-ps-compact.is-global,
.tsd-ps-bottom.is-global {
  font-family: inherit;
}

/* ---------- Mobile (ไม่ล้นที่ 320px: row จะ wrap แทน) ---------- */
@media (max-width: 767px) {
  .tsd-top-share,
  .tsd-bottom-share {
    --tsd-share-size: 30px;
    --tsd-share-gap: 6px;
  }

  .tsd-ps-compact {
    gap: 5px;
    padding: 0 7px;
    min-width: 175px;
  }

  .tsd-ps-bottom {
    padding: 0 8px;
    font-size: 10px;
    min-width: 175px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tsd-ps-compact,
  .tsd-ps-bottom {
    transition: none;
  }
}
