/* Sixtygram SMM Kadence hub — selection without layout-shifting borders */

/* Same custom fonts as sixtygram.com (Kadence Theme → Topic / SIxtygram System) */
@font-face {
  font-family: "Topic";
  font-style: normal;
  font-weight: 400;
  src: url("/assets/fonts/Kanit-Light.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: "SIxtygram System";
  font-style: normal;
  font-weight: 400;
  src: url("/assets/fonts/Kanit-Light.woff") format("woff");
  font-display: swap;
}

.sg-smm-hub {
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
  --global-body-font-family: "SIxtygram System", "Topic", sans-serif;
  --global-heading-font-family: Topic, "SIxtygram System", sans-serif;
  font-family: var(--global-body-font-family);
}
.sg-smm-hub,
.sg-smm-hub .wp-block-kadence-advancedheading,
.sg-smm-hub [class*="kt-adv-heading"],
.sg-smm-hub p,
.sg-smm-hub button,
.sg-smm-hub .kb-button,
.sg-smm-hub input,
.sg-smm-hub .kt-btn-inner-text,
.sg-smm-hub .kb-adv-form-field {
  font-family: var(--global-body-font-family) !important;
}
.sg-smm-hub h1,
.sg-smm-hub h2,
.sg-smm-hub h3,
.sg-smm-hub h4,
.sg-smm-hub h5,
.sg-smm-hub h6,
.sg-smm-hub .wp-block-kadence-advancedheading {
  font-family: var(--global-heading-font-family) !important;
}

/* Package tiles keep their grid from first paint; text stays hidden until JS fills real quantities. */
.sg-smm-hub:not(.is-pkg-ready) .kb-row-layout-id23330_edd8da-8e > .kt-row-column-wrap {
  visibility: hidden;
}

/* Show-more: open once — hide the button row after expand */
.sg-smm-hub .kb-block-show-more-container.kb-smc-open > .kb-show-more-buttons,
.sg-smm-hub .kb-block-show-more-container.kb-smc-open > .wp-block-kadence-advancedbtn.kb-show-more-buttons {
  display: none !important;
}

/*
 * Platform orange ring sits outside the figure. Kadence show-more content uses
 * max-height + overflow:hidden (+ bottom mask), which clips the TOP of the ring.
 * Always pad the clipper so the ring draws inside the overflow box.
 */
.sg-smm-hub .kb-block-show-more-container > .wp-block-kadence-column.kb-show-more-content {
  padding-top: 6px !important;
  padding-bottom: 2px !important;
  box-sizing: border-box !important;
}
.sg-smm-hub .kb-block-show-more-container:not(.kb-smc-open) > .wp-block-kadence-column.kb-show-more-content {
  /* 115px design height + pad for ring */
  max-height: 128px !important;
}
.sg-smm-hub .kb-block-show-more-container.kb-smc-open > .wp-block-kadence-column.kb-show-more-content {
  overflow: visible !important;
  max-height: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}
.sg-smm-hub .kb-block-show-more-container > .wp-block-kadence-column.kb-show-more-content > .kt-inside-inner-col {
  overflow: visible !important;
}

/* Platform detail panel: banner bg swaps with selected platform (FB / TT / IG) */
.sg-smm-hub .kadence-column23330_8c374e-49 > .kt-inside-inner-col.sg-smm-panel-has-bg {
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center right !important;
}

/*
 * "เลือกสินค้า" panel — termgame light panel:
 * #EFEFEF + white light wash down + sparse SVG mesh + gold accent.
 */
.sg-smm-hub .kadence-column23330_257199-f8 > .kt-inside-inner-col {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 0;
  /* termgame nav.relative > absolute inset-0 bg-[#EFEFEF] */
  background: #efefef !important;
  box-shadow: none !important;
}
.sg-smm-hub .kadence-column23330_257199-f8 > .kt-inside-inner-col::before,
.sg-smm-hub .kadence-column23330_257199-f8 > .kt-inside-inner-col::after {
  content: none !important;
}
.sg-smm-hub .kadence-column23330_257199-f8 > .kt-inside-inner-col > :not(.sg-smm-panel-deco) {
  position: relative;
  z-index: 1;
}
.sg-smm-hub .kadence-column23330_c0626a-83,
.sg-smm-hub .kadence-column23330_c0626a-83 > .kt-inside-inner-col {
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

.sg-smm-hub .sg-smm-panel-deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.sg-smm-hub .sg-smm-panel-deco__mesh {
  position: absolute;
  inset: 0;
  background: none;
  opacity: 1;
}
.sg-smm-hub .sg-smm-panel-deco__mesh > svg,
.sg-smm-hub .sg-smm-panel-deco__mesh-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}
/* No extra wash — keeps #EFEFEF uniform (no gray/gray seam) */
.sg-smm-hub .sg-smm-panel-deco__mesh::after {
  content: none;
}
/* Gold accent above mesh */
.sg-smm-hub .sg-smm-panel-deco__accent {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  pointer-events: none;
}
.sg-smm-hub .sg-smm-panel-deco__bar7,
.sg-smm-hub .sg-smm-panel-deco__bar27 {
  display: none; /* wedge SVG handles accent; avoid gray flex fills */
}
.sg-smm-hub .sg-smm-panel-deco__accent > svg,
.sg-smm-hub .sg-smm-panel-deco__wedge {
  display: block;
  height: 27px;
  width: 100%;
  flex: 1 1 auto;
}
.sg-smm-hub .sg-smm-panel-deco__wedge:not(svg) {
  height: 27px;
  background: linear-gradient(90deg, #f2b13e 0% 72%, #fdd373 100%);
  clip-path: polygon(
    0 0,
    100% 0,
    100% 100%,
    77.18% 100%,
    73.08% 25.93%,
    0 25.93%
  );
}

/* Platform rail: also leave a little headroom around tiles */
.sg-smm-hub .kadence-column23330_5fa1f3-6b > .kt-inside-inner-col {
  overflow: visible !important;
  padding-top: 4px;
  padding-bottom: 4px;
  box-sizing: border-box;
}

/* Mobile: 4 platforms per row, 2 rows visible before "ดูเพิ่มเติม" */
@media (max-width: 767px) {
  .sg-smm-hub .kadence-column23330_5fa1f3-6b > .kt-inside-inner-col {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    column-gap: 8px !important;
    row-gap: 10px !important;
  }
  .sg-smm-hub .kadence-column23330_5fa1f3-6b > .kt-inside-inner-col > .wp-block-kadence-column,
  .sg-smm-hub .kadence-column23330_5fa1f3-6b > .kt-inside-inner-col > .sg-smm-plat {
    flex: 0 0 calc((100% - 24px) / 4) !important; /* 4 cols, 3×8px gaps */
    max-width: calc((100% - 24px) / 4) !important;
    width: calc((100% - 24px) / 4) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .sg-smm-hub .sg-smm-plat .kb-image-is-ratio-size,
  .sg-smm-hub .sg-smm-plat .wp-block-kadence-image.kb-image-is-ratio-size,
  .sg-smm-hub .sg-smm-plat .kb-is-ratio-image {
    max-width: 56px !important;
    width: 56px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .sg-smm-hub .sg-smm-plat .wp-block-kadence-advancedheading,
  .sg-smm-hub .sg-smm-plat [class*="kt-adv-heading"] {
    font-size: 11px !important;
    line-height: 1.25 !important;
    text-align: center;
  }
  .sg-smm-hub .kb-block-show-more-container:not(.kb-smc-open) > .wp-block-kadence-column.kb-show-more-content {
    max-height: 130px !important;
  }

  /* Sticky checkout bar — same row: summary | pay button */
  .sg-smm-hub .kadence-column23330_2b5065-10 {
    padding-bottom: calc(50px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box;
  }
  .sg-smm-hub .kadence-column23330_814675-56.kb-section-sm-dir-vertical,
  .sg-smm-hub .kadence-column23330_814675-56 {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 10040;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    height: auto !important;
    max-height: none !important;
    background: #fff !important;
    box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.12);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
    /* No transform/will-change here — iOS Safari lets transformed fixed bars lag then snap during scroll */
  }
  /* Grid avoids Kadence flex:1 1 0% collapsing the summary column */
  .sg-smm-hub .kadence-column23330_814675-56 > .kt-inside-inner-col {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto !important;
    align-items: center !important;
    column-gap: 12px !important;
    row-gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
  }
  .sg-smm-hub .kadence-column23330_814675-56 > .kt-inside-inner-col > .kadence-column23330_2683e3-4e {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    flex: none !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    flex-basis: auto !important;
  }
  .sg-smm-hub .kadence-column23330_814675-56 .kadence-column23330_2683e3-4e > .kt-inside-inner-col {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 2px !important;
  }
  .sg-smm-hub .kadence-column23330_814675-56 .kt-adv-heading23330_6bb086-ec {
    font-size: 13px !important;
    margin: 0 !important;
    text-align: right !important;
    line-height: 1.25 !important;
    color: rgb(26, 32, 44) !important; /* (20 + 20) stays black */
  }
  .sg-smm-hub .kadence-column23330_814675-56 .kt-adv-heading23330_e10758-c7 {
    font-size: 12px !important;
    margin: 0 !important;
    text-align: right !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  .sg-smm-hub .kadence-column23330_814675-56 > .kt-inside-inner-col > .kb-buttons-wrap,
  .sg-smm-hub .kadence-column23330_814675-56 > .kt-inside-inner-col > .wp-block-kadence-advancedbtn,
  .sg-smm-hub .kadence-column23330_814675-56 .kb-btns23330_9f68cb-28 {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    flex: none !important;
    display: block !important;
  }
  .sg-smm-hub .kadence-column23330_814675-56 .kb-btn23330_75d73f-d8 {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    margin: 0 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }
}

/* Pay CTA — beat Kadence buggy `.kb-button:hover{background:transparent}` from another btn */
.sg-smm-hub .kb-btn23330_75d73f-d8.kb-button,
.sg-smm-hub button.kb-btn23330_75d73f-d8 {
  background: #06a73f !important;
  color: #fff !important;
  border-color: #06a73f !important;
}
.sg-smm-hub .kb-btn23330_75d73f-d8.kb-button:hover,
.sg-smm-hub .kb-btn23330_75d73f-d8.kb-button:focus,
.sg-smm-hub .kb-btn23330_75d73f-d8.kb-button:focus-visible,
.sg-smm-hub .kb-btn23330_75d73f-d8.kb-button:active,
.sg-smm-hub button.kb-btn23330_75d73f-d8:hover,
.sg-smm-hub button.kb-btn23330_75d73f-d8:focus,
.sg-smm-hub button.kb-btn23330_75d73f-d8:focus-visible,
.sg-smm-hub button.kb-btn23330_75d73f-d8:active {
  background: #048532 !important;
  color: #fff !important;
  border-color: #048532 !important;
}
.sg-smm-hub .kb-btn23330_75d73f-d8.kb-button .kt-btn-inner-text,
.sg-smm-hub .kb-btn23330_75d73f-d8.kb-button .kb-svg-icon-wrap,
.sg-smm-hub .kb-btn23330_75d73f-d8.kb-button .kb-svg-icon-wrap svg {
  color: #fff !important;
  fill: #fff !important;
  stroke: #fff !important;
}

/* Summary qty line — one row; highlight + bonus sit tight; bonus ellipsizes if needed */
.sg-smm-hub .kt-adv-heading23330_6bb086-ec,
.sg-smm-hub .wp-block-kadence-advancedheading.kt-adv-heading23330_6bb086-ec {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: baseline !important;
  justify-content: flex-end !important;
  gap: 0.2ch !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
/* Summary highlights — green like 4c6a56 (beats Kadence orange mark.kt-highlight) */
.sg-smm-hub .wp-block-kadence-advancedheading.kt-adv-heading23330_6bb086-ec mark.kt-highlight,
.sg-smm-hub .wp-block-kadence-advancedheading.kt-adv-heading23330_6bb086-ec[data-kb-block="kb-adv-heading23330_6bb086-ec"] mark.kt-highlight,
.sg-smm-hub .wp-block-kadence-advancedheading.kt-adv-heading23330_e10758-c7 mark.kt-highlight,
.sg-smm-hub .wp-block-kadence-advancedheading.kt-adv-heading23330_e10758-c7[data-kb-block="kb-adv-heading23330_e10758-c7"] mark.kt-highlight {
  color: rgb(3, 138, 50) !important;
  background: transparent !important;
  font-weight: 400 !important;
  padding: 0 !important;
  margin: 0 !important;
}
.sg-smm-hub .kt-adv-heading23330_6bb086-ec mark.kt-highlight {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}
.sg-smm-hub .kt-adv-heading23330_6bb086-ec .sg-smm-sum-bonus {
  flex: 0 1 auto !important; /* shrink for … — do NOT grow (was causing a huge gap) */
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: rgb(26, 32, 44) !important;
  font-weight: 400 !important;
  text-align: left !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Hide WP mock summary until JS paints — kills refresh jump */
.sg-smm-hub:not(.is-summary-ready) .kadence-column23330_2683e3-4e {
  visibility: hidden;
}

/* —— Platform tiles —— */
.sg-smm-hub .sg-smm-plat {
  cursor: pointer;
}
.sg-smm-hub .sg-smm-plat.is-disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(.35);
}

/* Neutralize baked selected ring (uniqueID 1eecec) — border stays 0; ring via outer shadow on figure */
.sg-smm-hub .kb-image23330_1eecec-8c img.kb-img,
.sg-smm-hub .kb-image23330_1eecec-8c .kb-img img,
.sg-smm-hub .kb-image23330_1eecec-8c img,
.sg-smm-hub .sg-smm-plat .kb-is-ratio-image img,
.sg-smm-hub .sg-smm-plat img.kb-img,
.sg-smm-hub .sg-smm-plat .kb-is-ratio-image .kb-img,
.sg-smm-hub .sg-smm-plat .kb-image-is-ratio-size img {
  border: 0 solid transparent !important;
  box-shadow: none !important;
}
.sg-smm-hub .sg-smm-plat .wp-block-kadence-image,
.sg-smm-hub .sg-smm-plat .kb-image-is-ratio-size,
.sg-smm-hub .sg-smm-plat .kb-is-ratio-image {
  overflow: visible !important;
  box-shadow: none !important;
}

/* Selected platform: orange ring on figure (not img) so overflow:hidden on ratio box cannot clip it */
.sg-smm-hub .sg-smm-plat .wp-block-kadence-advancedheading,
.sg-smm-hub .sg-smm-plat [class*="kt-adv-heading"] {
  color: rgba(26, 32, 44, 0.55) !important;
  font-weight: 400 !important;
}
.sg-smm-hub .sg-smm-plat.sg-smm-on .wp-block-kadence-advancedheading,
.sg-smm-hub .sg-smm-plat.sg-smm-on [class*="kt-adv-heading"] {
  color: rgb(5, 5, 5) !important;
  font-weight: 700 !important;
}
.sg-smm-hub .sg-smm-plat.sg-smm-on .wp-block-kadence-image,
.sg-smm-hub .sg-smm-plat.sg-smm-on .kb-image-is-ratio-size {
  border-radius: 14px !important;
  /* Crisp orange border — no soft outer glow (glow gets clipped + looks washed) */
  box-shadow: 0 0 0 3px rgb(245, 165, 36) !important;
}
.sg-smm-hub .sg-smm-plat.sg-smm-on .kb-is-ratio-image img,
.sg-smm-hub .sg-smm-plat.sg-smm-on img.kb-img,
.sg-smm-hub .sg-smm-plat.sg-smm-on .kb-image-is-ratio-size img {
  opacity: 1;
  filter: none;
  border-radius: 14px !important;
}
.sg-smm-hub .sg-smm-plat:not(.sg-smm-on):not(.is-disabled) .kb-is-ratio-image img,
.sg-smm-hub .sg-smm-plat:not(.sg-smm-on):not(.is-disabled) img.kb-img {
  opacity: 0.72;
}

/* Metric pills: idle 1px border; selected keeps 2px orange ring */
.sg-smm-hub .sg-smm-metric,
.sg-smm-hub .kt-adv-heading23330_5e3d92-59.sg-smm-metric,
.sg-smm-hub .kt-adv-heading23330_82eb03-7e.sg-smm-metric,
.sg-smm-hub .kt-adv-heading23330_41b4cd-59.sg-smm-metric {
  cursor: pointer;
  display: inline-block;
  padding: 3px 20px !important;
  margin-bottom: 0 !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  border-radius: 99px !important;
  border: 1px solid rgba(0, 0, 0, 0.3) !important;
  background: transparent !important;
  color: rgba(0, 0, 0, 0.5) !important;
  box-shadow: none !important;
  outline: none !important;
}
/* Baked selected uniqueID 5e3d92 + <strong> inside — force faded when idle */
.sg-smm-hub .kt-adv-heading23330_5e3d92-59:not(.sg-smm-on),
.sg-smm-hub .sg-smm-metric:not(.sg-smm-on) {
  color: rgba(0, 0, 0, 0.5) !important;
  background: transparent !important;
  border-width: 1px !important;
  border-color: rgba(0, 0, 0, 0.3) !important;
  font-weight: 400 !important;
  box-shadow: none !important;
}
.sg-smm-hub .sg-smm-metric:not(.sg-smm-on) strong,
.sg-smm-hub .sg-smm-metric:not(.sg-smm-on) b,
.sg-smm-hub .kt-adv-heading23330_5e3d92-59:not(.sg-smm-on) strong,
.sg-smm-hub .kt-adv-heading23330_5e3d92-59:not(.sg-smm-on) b {
  font-weight: 400 !important;
  color: rgba(0, 0, 0, 0.5) !important;
}
.sg-smm-hub .sg-smm-metric.sg-smm-on {
  background: #fff !important;
  border-color: transparent !important; /* gray idle border off — orange shadow replaces it */
  color: rgb(26, 32, 44) !important;
  font-weight: 700 !important;
  box-shadow: 0 0 0 2px rgb(245, 165, 36) !important;
}
.sg-smm-hub .sg-smm-metric.sg-smm-on strong,
.sg-smm-hub .sg-smm-metric.sg-smm-on b {
  font-weight: 700 !important;
  color: inherit !important;
}
/* Mobile: match WP editor metric size (13px) */
@media (max-width: 767px) {
  .sg-smm-hub .sg-smm-metric,
  .sg-smm-hub .kt-adv-heading23330_5e3d92-59.sg-smm-metric,
  .sg-smm-hub .kt-adv-heading23330_82eb03-7e.sg-smm-metric,
  .sg-smm-hub .kt-adv-heading23330_41b4cd-59.sg-smm-metric {
    font-size: 13px !important;
    padding: 3px 14px !important;
  }
}
/* Summary pay line: always one line; JS hides .sg-smm-sum-pay-label when cramped */
.sg-smm-hub .kt-adv-heading23330_e10758-c7,
.sg-smm-hub .wp-block-kadence-advancedheading.kt-adv-heading23330_e10758-c7 {
  white-space: nowrap !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
.sg-smm-hub .kt-adv-heading23330_e10758-c7 .sg-smm-sum-pay-label[hidden] {
  display: none !important;
}

/* Qty packages: center icon+text in every tile (incl. กำหนดเอง) */
.sg-smm-hub .sg-smm-pkg {
  cursor: pointer;
}
.sg-smm-hub .sg-smm-pkg > .kt-inside-inner-col,
.sg-smm-hub .kadence-column23330_83196b-97 > .kt-inside-inner-col {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  background: transparent !important;
  border: 2px solid rgba(26, 32, 44, 0.2) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  outline: none !important;
  box-sizing: border-box !important;
}
.sg-smm-hub .sg-smm-pkg.sg-smm-on > .kt-inside-inner-col {
  background: rgba(245, 165, 36, 0.2) !important;
  border-color: transparent !important;
  box-shadow: 0 0 0 2px rgb(245, 165, 36) !important;
}
.sg-smm-hub .sg-smm-pkg [class*="kt-adv-heading"],
.sg-smm-hub .sg-smm-pkg .wp-block-kadence-advancedheading {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  text-align: center !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
.sg-smm-hub .sg-smm-pkg-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
  max-width: 100%;
  line-height: 1;
  margin: 0 auto;
}
.sg-smm-hub .sg-smm-metric-ic {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.sg-smm-hub .sg-smm-metric-ic svg {
  width: 1em;
  height: 1em;
  display: block;
}
.sg-smm-hub .sg-smm-pkg-label > span:last-child {
  line-height: 1;
  text-align: center;
}
.sg-smm-hub .sg-smm-fb-like-ic {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
}

/* Custom qty: tile only — input lives in popover */
.sg-smm-hub .sg-smm-pkg.is-custom input.sg-smm-custom-qty {
  display: none !important;
}
/*
 * Desktop: remap 6-col → 12 tracks so packages = span 2 (1 block)
 * and กำหนดเอง = span 3 (1.5 blocks). Tablet/mobile keep 3-col; custom full row.
 */
@media (min-width: 1025px) {
  .sg-smm-hub .kb-row-layout-id23330_edd8da-8e > .kt-row-column-wrap.kt-has-6-columns {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  }
  .sg-smm-hub .kb-row-layout-id23330_edd8da-8e > .kt-row-column-wrap > .wp-block-kadence-column:not(.kadence-column23330_1f2b90-e1) {
    width: auto !important;
    max-width: none !important;
    grid-column: span 2;
  }
  .sg-smm-hub .kb-row-layout-id23330_edd8da-8e > .kt-row-column-wrap > .kadence-column23330_1f2b90-e1,
  .sg-smm-hub .sg-smm-pkg.is-custom.kadence-column23330_1f2b90-e1 {
    width: auto !important;
    max-width: none !important;
    grid-column: span 3;
  }
}
@media (max-width: 1024px) {
  .sg-smm-hub .kb-row-layout-id23330_edd8da-8e > .kt-row-column-wrap > .sg-smm-pkg.is-custom,
  .sg-smm-hub .sg-smm-pkg.is-custom.kadence-column23330_1f2b90-e1 {
    width: auto !important;
    max-width: none !important;
    grid-column: span 3;
  }
}
/* 3-col layout (tablet+mobile): shrink icon+text so labels fit the tile */
@media (max-width: 1024px) {
  .sg-smm-hub .sg-smm-pkg > .kt-inside-inner-col {
    padding: 10px 6px !important;
  }
  .sg-smm-hub .sg-smm-pkg [class*="kt-adv-heading"],
  .sg-smm-hub .sg-smm-pkg .wp-block-kadence-advancedheading {
    font-size: 11px !important;
    line-height: 1.15 !important;
  }
  .sg-smm-hub .sg-smm-pkg-label {
    gap: 4px;
  }
  .sg-smm-hub .sg-smm-metric-ic,
  .sg-smm-hub .sg-smm-metric-ic svg,
  .sg-smm-hub .sg-smm-fb-like-ic {
    width: 0.85em;
    height: 0.85em;
  }
}

/* Custom qty popover (shorturl sgsu-pop style, anchored to กำหนดเอง) */
.sg-smm-pop {
  position: fixed;
  inset: 0;
  z-index: 10050;
}
.sg-smm-pop[hidden] {
  display: none !important;
}
.sg-smm-pop__backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}
.sg-smm-pop__card {
  position: fixed;
  top: 0;
  left: 0;
  box-sizing: border-box;
  width: 280px;
  max-width: calc(100vw - 16px);
  padding: 10px;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  box-shadow:
    0 16px 40px -12px rgba(15, 23, 42, 0.25),
    0 4px 12px -4px rgba(15, 23, 42, 0.08);
  color: #1d1d1f;
  font-family: inherit;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top center;
  transition: opacity 0.16s ease, transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.sg-smm-pop__card.is-above {
  transform: translateY(4px) scale(0.98);
  transform-origin: bottom center;
}
.sg-smm-pop.is-open .sg-smm-pop__card {
  opacity: 1;
  transform: none;
}
/* Caret pointing at กำหนดเอง tile */
.sg-smm-pop__arrow {
  position: absolute;
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 2px;
  transform: rotate(45deg);
  pointer-events: none;
  z-index: 1;
}
.sg-smm-pop__card.is-below .sg-smm-pop__arrow {
  top: -7px;
  border-right: 0;
  border-bottom: 0;
}
.sg-smm-pop__card.is-above .sg-smm-pop__arrow {
  bottom: -7px;
  border-left: 0;
  border-top: 0;
}
.sg-smm-pop__head {
  padding: 6px 8px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  margin-bottom: 10px;
  text-align: left;
}
.sg-smm-pop__title {
  display: block;
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.sg-smm-pop__sub {
  display: block;
  margin-top: 2px;
  color: #8e8e93;
  font-size: 11.5px;
  line-height: 1.35;
}
.sg-smm-pop__body {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 2px 4px 4px;
}
.sg-smm-pop__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  outline: none;
  background: #fff;
  color: #1d1d1f;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: left;
  caret-color: #f2b13e;
  appearance: textfield;
  -moz-appearance: textfield;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sg-smm-pop__input::-webkit-outer-spin-button,
.sg-smm-pop__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.sg-smm-pop__input::placeholder {
  color: #d1d1d6;
  font-weight: 600;
}
.sg-smm-pop__body:focus-within .sg-smm-pop__input,
.sg-smm-pop__body:focus-within .sg-smm-pop__confirm {
  border-color: #f2b13e;
}
.sg-smm-pop__body:focus-within .sg-smm-pop__input {
  box-shadow: none;
}
.sg-smm-pop__err {
  margin: 6px 4px 0;
  font-size: 12px;
  font-weight: 500;
  color: #dc2626;
  text-align: left;
}
.sg-smm-pop__err[hidden] {
  display: none !important;
}
.sg-smm-pop__confirm {
  flex: 0 0 42px;
  width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0 10px 10px 0;
  background: #f2b13e;
  color: #1a202c;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.sg-smm-pop__confirm svg {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}
.sg-smm-pop__confirm:hover {
  background: #e09e28;
  color: #111;
  filter: none;
}
.sg-smm-pop__confirm:active {
  background: #d49220;
}
.sg-smm-pop__confirm:focus-visible {
  outline: none;
  background: #e09e28;
}

/* Pay section subtitle — kill top/bottom spacing (Kadence margin-bottom:10px) */
.sg-smm-hub .kt-adv-heading23330_6b3cc9-89,
.sg-smm-hub .wp-block-kadence-advancedheading.kt-adv-heading23330_6b3cc9-89 {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* —— Pay cards: gray idle border; solid orange ring when selected (not soft glow) —— */
.sg-smm-hub .sg-smm-pay {
  cursor: pointer;
}
.sg-smm-hub .sg-smm-pay > .kt-inside-inner-col,
.sg-smm-hub .kadence-column23330_a4d5f3-3d > .kt-inside-inner-col,
.sg-smm-hub .kadence-column23330_5fcf28-1b > .kt-inside-inner-col,
.sg-smm-hub .kadence-column23330_494d7f-f6 > .kt-inside-inner-col {
  background: transparent !important;
  border: 2px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  outline: none !important;
  box-sizing: border-box !important;
}
.sg-smm-hub .sg-smm-pay.sg-smm-on > .kt-inside-inner-col {
  background: rgba(245, 165, 36, 0.2) !important;
  border-color: transparent !important;
  box-shadow: 0 0 0 2px rgb(245, 165, 36) !important;
}

/* Kill baked PromptPay soft glow on logo — selection chrome is the card ring above */
.sg-smm-hub .kb-image23330_89d0bc-98 img.kb-img,
.sg-smm-hub .kb-image23330_89d0bc-98 .kb-img img,
.sg-smm-hub .kb-image23330_89d0bc-98 img,
.sg-smm-hub .kb-image23330_b2ad31-2a img.kb-img,
.sg-smm-hub .kb-image23330_b2ad31-2a .kb-img img,
.sg-smm-hub .kb-image23330_b2ad31-2a img,
.sg-smm-hub .kb-image23330_aed06e-5f img.kb-img,
.sg-smm-hub .kb-image23330_aed06e-5f .kb-img img,
.sg-smm-hub .kb-image23330_aed06e-5f img,
.sg-smm-hub .sg-smm-pay .wp-block-kadence-image img.kb-img,
.sg-smm-hub .sg-smm-pay .wp-block-kadence-image img,
.sg-smm-hub .sg-smm-pay .wp-block-kadence-image {
  box-shadow: none !important;
}

/* Link box: let Kadence/WP padding win (was locked with !important and hid editor edits) */
.sg-smm-hub .kadence-column23330_72f634-75 > .kt-inside-inner-col {
  box-sizing: border-box !important;
}
/* Match submit button height to link field field441be2-82 */
.sg-smm-hub #field23402441be2-82,
.sg-smm-hub input[name="field441be2-82"] {
  height: 40px !important;
  min-height: 40px !important;
  box-sizing: border-box !important;
}
.sg-smm-hub .kadence-column23330_72f634-75 .kb-adv-form-submit-button.kb-btn1_default,
.sg-smm-hub .kb-adv-form-submit-button.kb-btn1_default {
  height: 40px !important;
  min-height: 40px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
}
/* Kadence global-fill :hover/:focus uses --global-palette-btn-bg-hover, which is transparent here. */
.sg-smm-hub .kb-adv-form-submit-button.kb-btn1_default,
.sg-smm-hub .kb-adv-form-submit-button.kb-btn1_default:hover,
.sg-smm-hub .kb-adv-form-submit-button.kb-btn1_default:focus,
.sg-smm-hub .kb-adv-form-submit-button.kb-btn1_default:focus-visible,
.sg-smm-hub .kb-adv-form-submit-button.kb-btn1_default:active {
  background: rgb(6, 167, 63) !important;
  color: #fff !important;
}
.sg-smm-hub .kb-adv-form-submit-button.kb-btn1_default .kb-svg-icon-wrap,
.sg-smm-hub .kb-adv-form-submit-button.kb-btn1_default .kb-svg-icon-wrap svg {
  width: 18px !important;
  height: 18px !important;
  display: block;
}
.sg-smm-hub .sg-smm-link-msg {
  font-size: 13px;
  margin-top: 6px;
  min-height: 0;
  line-height: 1.3;
}
.sg-smm-hub .sg-smm-link-msg:empty {
  display: none;
  margin: 0;
}
.sg-smm-hub .sg-smm-link-msg.ok { color: #15803d; }
.sg-smm-hub .sg-smm-link-msg.err { color: #dc2626; }
.sg-smm-hub .sg-smm-link-msg.checking {
  color: #6b6b6b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sg-smm-hub .sg-smm-link-msg.checking::before {
  content: '';
  width: 13px;
  height: 13px;
  flex: none;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: sg-smm-link-spin .8s linear infinite;
}
@keyframes sg-smm-link-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .sg-smm-hub .sg-smm-link-msg.checking::before { animation-duration: 2.4s; }
}
.sg-smm-busy { opacity: .6; pointer-events: none; }

html.sg-at-bottom,
html.sg-at-bottom body {
  overscroll-behavior-y: none;
}

/* Fluid carousel — dark strip, native banner ratio 900×340, tight gap */
.sg-smm-hub .kb-gallery-type-fluidcarousel,
.sg-smm-hub .kt-blocks-carousel.splide {
  position: relative;
  background: #151515;
}
/* cqw = % of gallery width (not viewport) — avoids tall black gap from 48vw */
.sg-smm-hub .kb-gallery-type-fluidcarousel {
  container-type: inline-size;
  container-name: sg-hub-carousel;
}
/* Slides are out-of-flow, so the flex child must not shrink to content before JS measures it */
.sg-smm-hub .kb-gallery-type-fluidcarousel > .kt-blocks-carousel {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
}
/* Hide until our Splide mount finishes — avoids Kadence→remount jump */
.sg-smm-hub .kt-blocks-carousel {
  visibility: hidden;
  opacity: 0;
  /* Reserve space from container width: pad + ~48% slide × 900/340 */
  min-height: calc(30px + 48cqw * 340 / 900);
  max-height: none;
}
@media (min-width: 1440px) {
  .sg-smm-hub .kt-blocks-carousel {
    min-height: min(291px, calc(30px + 48cqw * 340 / 900));
  }
}
@media (max-width: 767px) {
  .sg-smm-hub .kt-blocks-carousel {
    /* ~82% slide width + tighter vertical pad */
    min-height: calc(16px + 82cqw * 340 / 900);
  }
}
.sg-smm-hub .kt-blocks-carousel.sg-smm-carousel-ready {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s ease;
  /* Let Splide/content own height — don't keep inflated placeholder */
  min-height: 0;
  contain: layout paint;
  overflow-anchor: none;
}
.sg-smm-hub .kt-blocks-carousel .splide__track {
  overflow: hidden;
  padding: 15px 0;
}
.sg-smm-hub .kt-blocks-carousel .splide__list {
  will-change: transform;
  backface-visibility: hidden;
}
/* Dark band = track only: drop Kadence wrap padding and dots margin so gaps above/below match */
.sg-smm-hub .wp-block-kadence-advancedgallery.kb-gallery-wrap-id-23330_2ef9da-f1 {
  padding: 0 !important;
  margin-bottom: 0 !important;
}
.sg-smm-hub .kb-splide[data-slider-dots="true"],
.sg-smm-hub .kt-blocks-carousel.kb-splide[data-slider-dots="true"],
.sg-smm-hub .kb-gallery-type-fluidcarousel.kb-splide[data-slider-dots="true"] {
  margin-bottom: 0 !important;
}
@media (max-width: 767px) {
  .sg-smm-hub .kt-blocks-carousel .splide__track {
    padding: 6px 0; /* less black bar above/below banners */
    touch-action: pan-y pinch-zoom; /* vertical page scroll wins over Splide drag */
  }
  .sg-smm-hub .kt-blocks-carousel .sg-smm-carousel-fade {
    width: 6%;
  }
  /* Kill Kadence dots bottom margin on mobile */
  .sg-smm-hub .kb-splide[data-slider-dots="true"],
  .sg-smm-hub .kt-blocks-carousel.kb-splide[data-slider-dots="true"],
  .sg-smm-hub .kb-gallery-type-fluidcarousel.kb-splide[data-slider-dots="true"] {
    margin-bottom: 0 !important;
  }
  .sg-smm-hub .wp-block-kadence-advancedgallery.kb-gallery-wrap-id-23330_2ef9da-f1 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 0 !important;
  }
}
.sg-smm-hub .kb-gallery-type-fluidcarousel .splide__list {
  align-items: center;
}
.sg-smm-hub .kb-gallery-type-fluidcarousel .splide__slide {
  position: relative;
  z-index: 1;
  height: auto !important;
  aspect-ratio: 900 / 340;
  min-height: 0;
  overflow: hidden;
  flex: 0 0 auto !important;
}
/* Out of flow so an off-ratio upload cannot stretch its slide past 900×340 */
.sg-smm-hub .kb-gallery-type-fluidcarousel .splide__slide .kadence-blocks-gallery-item {
  position: absolute;
  inset: 0;
}
.sg-smm-hub .kb-gallery-type-fluidcarousel .splide__slide .kadence-blocks-gallery-item-inner {
  height: 100%;
}
.sg-smm-hub .kb-gallery-type-fluidcarousel .splide__slide.is-active {
  z-index: 3;
}
/* Side slides: dim only — no scale (scale made tops look misaligned) */
.sg-smm-hub .kb-gallery-type-fluidcarousel .splide__slide .kb-gal-image-radius {
  transform: none;
  transition: none;
}
.sg-smm-hub .kt-blocks-carousel.sg-smm-carousel-ready .splide__slide .kb-gal-image-radius {
  transition: opacity 0.35s ease;
}
.sg-smm-hub .kb-gallery-type-fluidcarousel .splide__slide:not(.is-active) .kb-gal-image-radius {
  opacity: 0.5;
}
.sg-smm-hub .kb-gallery-type-fluidcarousel .splide__slide.is-active .kb-gal-image-radius {
  opacity: 1;
}
.sg-smm-hub .kb-gallery-type-fluidcarousel .splide__slide .kb-gallery-figure {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  margin: 0 !important;
  background: #151515 !important;
  line-height: 0;
}
.sg-smm-hub .kb-gallery-type-fluidcarousel .splide__slide .kb-gal-image-radius {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  position: relative;
  background: #151515 !important;
  line-height: 0;
}
.sg-smm-hub .kb-gallery-type-fluidcarousel .splide__slide .kb-gallery-image-contain {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  background: #151515 !important;
  line-height: 0;
}
.sg-smm-hub .kb-gallery-type-fluidcarousel .kt-blocks-carousel figure .kb-gal-image-radius img,
.sg-smm-hub .kb-gallery-type-fluidcarousel .splide__slide img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
  border-radius: 12px !important;
  background: #151515;
}
.sg-smm-hub picture.sg-picture { display: contents; }

/* Edge vignettes — narrow so they do not swallow the active center slide */
.sg-smm-hub .kt-blocks-carousel .sg-smm-carousel-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 11%;
  pointer-events: none;
  z-index: 4;
  transform: translateZ(0);
}
.sg-smm-hub .kt-blocks-carousel .sg-smm-carousel-fade--left {
  left: 0;
  background: linear-gradient(to right, #151515 0%, rgba(21, 21, 21, 0.65) 45%, rgba(21, 21, 21, 0) 100%);
}
.sg-smm-hub .kt-blocks-carousel .sg-smm-carousel-fade--right {
  right: 0;
  background: linear-gradient(to left, #151515 0%, rgba(21, 21, 21, 0.65) 45%, rgba(21, 21, 21, 0) 100%);
}

.sg-smm-hub .kt-blocks-carousel .splide__arrow {
  z-index: 5;
}

/* Pagination pinned on active slide; hidden until JS places it */
.sg-smm-hub .kt-blocks-carousel .splide__pagination {
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  top: 0;
  width: auto !important;
  transform: translateX(-50%) !important;
  z-index: 6;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  gap: 6px;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.sg-smm-hub .kt-blocks-carousel .splide__pagination.sg-smm-pag-ready {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.18s ease;
}
.sg-smm-hub .kt-blocks-carousel .splide__pagination__page {
  background: rgba(255, 255, 255, 0.4) !important;
  opacity: 1 !important;
  width: 8px !important;
  height: 8px !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}
.sg-smm-hub .kt-blocks-carousel .splide__pagination__page.is-active {
  background: #fff !important;
  width: 10px !important;
  height: 10px !important;
  transform: none !important;
}

/* —— Audience toggle (งานต่างชาติ / งานคนไทย) under 「2. จำนวนบริการที่ต้องการ」 —— */
.sg-smm-aud {
  position: relative;
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 4px;
  padding: 3px;
  margin: 12px 0 -8px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.05);
  white-space: nowrap;
}
.sg-smm-aud__pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 0;
  border-radius: 99px;
  background: #fff;
  box-shadow: 0 0 0 2px rgb(245, 165, 36), 0 2px 6px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  opacity: 0;
}
.sg-smm-aud.has-pill .sg-smm-aud__pill {
  opacity: 1;
}
.sg-smm-aud.is-anim .sg-smm-aud__pill {
  transition: transform 0.32s cubic-bezier(0.34, 1.3, 0.64, 1), width 0.32s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.sg-smm-aud__btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  appearance: none;
  border: 0;
  margin: 0;
  padding: 5px 18px;
  border-radius: 99px;
  background: transparent;
  color: rgba(0, 0, 0, 0.55);
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.sg-smm-aud__ic {
  flex: none;
  width: 16px;
  height: 16px;
  display: block;
}
.sg-smm-aud__btn.is-disabled .sg-smm-aud__ic {
  opacity: 0.4;
}
.sg-smm-aud__live {
  flex: none;
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.7);
  animation: sg-smm-live 2.2s ease-in-out infinite;
}
/* Pulse ring on its own layer — transform/opacity only, no per-frame repaint */
.sg-smm-aud__live::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.45);
  animation: sg-smm-live-ring 2.2s ease-in-out infinite;
  will-change: transform, opacity;
}
.sg-smm-aud__btn.is-disabled .sg-smm-aud__live {
  background: #9ca3af;
  box-shadow: none;
  animation: none;
}
.sg-smm-aud__btn.is-disabled .sg-smm-aud__live::after {
  display: none;
}
@keyframes sg-smm-live {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}
@keyframes sg-smm-live-ring {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(2.15);
    opacity: 0;
  }
}
.sg-smm-aud__btn.sg-smm-on {
  background: #fff;
  color: rgb(26, 32, 44);
  font-weight: 700;
  box-shadow: 0 0 0 2px rgb(245, 165, 36);
}
.sg-smm-aud.has-pill .sg-smm-aud__btn.sg-smm-on {
  background: transparent;
  box-shadow: none;
}
/* Beat Kadence's global button:hover / :focus (dark fill + white text). */
.sg-smm-aud .sg-smm-aud__btn:hover,
.sg-smm-aud .sg-smm-aud__btn:focus {
  background: rgba(0, 0, 0, 0.06);
  color: rgb(26, 32, 44);
  box-shadow: none;
  text-decoration: none;
}
.sg-smm-aud .sg-smm-aud__btn.sg-smm-on:hover,
.sg-smm-aud .sg-smm-aud__btn.sg-smm-on:focus {
  background: #fff;
  box-shadow: 0 0 0 2px rgb(245, 165, 36);
}
.sg-smm-aud.has-pill .sg-smm-aud__btn.sg-smm-on:hover,
.sg-smm-aud.has-pill .sg-smm-aud__btn.sg-smm-on:focus {
  background: transparent;
  box-shadow: none;
}
.sg-smm-aud .sg-smm-aud__btn:focus-visible {
  outline: 2px solid rgb(245, 165, 36);
  outline-offset: 2px;
}
.sg-smm-aud__btn.is-disabled,
.sg-smm-aud .sg-smm-aud__btn.is-disabled:hover {
  background: transparent;
  color: rgba(0, 0, 0, 0.25);
  cursor: not-allowed;
}
@media (prefers-reduced-motion: reduce) {
  .sg-smm-aud.is-anim .sg-smm-aud__pill,
  .sg-smm-aud__btn {
    transition: none;
  }
  .sg-smm-aud__live,
  .sg-smm-aud__live::after {
    animation: none;
  }
}
@media (max-width: 767px) {
  .sg-smm-aud__ic {
    width: 14px;
    height: 14px;
  }
  .sg-smm-aud__live {
    width: 6px;
    height: 6px;
  }
  .sg-smm-aud__btn {
    gap: 5px;
    padding: 4px 12px;
    font-size: 13px;
  }
}

/* —— Center notice (same card as กำลังโหลด…) —— */
.sg-smm-notice {
  position: fixed;
  inset: 0;
  z-index: 10095;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.sg-smm-notice[hidden] {
  display: none !important;
}
.sg-smm-notice__card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 14px 18px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  color: #1a1a1a;
  font-size: 0.95rem;
  line-height: 1.3;
  font-family: "SIxtygram System", "Topic", sans-serif;
}
.sg-smm-notice__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgb(245, 165, 36);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.sg-smm-notice.has-sub .sg-smm-notice__card {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
}
.sg-smm-notice.has-sub .sg-smm-notice__icon {
  display: none;
}
.sg-smm-notice__row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}
.sg-smm-notice__text {
  font-weight: 400;
}
/* One line each; fitNoticeLines() shrinks the font before the ellipsis is ever needed. */
.sg-smm-notice__text,
.sg-smm-notice__subtext {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.15em 0;
  margin: -0.15em 0;
}
.sg-smm-notice__sub {
  color: #6b6b6b;
  font-size: 0.85rem;
}
.sg-smm-notice__sub[hidden] {
  display: none;
}
.sg-smm-notice__spinbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}
.sg-smm-notice__spin {
  color: rgb(245, 165, 36);
  animation: sg-smm-notice-spin 0.9s linear infinite;
}
@keyframes sg-smm-notice-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sg-smm-notice__spin {
    animation: none;
  }
}
@media (min-width: 768px) {
  .sg-smm-notice__card {
    padding: 20px 28px;
    gap: 12px;
    border-radius: 14px;
    font-size: 1.15rem;
  }
  .sg-smm-notice.has-sub .sg-smm-notice__card {
    gap: 10px;
  }
  .sg-smm-notice__sub {
    font-size: 1rem;
  }
  .sg-smm-notice__icon,
  .sg-smm-notice__spinbox {
    width: 24px;
    height: 24px;
  }
  .sg-smm-notice__icon {
    font-size: 15px;
  }
  .sg-smm-notice__spin {
    width: 19px;
    height: 19px;
  }
}

/* —— Link check modal (checking / error / info) on the center notice card —— */
.sg-smm-notice.sg-smm-lmodal {
  pointer-events: auto;
  z-index: 10096;
}
.sg-smm-lmodal .sg-smm-notice__card {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: min(300px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  width: auto;
}
.sg-smm-lmodal .sg-smm-notice__sub {
  margin-top: -4px;
  padding-left: 30px;
}
.sg-smm-lmodal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.sg-smm-lmodal[data-mode="info"] .sg-smm-lmodal__icon { background: rgb(245, 165, 36); }
.sg-smm-lmodal[data-mode="ok"] .sg-smm-lmodal__icon { background: #2e9e48; }
.sg-smm-lmodal .sg-smm-lmodal__spin { display: none; }
.sg-smm-lmodal[data-mode="checking"] .sg-smm-lmodal__spin { display: inline-flex; }
.sg-smm-lmodal[data-mode="checking"] .sg-smm-lmodal__icon { display: none; }
.sg-smm-lmodal .sg-smm-notice__text { line-height: 1.4; }
.sg-smm-lmodal.is-anchored .sg-smm-notice__card {
  position: absolute !important;
  margin: 0;
}
.sg-smm-lmodal.is-anchored .sg-smm-notice__card::before {
  content: "";
  position: absolute;
  top: -7px;
  left: var(--sg-arrow-x, 40px);
  width: 14px;
  height: 14px;
  margin-left: -7px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 2px;
}
.sg-smm-lmodal.is-anchored.is-above .sg-smm-notice__card::before { top: auto; bottom: -7px; }
input.sg-smm-link-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18) !important;
  position: relative;
  z-index: 10097;
}
.sg-smm-lmodal .sg-smm-notice__card { position: relative; padding-right: 44px; }

/* Verified-link account card (same look as story-ig kadence-column22140_1552dc-43) */
.sg-smm-lpreview {
  display: flex;
  align-items: center;
  gap: var(--global-kb-gap-sm, 1rem);
  margin-top: 12px;
  padding: 10px;
  background: var(--global-palette9, #fff);
  border-radius: 8px;
  box-shadow: 0 0 14px 0 rgba(0, 0, 0, 0.1);
}
.sg-smm-lpreview[hidden] { display: none; }
.sg-smm-lpreview:not(.is-side) { position: relative; z-index: 2; margin-top: 16px; }
/* Tail from the card whose tip lies on the link check button */
.sg-smm-lpreview::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: var(--sg-arrow-x, 40px);
  width: 26px;
  height: var(--sg-tail, 20px);
  margin-left: -13px;
  background: var(--global-palette9, #fff);
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.15));
}
.sg-smm-lpreview.is-side::before {
  bottom: auto;
  top: var(--sg-arrow-y, 50%);
  left: auto;
  right: 100%;
  width: var(--sg-tail, 20px);
  height: 26px;
  margin: -13px 0 0 0;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}
.sg-smm-lpreview__pic {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #60f330;
  border-radius: 100px;
  background: #f9c809;
  box-shadow: 0 0 14px 0 rgba(96, 243, 48, 0.28);
  color: #fff;
  font-size: 26px;
  font-weight: 600;
}
.sg-smm-lpreview__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-smm-lpreview__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sg-smm-lpreview__name,
.sg-smm-lpreview__sub {
  margin: 0;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: rgba(0, 0, 0, 0.8);
}
.sg-smm-lpreview__name { font-size: 18px; line-height: 1.2; }
.sg-smm-lpreview__sub { font-size: 14px; line-height: 1.3; }
.sg-smm-lpreview.is-post .sg-smm-lpreview__name { font-size: 15px; }
.sg-smm-lpreview.is-side {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  margin: 0;
  padding: 20px 24px;
}
.sg-smm-lpreview.is-side .sg-smm-lpreview__pic { width: 80px; height: 80px; font-size: 32px; }
.sg-smm-lpreview.is-side .sg-smm-lpreview__body { gap: 10px; }
.sg-smm-lpreview a { color: inherit; text-decoration: none; }
.sg-smm-lpreview a:hover { text-decoration: underline; }
@media (max-width: 767px) {
  .sg-smm-lpreview__pic { width: 52px; height: 52px; font-size: 22px; }
}
.sg-smm-lmodal__x {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #6b6b6b;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sg-smm-lmodal__x:focus { outline: none; }
.sg-smm-lmodal__x:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 1px; }
.sg-smm-lmodal[data-mode="checking"] .sg-smm-lmodal__x { display: none; }
.sg-smm-lmodal[data-mode="checking"] .sg-smm-notice__card { padding-right: 20px; }
@media (min-width: 768px) {
  .sg-smm-lmodal__icon { width: 24px; height: 24px; font-size: 15px; }
  .sg-smm-lmodal .sg-smm-notice__sub { padding-left: 34px; }
}

/* —— Loading overlay (IG-style กำลังโหลด…) —— */
.sg-smm-loading {
  position: fixed;
  inset: 0;
  z-index: 10090;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
}
.sg-smm-loading[hidden] {
  display: none !important;
}
.sg-smm-loading__card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 14px 18px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  color: #1a1a1a;
  font-size: 0.95rem;
  line-height: 1.3;
  font-family: "SIxtygram System", "Topic", sans-serif;
}
.sg-smm-loading__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  animation: sg-smm-spin 0.9s linear infinite;
}
.sg-smm-loading__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}
@keyframes sg-smm-spin {
  to {
    transform: rotate(360deg);
  }
}
body.sg-smm-loading-open {
  overflow: hidden;
}

