/* Blog supplement — OUR rules, loaded last (port-blog.md §7).
 *
 * Everything else under /CSS/Pages/Blog/ is captured from blog.roblox.com and should not be
 * edited. This file is where the port adds what the capture could not supply: the
 * logged-in comment form (every archived post has comments closed, so there was no form to
 * capture), the states the original had no equivalent for, and a small number of fixes for
 * places where the captured markup was invalid.
 */

/* --- Fixes for the captured markup --------------------------------------------------
 *
 * The capture emits id="post-media-container" on EVERY index card, so a listing page
 * carries seven elements sharing one id — invalid, and working only because browsers apply
 * an id selector to every match. _card.ejs emits it as a class instead.
 *
 * NOTHING is needed here to compensate. Every #post-media-container rule in voolium is
 * scoped to `.is-blog.blog-masonry` or `.single-work` — a masonry blog layout and the
 * portfolio post type, neither of which these pages use — so on the standard layout the
 * element is unstyled and the rename changes nothing. Checked rather than assumed, because
 * "rename an id to a class" is exactly the edit that quietly drops a rule.
 */

/* --- The comment form ---------------------------------------------------------------- */

/* bagpakk-wordpress.min.css styles #respond, .comment-reply-title and
 * #cancel-comment-reply-link, and the child theme hides .comment-form-email /
 * .comment-form-url. What neither covers is the textarea and the submit row, because the
 * blog never shipped an open form for anyone to style. */

.comment-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.8em;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-family: "Source Sans Pro", Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  line-height: 1.6;
  resize: vertical;
}

.comment-form textarea:focus {
  border-color: #2885eb;
  outline: none;
}

/* .logged-in-as and .comment-notes are WordPress's own class names, so anything that later
 * restyles a stock WP form finds what it expects. */
.comment-form .logged-in-as,
.comment-form .comment-notes {
  font-size: 1.4rem;
  color: #888;
  margin-bottom: 0.8em;
}

.comment-form .form-submit {
  margin-top: 1em;
}

/* The theme paints input[type='submit'] with the accent colour and a hard shadow (see
 * theme-options.css), so the button only needs its box here. */
.comment-form input[type="submit"] {
  padding: 0.7em 1.6em;
  border: none;
  border-radius: 3px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* A label that exists for screen readers and nothing else. The textarea is unmistakable to
 * a sighted reader and the capture had no visible label, so this keeps both audiences. */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- States the capture had no equivalent for ---------------------------------------- */

/* Refusals from blogCommentService (too fast, too long, nested too deep) and the
 * confirmation after a comment goes into the moderation queue. */
.comment-form-error,
.comment-form-notice {
  padding: 0.8em 1em;
  margin-bottom: 1em;
  border-radius: 3px;
  font-size: 1.5rem;
}

.comment-form-error {
  background: #fdecea;
  border: 1px solid #f5c6c2;
  color: #a3211a;
}

.comment-form-notice {
  background: #eaf4fd;
  border: 1px solid #bcdcf7;
  color: #1a5c9e;
}

/* Shown only to the author of a held comment — nobody else's query returns it. */
.comment-awaiting-moderation {
  color: #a06800;
  font-size: 1.4rem;
}

/* "You must be logged in to post a comment." — WordPress's own class for this line. */
.comment-respond .must-log-in {
  font-size: 1.5rem;
  color: #666;
}

/* The staff-only banner on a draft or scheduled post. Deliberately loud: this page looks
 * exactly like a live post, and the whole job of this strip is to say that it is not one. */
.blog-preview-notice {
  background: #fff5d6;
  border: 1px solid #e8cf7a;
  color: #6b5200;
  padding: 0.9em 1.2em;
  margin-bottom: 1.5em;
  border-radius: 3px;
  font-size: 1.5rem;
}

/* An index with no posts — a fresh install, or a search that matched nothing. The capture
 * has no such state because blog.roblox.com was never empty. */
.post.no-results .entry-inner {
  padding: 3em 2em;
  text-align: center;
  color: #777;
}

.post.no-results .entry-title {
  color: #555;
}

/* --- Logo fallback -------------------------------------------------------------------- */

/* The captured logo is ROBLOX's own wordmark and is not shipped, so until a deployment
 * uploads one, #logo holds the blog's NAME as text. voolium only ever styled an <img> in
 * there. Inherits the masthead's white text and shadow from theme-options.css. */
#logo .site-title {
  margin: 0;
  font-size: 3.2rem;
  font-weight: 300;
  line-height: 1.2;
  white-space: nowrap;
}
