/*
* Hacker News Enhancement Suite (HNES)
* Chris James / etcet.net / chris@etcet.net
*
* Initially based on:
* HN+ for Chrome v1.5
* by @jarques
*
*/

body {
  /* hide content flash */
  visibility: hidden;
  margin: 0;
}
/*ignore <center> elements*/
/*body center {
  text-align: left;
}*/
form center {
  text-align: left;
}
body > center > table {
  width: 100%;
  margin: 0 auto;
  padding-bottom: 20px;
}
body center table table {
  box-shadow: none;
  padding: 0;
  background: none
}

.hnes-comment .score {
  display: none;
}

.hnes-comment .score.visible {
  display: inline-block;
}

/*header color*/
#header,
.nav-drop-down {
  background-color: #f60;
}
/*content color*/
#content {
  background-color: #f6f6ef !important;
}

/*header padding*/
#header table td {
  padding: 5px;
}
/*icon width*/
#header table td:first-child {
  width: 18px;
}
/*user nav align*/
#header table td:nth-child(3) {
  text-align: right;
}
/*content padding*/
#content > td {
  padding: 21px 8px 21px 8px;
}
body#threads-body #content > td {
  padding: 21px 8px 0px 8px;
}
body#index-body #content > td {
  padding: 21px 0px;
}

table, td {
 background: none !important;
}
table tr {
  position: relative;
}
table tr td {
  position: relative;
  padding: 4px 0px 4px 0px;
}

#index-body table table {
  margin: 0 auto;
}

/*highlight every other story line except 'More' link*/
#index-body #content tr:nth-child(2n),
#jobs-body #content tr:nth-child(2n) {
  background-color: #e6e6df !important;
}
#index-body #content tr,
#index-body #content tr:nth-child(32) {
  background-color: #f6f6ef !important;
}
#index-body #content tr.on_story {
  border: 1px solid black;
  background-color: #c6c6bf !important;
}

.blurb {
  margin: 0 1em;
  text-align: center;
}

/*position comment and score tally at the top even if story line is multi-line*/
#index-body .score, #index-body .comments {
  position: absolute;
  height: 100%;
  top: 0px;
  padding-top: 7px;
  padding-right: 3px;
  right: 0px;
}
.comments {
  left: 0;
}
.comments:hover {
  color: #f60;
}
/* show a fallback if parsing comment number fails */
.comments:empty::before {
  content: '💬';
}

/*spacing for comment and score tally*/
#index-body #content table { /* Firefox */
  width: 100%;
  max-width: 1170px;
}
#index-body #content table td:first-child {
  width: 80px;
  max-width: 80px; /* Firefox */
  text-align: right;
}
#index-body #content table td:nth-child(2) {
  width: 64px;
  max-width: 64px; /* Firefox */
  text-align: right;
}

#index-body #content table td.title { /* Firefox */
  width: auto;
}

/*spacing between story lines*/
#index-body #content tr td {
  padding-top: 5px;
  padding-bottom: 5px;
}
#index-body .title {
  padding-left: 8px;
  padding-right: 18px;
}
/*comments tally hover*/
.hover-comments-score {
  cursor: pointer;
  text-decoration: underline;
}
/*new comments in black*/
.newcomments {
  color: #000;
}
a.comments:hover {
  text-decoration: underline;
}

/*karma score in the user nav*/
#my-karma {
  padding-left: 8px;
  color: #f6f6ef;
}
/*navigation links*/
.nav-links a {
  color: #222;
  padding-left: 8px;
  padding-right: 8px;
}
/*text shadow on hover*/
.nav-links a:hover,
.more-arrow:hover,
.more-arrow:hover a,
.more-arrow a.active,
.nav-active-link {
  color: #fff !important;
}
/*allow an active link after 'more' dropdown to wrap down*/
.new-active-link {
  display: inline-block;
}
/*center alert on jobs page*/
#content > td > center > table {
  text-align: center;
  margin: 0 auto;
}
/*hide text-select cursor on | seperators*/
.nav-links span {
  cursor: default;
}
/*hand cursor on more arrow*/
.more-arrow {
  cursor: pointer !important;
}
/*down arrow after more links*/
.more-arrow:after {
  position: relative;
  top: -2px;
  left: -3px;
  font-shadow: none;
  font-size: 8px;
  content: '▼';
  padding-right: 5px;
}
/*toggleable drop downs on top of everything*/
.nav-drop-down {
  z-index: 9999;
  display: none;
  position: absolute;
  padding-top: 10px;
}
.nav-drop-down a {
  display: block;
  padding-left: 8px;
  text-align: left;
  padding-top: 4px;
  padding-bottom: 4px;
}
/*other main nav links*/
#nav-others {
  padding-right: 16px;
}
#nav-others a {
  width: 100%;
}
/*other user nav links*/
#user-hidden {
  right: 18px;
}
#user-hidden a {
  padding-right: 28px;
}
/*make logout look a little different*/
#user-logout {
  padding-top: 8px;
  padding-bottom: 8px;
}
/* More link */
#more {
  text-align: left !important;
}
#more a {
  color: #f60;
}
#more a:hover {
  text-decoration: underline;
}

