/**
 * Theme Name:  Stack Overflow (Jan 2020)
 * Theme URI:   https://stackoverflow.com
 * Description: Theme for The Blog
 * Author:      David Longworth <dlongworth@stackoverflow.com>
 * Author URI:  
 * Version:     2.0.0
 * Tags:
 * Text Domain: stack2
 * License:     GPL-4.0+
 * License URI: https://opensource.org/licenses/GPL-4.0
**/

body {
  font-family: "Source Sans Pro", Arial,"Helvetica Neue",Helvetica,sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: url(./img/bg-header.svg);
  background-repeat: no-repeat;
  background-position: 50% 0;
  background-size: 100% 215px;
}
h1,h2,h3,h4,h5,h5 {
  font-family: "Roboto Slab";
  font-weight: bold;
}

.p-wrapper {
  max-width: 1450px;
  padding: 0 64px;
}

@media (max-width: 640px) {
  .p-wrapper {
    padding: 0 5%;
  }
}

/* Post thumbnails */
.imgfill {
  padding-top: 52.3%;
}
.imgfill img {
  object-fit: cover;
}

/* Stacks + */
.ls-sm {
  letter-spacing: 0.08em;
}
.to-ellipsis {
  text-overflow: ellipsis;
}
.bar-xl {
  border-radius: 12px;
}
@media (max-width: 640px) {
  .sm\:bt0 {
    border-top: 0 !important;
  }
}
.lh-excerpt {
  line-height: 1.4em;
}

/* Have to do this manually as Wordpress won't let us edit the markup */
#popular-widget-area ul {
  list-style: none;
  margin: 0; padding: 0;
}
#popular-widget-area li {
  border-top: 1px solid var(--black-075);
  padding: 16px 16px 0 16px;
  counter-increment: stackoverflow_counter;
  position: relative;
}
#popular-widget-area li:before {
  content: counter(stackoverflow_counter);
  position: absolute;
  right: 16px;
  font-family: "Roboto Slab";
  font-size: 17px;
  color: var(--black-050);
}
#popular-widget-area h2 {
  background: url(./img/Icon/Fire.svg) no-repeat 95% 50%;
}

/* Podcast on homepage */
#section-podcast {
  background: url(./img/bg-podcast.svg) no-repeat 90% 50%;
  background-size: auto 95%;
}

/* Featured badge */

.p-featured {
  background: url(./img/bg-featured.svg) no-repeat 0 0;
  width: 86px; height: 86px;
  font-family: "Roboto Slab";
  position: relative;
  color: #fff;
}
.p-featured span {
  transform: rotate(-45deg);
  display: block;
  top: 23px;
  left: 6px;
  position: absolute;
}

/* Article content */

.wp-block-image {
  text-align: center;
}

.p-article {
  line-height: 1.52em;
  font-size: 1.5em;
  margin-left: auto;
  margin-right: auto;
}
.p-article p {
  margin-bottom: 1.3em;
}
.p-article blockquote {
  margin: 1.8em 0;
  font-size: 1.4em;
  line-height: 1.3em;
  border-radius: 7px;
  padding: 50px 30px 20px;
  background: var(--blue-050);
  color: var(--blue-600);
  text-align: center;
}
.p-article h1, .p-article h2, .p-article h3, .p-article h4 {
  margin-top: 1em;
  line-height: 1.3em;
}
.p-article h1:first-child, .p-article h2:first-child, .p-article h3:first-child, .p-article h4:first-child {
  margin-top: 0;
}
.p-article img {
  max-width: 100%;
  box-sizing: border-box;
  height: auto; 
}
.p-article iframe {
  width: 100%;
  border: 0;
  margin: 1.5em 0;
}
.p-article iframe:first-child {
  margin-top: 0;
}
.p-article ul,
.p-article ol {
  margin: 1.5em auto;
}
.p-article ol li, .p-article ul li {
  margin: .2em 1.2em;
}


/* Post images */

.p-article .wp-block-image {
  margin: 2em 0;
}
.p-article figcaption {
  font-size: 0.8em;
  line-height: 1.3em;
  color: var(--black-500);
  margin: 25px auto 0;
  max-width: 620px;
}

/* Code blocks: pre is a block, code is inline */

.p-article .s-code-block,
.p-article p > code {
  font-size: 16px;
  line-height: 22px;
  color: var(--highlight-color);
  background-color: var(--highlight-bg);
  border-radius: 5px;
  margin-bottom: 1.3em;
} 
.p-article p > code {
  padding: 3px 5px;
  margin: 2px;
  border-radius: 2px;
}

/* Tables */

