/*
 * VT Site Experience 1.0.2
 * Deliberately scoped overrides for the Newspaper theme and Asistent VT.
 */

/* Only live article-body paragraphs; lists, quotes and the TOC stay untouched. */
.single-post .td-post-content .tdb-block-inner > p,
.single-post .td-post-content .wp-block-column > p {
  line-height: 1.55 !important;
}

/* Keyboard shortcut: hidden until it receives focus. */
.vtse-skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000001;
  display: inline-block;
  padding: 12px 16px;
  border: 3px solid #ffffff;
  border-radius: 4px;
  color: #ffffff !important;
  background: #111111;
  box-shadow: 0 0 0 3px #d71920;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  transform: translateY(calc(-100% - 16px));
  transition: transform 140ms ease;
}

.vtse-skip-link[hidden] {
  display: none !important;
}

.vtse-skip-link:focus,
.vtse-skip-link:focus-visible {
  color: #ffffff !important;
  outline: 3px solid #111111;
  outline-offset: 3px;
  transform: translateY(0);
}

.vtse-main-target:focus {
  outline: 3px solid #d71920;
  outline-offset: 4px;
}

/* Keep the desktop navigation on one line in the narrow desktop interval. */
@media (min-width: 1141px) and (max-width: 1365px) {
  .td-header-desktop-wrap .tdb_header_menu.tdb-head-menu-inline .tdb-menu > li {
    margin-left: 4px !important;
    margin-right: 4px !important;
  }

  .td-header-desktop-wrap .tdb_header_menu.tdb-head-menu-inline .tdb-menu > li > a {
    padding-left: 5px !important;
    padding-right: 5px !important;
    font-size: 16px !important;
  }
}

/* Newspaper share buttons are 40px by default; keep their style at 44px. */
.single-post .td-post-sharing .td-social-network,
.single-post .td-post-sharing .td-social-handler {
  display: inline-block !important;
  min-width: 44px !important;
  min-height: 44px !important;
  height: 44px !important;
  vertical-align: middle;
}

.single-post .td-post-sharing .td-social-but-icon,
.single-post .td-post-sharing .td-social-but-text {
  min-height: 44px !important;
  line-height: 44px !important;
}

/*
 * The visible box stays familiar, while its associated label supplies a
 * minimum 44px clickable area for consent controls.
 */
.single-post .comment-form-cookies-consent,
.single-post .comment-form-mailpoet {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.single-post .comment-form-cookies-consent > label,
.single-post .comment-form-mailpoet > label,
#vtm-ai-chat .vtm-chat__terms label {
  min-height: 44px;
  align-items: center;
}

.single-post .comment-form-cookies-consent > label,
.single-post .comment-form-mailpoet > label {
  display: inline-flex;
}

.single-post .comment-form-cookies-consent > input[type="checkbox"],
.single-post .comment-form-mailpoet input[type="checkbox"],
#vtm-ai-chat .vtm-chat__terms input[type="checkbox"] {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 12px;
}

#vtm-ai-chat .vtm-chat__terms label {
  padding-top: 4px;
  padding-bottom: 4px;
}

#vtm-ai-chat .vtm-chat__terms input[type="checkbox"] {
  margin-top: 0;
}

.single-post .comment-form-mailpoet input[type="checkbox"] {
  margin-top: 0;
}

/* Keep the closed launcher compact at every viewport width. */
#vtm-ai-chat .vtm-chat__launcher {
  width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0;
  justify-content: center;
}

#vtm-ai-chat .vtm-chat__launcher span {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* Hide only the closed mobile launcher while the reader is actively moving. */
@media (max-width: 600px) {
  #vtm-ai-chat.vtse-chat--scrolling:not(.vtm-chat--open) .vtm-chat__launcher {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateX(calc(-100% - 24px)) !important;
  }
}

@media (max-width: 767px) {
  .single-post .td-post-content .tdb-block-inner > p,
  .single-post .td-post-content .wp-block-column > p {
    line-height: 1.5 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vtse-skip-link,
  #vtm-ai-chat .vtm-chat__launcher {
    transition: none !important;
  }
}