body#item-body .title {
  width: 100%;
}
/*story title*/
.title {
  color: #242222;
  font-size: 16px !important;
  line-height: 18px;
  font-weight: medium;
}

/*make self posts text black*/
.item-header tr:nth-child(3) td {
  color: #000 !important;
}

a:link {
  color: #202020;
}

/*submit/add comment button*/
input[type="submit"] {
  font-size: 13px;
  color: white;
  background: #f60;
  padding: 5px 10px;
  text-transform: capitalize;
  border: 1px solid #666;
  border-radius: 2px;
}
input[type="submit"]:hover {
  cursor: pointer;
  background: #;
}
/*format add comment button on its own line*/
input[value="add comment"] {
  display: block;
}
input[type="text"] {
  font-size: 12px !important;
}
font[color="#ff6600"] {
  display: none;
}

.title a.on_story {
  border-left: 2px solid #3986f8 !important;
}
.submitter a:hover,
.title a:hover {
  color: #f60;
}

/*user name in info subtext*/
.submitter {
  margin-left: 4px;
}
.subtext, .submitter {
  color: #b8b8b8;
  font-size: 11px !important;
  padding-bottom: 15px;
}

.subtext a, .comhead a {
  color: #989898 !important
}
.comhead {
  color: #000;
  font-size: 11px !important;
}
div > .comhead {
  font-size: 12px !important;
}

/*score next to username indicating user upvotes*/
.hnes-user-score {
  color: #444;
}

.noscore {
  display: none;
}

.nostory, .noreply {
  display: none !important;
}

.hidden {
  display: none;
}

#loading_comments {
  margin: 1em;
  padding: 1em;
  color: #000;
  background-color: #FFFFFD
}

/*collapse comment 'button'*/
.collapse {
  padding-right: 6px;
  cursor: pointer;
}
.collapse:hover {
  text-decoration: underline;
}
.paren {
  color: #c9c9c9 !important;
}
.paren:first-child {
  margin-left: 5px;
}
.title:first-child {
  padding-left: 5px !important;
}
.pagetop a:hover,
.pagetop a:active {
  color: #000;
}

/*footer links*/
.yclinks {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 10px;
  color: #b8b8b8 !important;
}
.yclinks a {
  color: #888 !important;
}

#top-navigation {
  display: block;
}
.pagetop {
  font-size: 10pt;
}
.pagetop b a {
  font-size: 11px;
  display: none;
  color: #a3a3a3 !important
}
textarea {
  border: 1px solid #c6cfd6 !important;
  padding: 4px !important;
  font-size: 12px !important;
}
form textarea {
  background: #fff;
  font-size: 14px;
  padding: 10px;
  height:80px;
  overflow: auto;
  margin-bottom: 10px;
}
textarea, input {
  border-width: 1px;
  border-radius: 2px;
}
form textarea:focus, textarea:focus, input:focus, input[name="q"] {
  outline: #f60;
  border-color: #d73937 !important;
}
form[action="http://hn.algolia.com/"],
form[action="//hn.algolia.com/"],
input[name="q"] {
  width: 270px;
}
input[name="q"] {
  margin-left: 10px;
  height: 32px;
  padding-left: 10px;
  color: #888 !important;
}
input[name="q"]:focus {
  color: #3b3e40 !important;
}
form[action="http://hn.algolia.com/"],
form[action="//hn.algolia.com/"] {
  margin: 0 auto;
  color: #fff;
}
html body center table tbody tr td table tbody tr td table {
  background: none !important
}
br {
  display: none;
}
.default a:link {
  color: #000;
}

/*usernames are usually black*/
#item-body .comhead a.commenter,
#threads-body .comhead a.commenter {
  color: #000 !important;
}
/*but new users are green*/
a.new_user,
#item-body .comhead a.new_user {
  color: #3c963c !important;
}
/*and the person who posted the story is orange*/
a.original_poster,
#item-body .comhead a.original_poster {
  color: #f60 !important;
}