.p-article table {
  word-break: normal;
  word-break: keep-all;
  border-spacing: 0;
  border-collapse: collapse;
  margin: 2em auto;
  overflow: scroll;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.p-article table th {
  font-weight: bold;
}
.p-article table th,
.p-article table td {
  padding: 6px 13px;
  border: 1px solid var(--black-100);
}
.p-article table tr:nth-child(2n) {
  background-color: var(--black-025);
}
.p-article table tr:hover {
  background-color: var(--blue-050);
}
.p-article table ul,
.p-article table ol {
  margin: 0;
  padding: 0;
}

/* Comments */

.comment {
  list-style: none;
}

.comment {
  margin-bottom: 24px;
}
.comment .children {
  margin-bottom: 0;
  margin-right: 24px;
  margin-left: 24px;
  padding: 0;
}
.comment.parent {
  background: rgba(0,0,0,0.02);
  border-radius: 8px;
  padding: 24px;
}
body.theme-dark .comment.parent,
body.theme-dark__forced .comment.parent {
  background: rgba(255,255,255,0.03);
}
.comment.parent {
  padding: 0;
  padding-bottom: 24px;
}

.comment-body {
  background: var(--white);
  padding: 12px;
  margin-bottom: 24px;
  border-radius: 5px;
  font-size: 17px;
  box-shadow: var(--bs-sm);
  position: relative;
  overflow: hidden;
}
.comment-body:last-child,
.comment:last-child {
  margin-bottom: 0;
}

.comment .comment-meta {
  display: flex;
  font-size: 14px;
  align-items: center;
  margin-bottom: 14px;
}
.comment .comment-metadata {
  margin-left: auto;
}
.comment .comment-metadata a {
  color: var(--black-400);
}
.comment .says {
  display: none;
}
.comment .fn {
  font-style: normal;
  font-size: 15px;
}
.comment .avatar {
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
  display: inline-block;
  margin-right: 6px;
  background: #eee;
}
.comment .edit-link {
  padding: 0 5px;
}

/* Reply link */
.comment-reply-link {
  display: block;
  font-size: 14px;
  margin: 0 -12px -12px -12px;
  padding: 12px;
  background: var(--black-025);
  color: var(--black-400);
}
.comment-reply-link:hover {
  background: var(--blue-050);
}

/* Comment box */
.comment-respond {
  padding: 24px;
  margin-bottom: 24px;
  z-index: 2000;
  border-radius: 5px;
  background-color: var(--white);
  box-shadow: var(--bs-md);
  color: var(--fc-dark);
  font-size: 13px;
  min-width: 12rem;
  position: relative;
  border: 1px solid var(--black-100);
}
.comment-respond:before,
.comment-respond:after {
  content: "";
  position: absolute;
  border-width: 8px;
  border-style: solid;
  border-color: transparent;
  border-top: none;
  top: -8px;
  border-bottom-color: var(--black-100);
  left: 12px;
}
.comment-respond:after {
  top: -7px;
  border-bottom-color: var(--white);
}
.comment-respond h3,
.comments-title {
  font-size: 18px;
}
.comment-respond small {
  float: right;
}
.comment-respond .logged-in-as {
  margin: -10px 0 24px;
  font-size: 14px;
}
.comment.parent > .comment-respond {
  margin: 24px;
}

.comment-notes {
  color: var(--black-400);
}

.comment-form label {
  font-size: 14px;
  margin-bottom: 8px;
  display: block;
}
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  -webkit-appearance: none;
  width: 100%;
  margin: 0;
  padding: .6em .7em;
  border: 1px solid var(--black-200);
  border-radius: 3px;
  background-color: var(--white);
  color: var(--fc-dark);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.15;
}
.comment-form textarea:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus {
  border-color: var(--blue-300);
  box-shadow: 0 0 0 4px var(--focus-ring);
  outline: 0;
}


.comment-form-cookies-consent {
  padding-top: 12px;
  cursor: pointer;
}
#wp-comment-cookies-consent {
  float: left;
  margin-top: 3px;
  margin-right: 10px;
}
.form-submit {
  margin-bottom: 0;
  margin-top: 25px;
}
.comment-form #submit {
  position: relative;
  display: inline-block;
  padding: .7em 1.2em;
  border: 1px solid transparent;
  border-radius: 3px;
  background-color: transparent;
  outline: 0;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.15384615;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  color: var(--white);
  background-color: var(--blue-500);
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,.4);
}

/* If a comment is by staff/user */
.comment.byuser > .comment-body {
  border: 1px solid var(--blue-050);
  background: var(--blue-050);
}
.comment.byuser > .comment-body .comment-reply-link {
  background: none;
}