/* —— Auth modal shell only — column styles come from register-feed (Kadence) —— */
html.sg-smm-auth-open,
body.sg-smm-auth-open {
  overflow: hidden !important;
}
.sg-smm-auth-stash[hidden] {
  display: none !important;
}
.sg-smm-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 10070;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  overflow: auto;
}
.sg-smm-auth-modal[hidden] {
  display: none !important;
}
.sg-smm-auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}
.sg-smm-auth-modal__body {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  /* Desktop card width on /register/; Kadence media queries handle mobile pad */
  width: min(576px, calc(100vw - 32px));
  max-width: 100%;
  margin: auto;
  padding: 40px 0 28px;
  overflow: visible;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  /* Theme vars used by Kadence register page (content.min.css spacing) */
  --global-md-spacing: 2rem;
}
.sg-smm-auth-modal__x {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.sg-smm-auth-modal__x:hover,
.sg-smm-auth-modal__x:focus,
.sg-smm-auth-modal__x:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  color: #fff;
}
.sg-smm-auth-modal__x-icon {
  display: inline-flex;
  line-height: 0;
}
.sg-smm-auth-modal__x-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  color: #fff;
  stroke: #fff;
}
.sg-smm-auth-modal__x-icon svg line,
.sg-smm-auth-modal__x-icon svg path {
  stroke: #fff !important;
}
.sg-smm-auth-modal__err {
  margin: 0 16px 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.4;
}
.sg-smm-auth-modal__err[hidden] {
  display: none !important;
}
/* Only size the root column to the modal shell — do not override Kadence internals */
.sg-smm-auth-modal__body > .kadence-column11330_ce0664-35 {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
/*
 * On sixtygram.com/register/ Kadence theme applies:
 * .single-content .wp-block-kadence-advancedbtn { margin-bottom: var(--global-md-spacing) }
 * Register-feed does not include theme content.min.css — mirror that one rule only.
 */
.sg-smm-auth-modal__body .wp-block-kadence-advancedbtn {
  margin-bottom: var(--global-md-spacing, 2rem);
}
/* Google btn is often <span class="kb-button"> */
.sg-smm-auth-modal__body .kb-button[data-sg-google-login],
.sg-smm-auth-modal__body .kb-btns11330_50252f-5e .kb-button {
  cursor: pointer;
}
@media (max-width: 767px) {
  .sg-smm-auth-modal {
    padding: 12px;
    align-items: center;
  }
  .sg-smm-auth-modal__body {
    width: min(100%, calc(100vw - 24px));
    padding: 36px 0 24px;
  }
}

/* (legacy sg-smm-xendit-tw removed — use Kadence 88284a / ca4400 / 35e022) */