a.dead {
  text-decoration: line-through !important;
}

.comment font{
  display: block;
}
.comment {
  display: block;
  width: 100%;
  max-width: 800px;
  line-height: 1.5em;
}
.comment, .dead {
  font-size: 13px !important;
}
.comment code {
  font-size: 13px !important;
  line-height: 20px;
}
.default div {
  margin-bottom: 6px !important;
}
.comment p,
.comment > font {
  font-size: 13px !important;
  margin-top: 6px !important;
  margin-bottom: 6px !important;
}

/* Wrap <pre> tags (indented text) so they don't have an annoying horizontal scrollbar */
pre {
  white-space: pre-wrap;
  margin-left: 1em;
}

/*make sure comment headers are on one line
  even if comment is shorter than header to avoid bug in new chrome (win only)
 */
#comment-table {
  width: 100%;
}

.reply_form {
  width: 300px;
}
.reply_form input[type="submit"] {
  margin: 3px;
}
a[href^="reply"]:visited {
  color: #000
}
form input[type="submit"] {
  display: block;
}

#options_bar {
  position: fixed;
  bottom: 0;
  background: #fff;
  padding: 5px;
  border-top: 1px solid #c9c9c7;
  width: 100%;
}
td::selection,
::selection *,
::selection {
  background: #dd4b39 !important;
  color: #fff;
}

/* Submit Page */
form[action="/r"] table {
  width: 400px;
}
form[action="/r"],
form[action="/r"] input[type="text"],
form[action="/r"] textarea {
  width: 385px;
  margin: 5px 0;
}
form[action="/r"] input[type="submit"] {
  margin: 0px;
}
#submit-overlay {
  position: absolute;
  background: white;
  padding: 20px;
  z-index: 100;
  width: 535px;
  margin: 20px 0 0 150px;
  display: none;
  border-radius: 4px;
}
#overlay-bg {
  background: #000;
  opacity: .6;
  width: 4000px;
  height: 4000px;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 99;
  display: none;
}

/* HN Heat */
.no-heat {
  color: #000 !important;
}
.mild {
  color: #520 !important;
}
.medium {
  color: #a40 !important;
}
.hot {
  color: #f60 !important;
}

#jobs-body table table {
  padding-left: 7px;
  margin: 0 auto;
}
#jobs-body #content>td {
  margin: 0;
  padding: 0;
}

.poll-graph {
  background-color: #f60;
  display: block;
  height: 32px;
}

.underlined {
  text-decoration: underline !important;
}
.no-font-size {
  font-size: 0;
}
.link-highlight {
  border: 1px dashed #aaa;
  padding: 4px 27px 4px 7px !important;
}

td #more.link-highlight {
  border: none;
  padding: 5px 18px 5px 8px !important;
}

#alert {
  color: #dd4b39;
  padding: 5px;
  text-align: center;
}

#alert a {
  color: #000;
}

.mourning {
  border-top: 5px solid #000;
}

#user-profile td:first-child,
body#poll-body form td:first-child,
body#login-body tr#content form td:first-child {
  color: #444;
  padding-right: 1em;
}
#user-profile td:nth-child(2) {
  color: #000;
}
#user-profile.your-profile td p:first-of-type {
  margin-top: .5em;
}
#user-profile.your-profile td p {
  margin-top: 0em;
}
#user-profile.your-profile td span {
  margin-left: 1em;
}
#user-profile.your-profile .select-option {
  padding-top: 7px;
}
#user-profile a, .self-post-text a {
  text-decoration: underline !important;
}
#others-profile-submitted, #your-profile-change-password {
  padding-top: 2em;
}

form input[type="text"],
form input[type="password"] {
  padding: 3px;
}

body#login-body {
}
#login-body tr#content form{
  margin-top: 10px;
}
#login-body tr#content form input:not([type="submit"]) {
  width: 200px;
}
#login-body b {
  color: #000;
}
#login-body #login-msg {
  color: #000;
  font-style: italic;
  margin-left: 10px;
}
#login-body h1 {
  font-size: 130%;
  color: #222;
}
#login-body a:hover {
  text-decoration: underline;
}

/* borders indicating new comments */
.hnes-new-parent {
  border-left: 2px solid #bc9b85;
}
.hnes-new {
  border-left: 2px solid #f60;
}

.hnes-age,
.hnes-actions {
    margin-left: .5em;
    font-size: 11px;
}

.hnes-actions a:after {
    content: " | ";
    color: #000;
}

