/* =============================================================================
   Saphan Siam Article Widget — article-widget.css  v1.2.0
   Enqueued on the frontend only.

   Color strategy: all text colors use var(--e-global-color-text) so they
   inherit from Elementor's Global Settings automatically. Border and accent
   colors that have no Elementor variable equivalent remain as hex values.
   ============================================================================= */


/* =============================================================================
   1. OUTER WRAPPER
   ============================================================================= */

.ssaw-article-wrapper {
  width: 100%;
}


/* =============================================================================
   2. AUTHOR BOX
   Styles for the [article_author_box] shortcode output.
   ============================================================================= */

/* Hidden Elementor popup trigger anchor — forces modules.popup to load.
   Must be truly zero-size: no width, no height, no margin, no padding,
   not focusable, not visible on any breakpoint. */
.ssaw-popup-trigger {
  display: block !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  visibility: hidden !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

.saphan-article-author-box {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 14px 0 34px;
  width: fit-content;
  cursor: pointer;
}

.saphan-article-author-photo {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border: 0px solid #e6e6e6;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  text-decoration: none;
  line-height: 0;
  box-sizing: border-box;
  cursor: pointer;
}

.saphan-article-author-photo:focus {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 4px;
}

.saphan-article-author-photo img,
.saphan-article-author-image {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.saphan-article-author-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.saphan-article-author-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 17px;
  line-height: 1.25;
  color: var(--e-global-color-text);
}

.saphan-article-author-label {
  font-weight: 700;
  color: var(--e-global-color-text);
}

.saphan-article-author-name {
  font-weight: 600;
  color: var(--e-global-color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.saphan-article-author-name:hover {
  color: var(--e-global-color-text);
}

.saphan-article-author-role {
  font-size: 15px;
  line-height: 1.4;
  color: var(--e-global-color-text);
  font-weight: 400;
}


/* =============================================================================
   3. ORIGINAL ARTICLE PARTNER BOX
   Styles for the [original_article_partner_box] shortcode output.
   ============================================================================= */

.saphan-original-article-box {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 18px 0 30px;
}

.saphan-original-article-link {
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  color: var(--e-global-color-text) !important;
}

.saphan-original-article-link:hover {
  color: var(--e-global-color-text) !important;
  opacity: 0.75;
}

.saphan-original-article-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50%;
  overflow: hidden;
  border: 0px solid #e6e6e6;
  flex-shrink: 0;
}

.saphan-original-article-logo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 50%;
}

.saphan-original-article-text {
  font-size: 17px;
  line-height: 1.25;
  color: var(--e-global-color-text) !important;
  font-weight: 600;
}

.saphan-original-article-link:hover .saphan-original-article-text {
  color: var(--e-global-color-text) !important;
  opacity: 0.75;
}


/* =============================================================================
   4. META ROW — publish date (left) + bookmark heart (right)
   ============================================================================= */

.ssaw-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 18px;
  gap: 12px;
}

.ssaw-meta-date {
  flex: 1;
  font-size: 17px;
  line-height: 1.4;
  color: var(--e-global-color-text);
}

