/* Widdershins public theme — loads after style.css and overrides its chrome.
   Ported from the ComicControl site (widdbackup/widdershins.css). */

/* Content boxes are always white on the dark page background, so pin the
   shared component palette to light values even in dark mode. */
:root {
  --bg: #ffffff;
  --text: #58585a;
  --muted: #8a8a8e;
  --accent: #9c5a1d;
  --border: #e0dcd4;
  --surface: #f6f2ea;
}

/* page styles */
body, html {
  margin: 0;
  padding: 0;
}
body {
  background: url('images/bg.png') #2b2b2b;
  color: #58585a;
  font-family: 'Neuton', serif;
}
img {
  max-width: 100%;
}
a {
  color: var(--accent);
}
#wrapper {
  width: 1100px;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 20px 10px;
}
@media screen and (max-width: 900px) {
  #wrapper {
    padding: 20px 0;
  }
}

/* header */
#header {
  display: flex;
  justify-content: center;
  align-items: center;
}
#logo {
  max-width: 300px;
}
@media screen and (max-width: 950px) {
  #header {
    display: block;
  }
  #logo {
    margin: 0 auto;
    display: block;
    text-align: center;
  }
}

/* menu */
#menu {
  display: flex;
  justify-content: space-around;
  max-width: 900px;
  margin: 10px auto 10px auto;
  font-size: 1.3em;
}
#menu a {
  color: #fff;
  text-decoration: none;
  box-sizing: border-box;
  padding: 2px;
  border-bottom: 2px solid transparent;
}
#menu a:hover {
  border-bottom: 2px solid #faaf38;
}
.deco {
  max-width: 60px;
}
.deco img {
  vertical-align: bottom;
}
#menuclick {
  display: none;
}
@media screen and (max-width: 770px) {
  #menu {
    display: none;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    background: #171717;
  }
  #menu a {
    display: block;
    width: 100%;
    text-align: center;
    border: none;
    padding: 10px;
  }
  #menuclick {
    display: flex;
    justify-content: center;
    font-weight: bold;
    font-size: 1.3em;
    padding: 15px 0;
  }
  #menuclick .deco {
    padding: 0 15px;
  }
  #menuclick .deco img {
    vertical-align: baseline;
  }
  #menuclick a {
    color: #fff;
    vertical-align: bottom;
  }
  #menu .deco {
    display: none;
  }
  #menu a:hover {
    border: none;
  }
}

/* containers */
#content {
  display: flex;
  justify-content: space-between;
}
#leftside {
  max-width: 900px;
  width: 100%;
}
#rightside {
  width: 160px;
  flex-shrink: 0;
  flex-grow: 0;
  margin-left: 20px;
}
@media screen and (max-width: 900px) {
  #content {
    flex-wrap: wrap;
  }
  #rightside {
    width: 100%;
    margin: 0;
    padding: 10px 20px;
    box-sizing: border-box;
  }
}

/* comic nav */
.cc-nav {
  display: flex;
  justify-content: space-around;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 0;
}
.cc-nav a {
  font-weight: bold;
  color: #fff;
  font-size: 1.1em;
  text-decoration: none;
}
.cc-nav span {
  color: #777;
  font-size: 1.1em;
}
#nav-divider {
  max-width: 250px;
  margin: 0 auto;
  padding: 10px;
  text-align: center;
}
@media screen and (max-width: 500px) {
  .cc-navaux {
    display: none;
  }
}
.hd-link {
  text-align: center;
}
.hd-link a {
  color: #ccc;
}

/* comic text */
#comic-text {
  background: #fff;
  padding: 20px;
  margin-top: 20px;
  display: flex;
  font-size: 1.1em;
  flex-wrap: wrap;
}
#comic-text-left {
  width: calc(100% - 320px);
}
@media screen and (max-width: 500px) {
  #comic-text-left {
    width: 100%;
    order: 2;
  }
}
#comic-text-right {
  width: 300px;
  flex-shrink: 0;
  flex-grow: 0;
  margin-left: 20px;
}
.cc-newsheader {
  font-size: 1.5em;
  font-weight: bold;
  text-align: center;
}
.cc-publishtime {
  text-align: center;
  background: url('images/publishtime-divider.png') bottom center/250px no-repeat;
  padding-bottom: 20px;
  color: var(--muted);
}
.cc-newsbody {
  padding-bottom: 40px;
  background: url('images/news-petals.png') bottom center/50px no-repeat;
  margin-bottom: 20px;
}
#promo-box {
  text-align: center;
}
#promo-box img,
#promo-box iframe {
  max-width: 100%;
}
#events-header {
  font-size: 1.5em;
  font-weight: bold;
  text-align: center;
  padding: 10px 0 5px 0;
}
#events-divider {
  max-width: 150px;
  margin: 0 auto;
}
#events-text {
  text-align: center;
  padding: 5px 0;
}
.comments {
  width: 100%;
}
@media screen and (max-width: 650px) {
  #comic-text {
    flex-wrap: wrap;
  }
  #comic-text-right {
    width: 100%;
    margin: 0;
    padding-top: 20px;
  }
  .comments {
    order: 3;
  }
}

/* right side */
#right-buttons {
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
}
#patreon, #shop, #tips, #social-box, #hiveworks {
  width: 100%;
  padding: 10px 0;
}
#social-icons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px;
}
#social-icons a {
  color: #fff;
  text-decoration: none;
}
#social-icons img {
  width: 28px;
  vertical-align: middle;
}
#right-buttons a:hover {
  opacity: .7;
}
@media screen and (max-width: 900px) {
  #right-buttons {
    justify-content: space-around;
    align-items: center;
  }
  #patreon, #hiveworks, #shop, #tips, #social-box {
    width: 25%;
    padding: 10px;
    box-sizing: border-box;
  }
}
@media screen and (max-width: 650px) {
  #patreon, #hiveworks, #shop, #tips, #social-box {
    width: 50%;
    max-width: 200px;
  }
}
@media screen and (max-width: 400px) {
  #patreon, #hiveworks, #shop, #tips, #social-box {
    width: 100%;
    max-width: 250px;
  }
}

/* footer */
#footer-image {
  max-width: 400px;
  margin: 0 auto;
  padding: 15px 0;
}

/* text pages (everything that isn't the comic page) */
#textwrap {
  background: #fff;
  padding: 20px;
  font-size: 1.1em;
}
.cc-storyline-thumb {
  width: 200px;
}

/* app components on the dark background / in white boxes */
.comic-image img {
  display: block;
  margin: 0 auto;
}
.content-warning {
  background: #fff;
}
.page-meta {
  color: var(--muted);
}
