/* Record Turnover: "Ask the archive" on /ask-me/.
   Fonts and colours come from the theme (GT America for headings and UI, Items for
   answer text via the theme's own <p> style). The theme sets 1rem = 10px. */

#rt-ask { margin: 2rem 0 6rem; font-family: inherit; color: inherit; }
#rt-ask [hidden] { display: none !important; }

/* Question field: just a line under the text */
#rt-ask .rt-field { position: relative; }
#rt-ask #rt-q {
  width: 100%; box-sizing: border-box; margin: 0;
  font-family: inherit; font-weight: 600; font-size: 4.8rem; line-height: 1.15; letter-spacing: -.02em;
  color: inherit; background: transparent;
  border: 0; border-bottom: .4rem solid currentColor; border-radius: 0; box-shadow: none; outline: none;
  padding: 0 4.8rem .4rem 0; -webkit-appearance: none; appearance: none;
}
#rt-ask #rt-q::placeholder { color: currentColor; opacity: .4; }
#rt-ask #rt-q::-webkit-search-cancel-button, #rt-ask #rt-q::-webkit-search-decoration { -webkit-appearance: none; display: none; }

/* One button at the end of the field: a search icon until the question is asked, then the X.
   The X is the same as the theme's mobile menu "Close" (two 19×3 px bars) */
#rt-ask #rt-go, #rt-ask #rt-clear {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 36px; height: 36px;
  padding: 0; margin: 0; border: 0; background: none; cursor: pointer; display: none;
  color: inherit;                 /* the theme makes button text white; the X should follow the text colour */
}
#rt-ask #rt-go:hover, #rt-ask #rt-go:focus, #rt-ask #rt-clear:hover, #rt-ask #rt-clear:focus { background: none; color: inherit; opacity: .6; }
#rt-ask #rt-go.show, #rt-ask #rt-clear.show { display: block; }
#rt-ask #rt-go svg { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; fill: none; stroke: currentColor; }
#rt-ask #rt-clear .bar { position: absolute; left: 50%; top: 50%; width: 19px; height: 3px; margin: -1.5px 0 0 -9.5px; background: currentColor; }
#rt-ask #rt-clear .bar:first-child { transform: rotate(45deg); }
#rt-ask #rt-clear .bar:last-child { transform: rotate(-45deg); }

#rt-ask .rt-note { font-family: inherit; font-size: 1.4rem; line-height: 1.4; margin: 1.2rem 0 0; opacity: .7; }

/* Suggestions: the theme's black buttons, smaller, white on hover */
#rt-ask .rt-examples { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2.4rem 0 0; }
#rt-ask .rt-examples button {
  font-family: inherit; font-size: 1.8rem; font-weight: 600; line-height: 1.2;
  background: #000; color: #fff; border: 0; border-radius: 0; margin: 0; padding: 1rem 1.8rem .9rem;
  cursor: pointer; transition: background-color .15s linear, color .15s linear;
}
#rt-ask .rt-examples button:hover, #rt-ask .rt-examples button:focus { background: #fff; color: #000; outline: none; }

/* "You now have 10 queries left today" */
#rt-ask .rt-left { font-family: inherit; font-size: 1.4rem; font-weight: 600; line-height: 1.4; margin: .6rem 0 0; }

#rt-ask #rt-status { min-height: 1.4em; margin: 1.2rem 0 0; font-size: 1.4rem; font-weight: 600; opacity: .6; }

/* Each question and answer */
#rt-ask .rt-turn { margin-top: 3.2rem; }
/* Earlier answers stay below the newest one, each under its own question and a dividing line */
#rt-ask .rt-turn + .rt-turn { margin-top: 4.8rem; padding-top: 3.2rem; border-top: .4rem solid currentColor; }
#rt-ask .rt-asked { display: none; font-family: inherit; font-size: 2.4rem; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 2rem; }
#rt-ask .rt-turn + .rt-turn .rt-asked { display: block; }
#rt-ask .rt-a p { margin: 0 0 2rem; }                       /* typeface and size come from the theme's <p> */
#rt-ask .rt-a ul { margin: 0 0 2rem; padding-left: 1.2em; }
#rt-ask .rt-a li { margin: 0 0 .6rem; }
#rt-ask .rt-a a { color: inherit; text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: .1em; }
#rt-ask .rt-a strong { font-family: inherit; }
#rt-ask .rt-a.thinking p { opacity: .55; font-style: italic; }
#rt-ask .rt-a.error p { font-weight: 600; }

/* Featured images of the linked posts: a row of 150px thumbnails above the answer */
#rt-ask .rt-gallery { position: relative; margin: 0 0 2.4rem; }
#rt-ask .rt-gal-strip { display: flex; gap: .8rem; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
#rt-ask .rt-gal-strip::-webkit-scrollbar { display: none; }
#rt-ask .rt-thumb { flex: 0 0 150px; width: 150px; height: 150px; padding: 0; margin: 0; border: 0; border-radius: 0; background: rgba(0,0,0,.08); cursor: zoom-in; scroll-snap-align: start; overflow: hidden; }
#rt-ask .rt-thumb:hover, #rt-ask .rt-thumb:focus { background: rgba(0,0,0,.08); opacity: .8; }
#rt-ask .rt-thumb img { display: block; width: 150px; height: 150px; max-width: none; object-fit: cover; margin: 0; border-radius: 0; }
#rt-ask .rt-gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; width: 36px; height: 36px; padding: 0 0 4px; margin: 0;
  border: 0; border-radius: 0; background: #000; color: #fff; font-family: inherit; font-size: 28px; font-weight: 600; line-height: 1; cursor: pointer;
}
#rt-ask .rt-gal-nav:hover, #rt-ask .rt-gal-nav:focus { background: #fff; color: #000; outline: none; }
#rt-ask .rt-gal-prev { left: 0; }
#rt-ask .rt-gal-next { right: 0; }