/* Inherit any inline elements the [original_publish_date] shortcode outputs */
.ssaw-meta-date *,
.ssaw-meta-date p {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

.ssaw-meta-bookmark {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ── CBX Bookmark heart ─────────────────────────────────────────────────────── */

.cbxwpbkmarktrig-label {
  display: none !important;
}

.cbxwpbkmarktrig-icon {
  background-image: none !important;
  width: auto !important;
  height: auto !important;
  background-size: unset !important;
  vertical-align: middle !important;
}

/* Empty heart — default */
.cbxwpbkmarktrig-icon::before {
  content: "\2665";
  font-family: serif;
  font-size: 32px;
  color: transparent;
  -webkit-text-stroke: 2px #cc0000;
  display: inline-block;
  line-height: 1;
  transition: color 0.2s ease;
}

/* Solid heart on hover — logged-in users only */
.cbxwpbkmarktrig[data-loggedin="1"]:hover .cbxwpbkmarktrig-icon::before {
  color: #cc0000;
}

/* Solid heart — bookmarked state */
.cbxwpbkmarktrig-marked .cbxwpbkmarktrig-icon::before {
  color: #cc0000;
}

/* Spinner — match heart size so layout doesn't jump */
.cbxwpbkmarktrig .ld-ring {
  width: 32px !important;
  height: 32px !important;
  border-color: #cc0000 transparent transparent transparent !important;
}

/* Allow guest popup to break out of narrow container */
.cbxwpbkmarkwrap {
  position: relative !important;
  overflow: visible !important;
}

.cbxwpbmarkguestwrap {
  position: absolute !important;
  top: 40px !important;
  right: 0 !important;
  left: auto !important;
}

.cbxwpbmarkguestwrap,
.cbxwpbkmarkguest-message,
.cbxwpbkmarkguest-message-head,
.cbxwpbkmarkguest-content {
  width: 300px !important;
  min-width: 300px !important;
  max-width: 300px !important;
  box-sizing: border-box !important;
  background-color: #ffffff !important;
}


/* =============================================================================
   5. READ METER
   Targets the [read_meter] / BSF Reading Time plugin output.
   Class hierarchy: .ssaw-read-meter > .bsf-rt-reading-time >
     .bsf-rt-display-label, .bsf-rt-display-time, .bsf-rt-display-postfix
   Converts the Elementor-scoped `selector` CSS to real class selectors.
   Font size and family pulled from Elementor global typography variables.
   ============================================================================= */

.ssaw-read-meter {
  margin: 0 0 24px;
}

.ssaw-read-meter .bsf-rt-reading-time,
.ssaw-read-meter .bsf-rt-reading-time * {
  font-family: "Kanit", var(--e-global-typography-text-font-family), sans-serif !important;
  color: var(--e-global-color-text) !important;
  font-size: calc(var(--e-global-typography-text-font-size) * 1.1) !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}


/* =============================================================================
   6. ARTICLE BODY — paragraphs and headings
   ============================================================================= */

.thai-wrap-quote p {
  font-family: var(--e-global-typography-text-font-family), sans-serif;
  font-size:   var(--e-global-typography-text-font-size);
  font-weight: var(--e-global-typography-text-font-weight);
  line-height: var(--e-global-typography-text-line-height);
  letter-spacing: var(--e-global-typography-text-letter-spacing);
  color: var(--e-global-color-text);
  margin: 0 0 1.25em 0;
}

.thai-wrap-quote h2,
.thai-wrap-quote h3 {
  font-family: var(--e-global-typography-primary-font-family), sans-serif;
  font-size:   var(--e-global-typography-primary-font-size);
  font-weight: var(--e-global-typography-primary-font-weight);
  line-height: var(--e-global-typography-primary-line-height);
  color: var(--e-global-color-text);
  margin: 1.5em 0 0.5em 0;
}


/* =============================================================================
   7. PULL QUOTES — desktop float layout
   ============================================================================= */

.thai-wrap-quote .pull-quote-right {
  float: right;
  width: 38%;
  margin: 0rem -120px 1.2em 2.2rem;
  padding: 1.25rem 0;
  border-top:    2px solid #d8d8d8;
  border-bottom: 2px solid #d8d8d8;
  font-family: "Kanit", sans-serif;
  font-size:   3.0rem;
  font-weight: 300;
  line-height: 1.5;
  text-align: center;
  color: var(--e-global-color-text);
}

/* Clearfix */
.thai-wrap-quote::after {
  content: "";
  display: block;
  clear: both;
}

/* Show/hide defaults */
.pull-quote-right.mobile-quote  { display: none;  }
.pull-quote-right.desktop-quote { display: block; }


/* =============================================================================
   8. RESPONSIVE
   ============================================================================= */

/* Large desktop float adjustments */
@media (max-width: 1200px) {
  .thai-wrap-quote .pull-quote-right {
    width: 42%;
    margin-right: -80px;
  }
}

/* Tablet — full-width block, swap desktop/mobile quotes */
@media (max-width: 1024px) {
  .pull-quote-right.desktop-quote {
    display: none;
  }

  .pull-quote-right.mobile-quote {
    display: block;
    float: none;
    width: 100%;
    margin: 2.5rem 0;
    padding: 1.75rem 0;
    border-top:    3px solid #c8c8c8;
    border-bottom: 3px solid #c8c8c8;
    font-family: "Kanit", sans-serif;
    font-size: calc(var(--e-global-typography-text-font-size) * 1.75);
    font-weight: 300;
    line-height: 1.4;
    text-align: center;
    color: var(--e-global-color-text);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .pull-quote-right.mobile-quote {
    font-size: calc(var(--e-global-typography-text-font-size) * 1.45);
    padding: 1.25rem 0;
    margin: 2rem 0;
  }
}
