/* common.css — shared across all themes */

:root {
  --menu-drawer-width: min(66vw, 320px);
  --menu-shell-inline: max(16px, calc((100vw - var(--container-max, 1200px)) / 2));
}

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#bodyWrapper {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: min(100%, var(--container-max, 750px));
  max-width: var(--container-max, 750px);
  margin-left: auto;
  margin-right: auto;
}

.theme-render-page {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.theme-render-page>.module.module-footer,
body>.module.module-footer {
  margin-top: auto !important;
}

.module.module-menu--standard,
.module.module-menu--compact,
.module.module-menu--minimal-underline {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: var(--menu-shell-inline);
  padding-right: var(--menu-shell-inline);
  padding-top: 10px;
  padding-bottom: 10px;
  box-sizing: border-box;
}

.module.module-menu--brand-name-menu,
.module.module-menu--banner-menu {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-bottom: 10px;
  box-sizing: border-box;
}

.recommended-wrapper {
  /* độ cao ban đầu */
  position: relative;
}

/* gradient phủ lên text phía trên, z-index 1 để nằm dưới button */

.recommended-wrapper::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgb(255, 255, 255));
  pointer-events: none;
  z-index: 1;
}

.recommended-wrapper.expanded::after {
  display: none;
}

/* Reset wrapper to normal flow when action block is hidden after click. */
.recommended-wrapper:has(.continue-reading-actions[style*="display: none"]) {
  position: static !important;
}


.continue-reading-actions {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 18px;
}

.see-more-btn {
  max-width: 300px;
  width: 100%;
  text-transform: uppercase;
  display: block;
  padding: 15px 20px;
  border-radius: 16px;
  background-color: #007bff;
  border: none;
  color: white;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
  letter-spacing: 0.2px;
  box-shadow: 0px 14px 14px 0px rgba(10, 10, 10, 0.2509803922);
}


@media (max-width: 768px) {
  .see-more-btn {
    max-width: 300px;
    width: 100%;
    text-transform: uppercase;
    display: block;
    padding: 15px 20px;
    border-radius: 16px;
    background-color: #007bff;
    border: none;
    color: white;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
    letter-spacing: 0.2px;
    box-shadow: 0px 14px 14px 0px rgba(10, 10, 10, 0.2509803922);
  }
}



.module-menu__brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.module-menu__brand-name {
  display: inline-block;
  color: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.module-menu--compact .module-menu__brand-name {
  display: none !important;
}

/* AdsConex sticky video compatibility:
 * Keep ad controls clickable and above in-article "continue reading" overlays.
 */
.article-below-title .adsconex-video-wrapper,
.article-below-title #adsconex-video-container,
.article-below-title .adsconex-video-container__sticky {
  pointer-events: auto !important;
}

.article-below-title .adsconex-video-container__sticky {
  z-index: 2147483000 !important;
}

.article-below-title .adsconex-video-container__btn-close {
  z-index: 2147483001 !important;
  pointer-events: auto !important;
  touch-action: manipulation;
}

/* CLS guard: keep image placeholder height stable before image decode. */
.module-card__image--skeleton {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: #e5e7eb;
}

/* CLS guard: reserve menu brand logo box before remote logo is fetched. */
.module-menu__brand-logo {
  width: 36%;
  height: 44px;
  max-width: min(200px, 48vw);
  object-fit: contain;
}

.module-article-content__body {
  padding-top: 10px;
}

.module-taxonomy__featured-grid .module-taxonomy__post--featured-sub.module-card .module-card__body {
  padding-left: 8px;
}

.module-list-new__items .module-list-new__item .module-card__summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}


/* Search module: keep fixed layout before/after typing/searching */
.module.module-search.module-search--standard {
  width: 100% !important;
  max-width: var(--container-max, 1200px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

.module.module-search .module-search__input {
  appearance: none;
  -webkit-appearance: none;
}

.module.module-search .module-search__input[type="search"]::-webkit-search-decoration,
.module.module-search .module-search__input[type="search"]::-webkit-search-cancel-button,
.module.module-search .module-search__input[type="search"]::-webkit-search-results-button,
.module.module-search .module-search__input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

@media (max-width: 768px) {
  .module.module-search.module-search--standard {
    max-width: 100% !important;
  }
}

/* .module-article-content__body {
  padding-left: 10px !important;
  padding-right: 10px !important;
} */

.bio-container {
  margin-left: auto;
  margin-right: auto;
  max-width: var(--container-max, 750px);
  overflow: visible;
}

.in-article-ad {
  text-align: center !important;
}

.module-card__title {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 24px !important;
}

.module-card__summary {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 21px !important;
}