/* Lightbox: the image larger, on a dark layer over the page (it sits outside #rt-ask, at the end of the page) */
html.rt-lb-open { overflow: hidden; }
#rt-lightbox { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.92); padding: 56px 16px 16px; box-sizing: border-box; }
#rt-lightbox[hidden] { display: none; }
#rt-lightbox figure { margin: 0; padding: 0; width: 100%; height: 100%; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#rt-lightbox figure img { display: block; flex: 0 1 auto; min-width: 0; min-height: 0; max-width: min(100%, 1200px); max-height: 100%; width: auto; height: auto; object-fit: contain; margin: 0; border-radius: 0; }
#rt-lightbox figcaption { flex: 0 0 auto; }
#rt-lightbox figcaption { margin: 1.2rem 0 0; padding: 0; text-align: center; font-size: 1.6rem; font-weight: 600; line-height: 1.3; color: #fff; }
#rt-lightbox figcaption a { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
#rt-lightbox button { position: absolute; width: 44px; height: 44px; padding: 0; margin: 0; border: 0; border-radius: 0; background: none; color: #fff; cursor: pointer; font-family: inherit; }
#rt-lightbox button:hover, #rt-lightbox button:focus { background: none; color: #fff; opacity: .6; }
#rt-lightbox button[hidden] { display: none; }
#rt-lightbox .rt-lb-close { top: 8px; right: 8px; }
#rt-lightbox .rt-lb-close .bar { position: absolute; left: 50%; top: 50%; width: 19px; height: 3px; margin: -1.5px 0 0 -9.5px; background: currentColor; }
#rt-lightbox .rt-lb-close .bar:first-child { transform: rotate(45deg); }
#rt-lightbox .rt-lb-close .bar:last-child { transform: rotate(-45deg); }
#rt-lightbox .rt-lb-nav { top: 50%; transform: translateY(-50%); font-size: 44px; font-weight: 600; line-height: 1; padding-bottom: 6px; }
#rt-lightbox .rt-lb-prev { left: 4px; }
#rt-lightbox .rt-lb-next { right: 4px; }

/* "Based on" */
#rt-ask .rt-based { margin-top: 3.2rem; }
#rt-ask .rt-based h3 { font-family: inherit; font-size: 1.4rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 1rem; opacity: .6; }
#rt-ask .rt-based a { display: block; font-size: 1.6rem; font-weight: 600; color: inherit; text-decoration: none; padding: .6rem 0; border-bottom: .1rem solid rgba(0,0,0,.25); }
#rt-ask .rt-based a:hover { text-decoration: underline; }
#rt-ask .rt-based a i { font-style: normal; font-weight: 400; opacity: .6; margin-left: .8rem; }

/* Text-style buttons: reset the theme's black button look */
/* "Show all articles about this": looks exactly like the theme's H5 (the button inherits everything) */
#rt-ask .rt-all-h { margin-top: 3.2rem; }
#rt-ask .rt-all {
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; text-align: left;
  background: none; border: 0; border-radius: 0; padding: 0; margin: 0; cursor: pointer;
}
#rt-ask .rt-all:hover { background: none; color: inherit; text-decoration: underline; }
#rt-ask .rt-all:disabled { opacity: .5; text-decoration: none; cursor: default; }

/* Full list of articles (from "Show all articles about this") */
#rt-ask .rt-results { list-style: none; padding: 0; margin: 2.4rem 0 0; }
#rt-ask .rt-results li { margin: 0; padding-left: 0; }
#rt-ask .rt-results li::before, #rt-ask .rt-results li::marker { content: none; }
#rt-ask .rt-hit { padding: 1.6rem 0; border-bottom: .1rem solid rgba(0,0,0,.25); display: flex; flex-direction: column; gap: .4rem; }
#rt-ask .rt-hit a { color: inherit; text-decoration: none; }
#rt-ask .rt-hit a:hover .rt-title { text-decoration: underline; }
#rt-ask .rt-title { font-size: 2.4rem; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
#rt-ask .rt-meta { font-size: 1.3rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; opacity: .6; }
#rt-ask .rt-summary { font-size: 1.6rem; line-height: 1.45; }
#rt-ask .rt-intro { font-size: 1.6rem; padding: 0 0 1rem; }
#rt-ask .rt-related { margin-top: 2.4rem; font-size: 1.3rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .6; }
#rt-ask .rt-empty { font-size: 1.6rem; padding: 1rem 0; }

@media (max-width: 600px) {
  #rt-ask #rt-q { font-size: 2.6rem; padding-right: 4rem; }
  #rt-ask .rt-examples button { font-size: 1.5rem; padding: .8rem 1.3rem .7rem; }
  #rt-ask .rt-turn { margin-top: 2.4rem; }
  #rt-ask .rt-title { font-size: 2rem; }
}

/* Bullets in answers: text is wrapped in <p> so it gets the theme's text style */
#rt-ask .rt-a li p { margin: 0; }