.hnes-actions a:last-child:after {
    content: "";
}

.hnes-actions:before {
    content: "[ ";
}

.hnes-actions:after {
    content: " ]";
}

/* user tags */
.hnes-tag, .hnes-tagText:not(:empty) {
    cursor: pointer;
}
.hnes-tag {
  margin-bottom: -3px;
}
.hnes-tagText:not(:empty) {
  padding: 0 2px;
  color: #000;
}
.hnes-tagEdit {
    padding-left: 2px;
    width: 120px;
    margin: 0 4px;
    display: none;
}
.hnes-tagImage {
  margin-right: 3px;
  margin-bottom: 3px;
}
.hnes-tag-cont.edit .hnes-tagText {
    display: none;
}
.hnes-tag-cont.edit .hnes-tagEdit {
    display: initial;
}

#hnmain table.comment-tree {
  display: none;
}

#hnes-comments {
  color: black;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5em;
}

#hnes-comments a, #hnes-comments a:visited {
  color: black;
}

#hnes-comments .permalink, #hnes-comments .permalink:visited {
  color: rgb(102, 102, 102);
}

#hnes-comments .parent {
  display: none;
}

#hnes-comments .replies {
  margin: 8px 0 0 30px;
}

.replies:empty {
  display: none;
}

.hnes-comment {
  padding: 4px 8px 4px 8px;
  margin: 0 0 16px 0;
}

.hnes-comment header {
  display: flex;
  font-size: 93%;
  color: rgb(102, 102, 102);
}

.hnes-comment header > span, .hnes-comment header > a {
  margin-right: 4px;
}

.votearrow.voted, .voteblock.voted {;
  display: none;
}

.unvoter.voted {
  display: block;
}

.unvoter {
  display: none;
  width: 10px;
  height: 10px;
  border: 0px;
  margin-top: 9px !important;
  margin-left: 1px;
  margin-right: 1px !important;
  padding: 0px;
}

.hnes-comment header a, .hnes-comment header span {
  margin-top: 4px;
}
.voteblock {
  margin: 0px 1px 0px 1px !important;
  padding: 0px;
  border: 0px;
  width: 10px;
  height: 10px;
}
.voteblock a {
  display: block;
  margin-top: 0px;
}
.voteblock .votearrow {
  margin: 3px 1px 3px;
}
.upvote.nodownvote {
  margin-top: 7px;
}

/*.hnes-comment .upvote, .hnes-comment .downvote {
  font-size: 16px;
}*/

/*.hnes-comment .upvote {
  display: block;
  height: 10px;
  width: 10px;
  padding: 1px;
  background: url('https://news.ycombinator.com/grayarrow.gif');
  background-position: top center;
  background-repeat: no-repeat;
  background-origin: padding-box;
}
.hnes-comment .downvote {
  display: block;
  height: 10px;
  width: 10px;
  padding: 1px;
  background: url('https://news.ycombinator.com/graydown.gif') no-repeat center;
}*/

.hnes-comment .reply-count {
  display: none;
}

.hnes-comment.collapsed .reply-count {
  color: #000;
  display: initial;
}

.hnes-comment .text {
  max-width: 800px;
}

.hnes-comment.level-odd,
#hnes-comments.nolevels .hnes-comment {
  background-color: #FFFFFD;
}

.hnes-comment.level-even {
  background-color: #F6F6EF;
}

.hnes-comment:last-child {
  margin: 0;
}

.hnes-comment a:hover {
  text-decoration: underline;
}

.hnes-comment.collapsed > section {
  display: none;
}

.hnes-comment section.body {
  margin-left: 34px;
}

.hnes-comment .collapser {
  display: block;
  margin-left: 4px;
  margin-right: 4px;
  width: 14px;
  cursor: pointer;
}

.hnes-comment .collapser:hover {
  color: #f60;
}

.hnes-comment .collapser::after {
  content: "[\2013]";
}

.hnes-comment.collapsed .collapser::after {
  content: "[+]";
}

.hnes-comment footer {
  font-size: smaller;
  text-decoration: underline;
}

/* removes some extraneous spacing between comments as mentioned in issue #140 */
.comtr td {
  padding: 0px;
}

/* hide native comment collapse */
.togg {
  display: none;
}

#content a:hover, #content a:visited:hover {
  color: #f60 !important;
}

#threads-body .morelink, #threads-body .morelink:hover {
  display: block;
  padding: 1em;
  color: #f60;
  font-size: 16px;
}
#threads-body .morelink:hover {
  text-decoration: underline;
}
