/*
  Theme Name: yuilibrary-v2
  Author: Tilo Mitra, Anthony Pipkin and Allen Rabinovich
  Version: 1.0
*/

h1 {
  margin: .75em 0 1.5em;
}
h2 a, h2 a:visited {
  color: inherit;
}
.display-links li {
    list-style-type: none;
}

.post h2{
  margin: 2em 0 0.1em;
  padding-top: 0.25em;
  color: #30418C;
  border-top: solid 1px #DBDFEA;
}

.post .entry h2 {
  border-top: none;
}

.first-post h2 {
  border-top: none;
  margin-top: 1em;
}

h6 {
  display:inline;
  color: inherit;
}

.navigation {
  margin-top:5px;
}

/*The bottom navigation on the page should have a higher margin to separate it from the posts*/
.bottom-nav {
  margin-top:3em;
}
.prev-posts {
  padding-left:5px;
}

.nav-separator {
  width:15px;
  text-align:center;
  display:inline-block;
}

.breadcrumbs {
    list-style: none;
    padding: 0;
    margin: 0 0 1em 0;
    overflow: hidden;
}

.breadcrumbs li {
    list-style-type: none;
    float: left;
    margin: 0 0.5em 0 0;
}
.breadcrumbs li:before {
    content: "> ";
    color: #ccc;
}
.breadcrumbs .front_page:before,
.breadcrumbs li:first-child:before {
    content: none;
}

.button:hover {
  border-color: #466899;
  -moz-box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  color: white;
  text-decoration: none;
  -moz-text-shadow: 1px 1px 0 #222;
  -webkit-text-shadow: 1px 1px 0 #222;
  text-shadow: 1px 1px 0 #222;
  background: #6396D8;
}

#respond {
  margin: 2em 0 0.1em;
  border-top: solid 1px #DBDFEA;
  padding-top: 0.25em;
}
.meta {
  overflow: hidden;
  margin: .5em 0 1em;
}

.greyed {
  color: #ccc;
}

.meta img, .authorbox img {
  float: left;
  border: 1px solid hsl(0,0%,95%);
  padding: 2px;
  vertical-align: middle;
  margin-right: 12px;
}
.meta .date {
  display: block;
}
.meta .cont {
  overflow: hidden;
}
.author img {
}
.author .name {
  vertical-align: middle;
  font-weight: 500;
}

.tags .subtitle, .posted-in .subtitle {
  display: inline-block;
  zoom: 1;
  *display: inline;
  width: 5em;
}

.tags {
  margin-bottom: 7px;
}

.tags > a {
  padding-left: 20px;
  background: url('images/tag.png') left center no-repeat;
}
.tags > a, .posted-in > a {
  white-space: nowrap;
}
.posted-in .place-comment {
  white-space: nowrap;
}

iframe.twitter-share-button {
  position: relative;
  top: -6px;
}

#sidebar {
  /* margin-top: 79px; */
}
#sidebar .liner {
  padding: 0 15px 0 10px;
}

span.date {
  color:#666;
  font-size:85%;
}


/*COMMENTS STYLES*/
ol.commentlist, ol.commentlist .children {
  list-style-type:none;
}

ol.commentlist .children {
  padding-top: 15px;
}

ol.commentlist .children li {
  border-left: 1px solid #E5E6F1;
  padding-left:10px;
}
.comment {
  padding-bottom:10px;
  margin-bottom:20px;
}

.commentlist .avatar {
  background: none;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
}

a.comment-reply-link {

  background: #EEE;
  -moz-border-radius: 3px;
  border-radius: 3px;
  color: #666;
  display: inline-block;
  font-size: 12px;
  padding: 0 8px;
  text-decoration: none;
}
cite.fn {
  font-weight:bold;
  text-transform: none;
}

#commentform div {
  padding: 5px 0;
}
#commentform div input[type=text] {
  padding: 3px;
}
#commentform #submit:hover {
  cursor:pointer;
}

.authorbox {
  padding:15px;
  background: #E8EFF5;
  font-size: 95%;
}
/* Guest Author Box Styles */
.authorbox em {
  display:block;
  font-style: normal;
}

.authorbox img {
  width:32px;
  height:auto;
}

#ft {
  clear: both;
  margin-top: 2em;
  padding: 20px;
  border-top: 1px solid #DBDFEA;
  background: #f5f5f5;
}

#ft footer {
  text-align: center;
}

#ft .copyright {
  color: #666;
  font-size: 13px;
  letter-spacing: normal;
}

/* Post List Styles */
.post-list {
  margin: 0;
  padding: 0;
}

.post-list .post-summary {
  margin-bottom: 2em;
  padding-bottom: 2em;
  border-bottom: 1px solid #DBDFEA;
}

.post-list .post-summary:last-child {
  border-bottom: none;
}

.post-list .post-summary h2 {
  margin: 0 0 0.5em;
  border-top: none;
  padding-top: 0;
}

.post-list .post-summary h2 a {
  color: #30418C;
  text-decoration: none;
}

.post-list .post-summary h2 a:hover {
  text-decoration: underline;
}

.post-list .post-summary .meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 1em;
}

.post-list .post-summary .meta .date {
  color: #333;
  margin-bottom: 0.25em;
}

.post-list .post-summary .meta .byline {
  color: #666;
}

.post-list .post-summary .meta .byline a {
  color: #30418C;
}

.post-list .post-summary .excerpt {
  margin-bottom: 1em;
  line-height: 1.6;
  color: #333;
}

.post-list .post-summary .excerpt p {
  margin: 0;
}

.post-list .post-summary .read-more {
  color: #30418C;
  font-weight: bold;
  text-decoration: none;
}

.post-list .post-summary .read-more:hover {
  text-decoration: underline;
}

/* Pagination Styles */
.pagination {
  margin: 2em 0;
  padding: 1em 0;
  border-top: 1px solid #DBDFEA;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
}

.pagination .page-numbers {
  display: flex;
  align-items: center;
  gap: 0.25em;
}

.pagination .page-num {
  display: inline-block;
  min-width: 2em;
  padding: 0.5em 0.75em;
  text-align: center;
  text-decoration: none;
  border: 1px solid #DBDFEA;
  border-radius: 3px;
  background: #fff;
  color: #30418C;
  font-size: 0.9em;
}

.pagination .page-num:hover {
  background: #E8EFF5;
}

.pagination .page-num.current {
  background: #30418C;
  color: #fff;
  border-color: #30418C;
}

.pagination .page-ellipsis {
  padding: 0.5em 0.25em;
  color: #666;
}

.pagination .prev,
.pagination .next {
  color: #30418C;
  text-decoration: none;
  padding: 0.5em 1em;
  border: 1px solid #DBDFEA;
  border-radius: 3px;
  background: #f9f9f9;
  margin-left: 0.5em;
}

.pagination .prev:hover,
.pagination .next:hover {
  background: #E8EFF5;
}

.pagination .page-info {
  color: #666;
  font-size: 0.9em;
}

/* Prism Code Block Styling (Dark Theme) - Override defaults */
pre,
pre.code,
pre.prettyprint,
#doc pre.prettyprint,
pre[class*="language-"] {
  background: #2d2d2d !important;
  color: #ccc !important;
  font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  padding: 1em !important;
  margin: 1em 0 !important;
  overflow: auto !important;
  border-radius: 6px !important;
  border: 1px solid #3a3a3a !important;
  border-left-width: 1px !important;
}

pre code,
pre code[class*="language-"] {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  font-size: inherit !important;
}

/* Prism syntax colors */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #999 !important;
}

.token.punctuation {
  color: #ccc !important;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
  color: #f92672 !important;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #a6e22e !important;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
  color: #67cdcc !important;
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #66d9ef !important;
}

.token.function,
.token.class-name {
  color: #e6db74 !important;
}

.token.regex,
.token.important,
.token.variable {
  color: #fd971f !important;
}

/* Inline code - light background for readability in body text */
:not(pre) > code {
  background: #f0f0f0 !important;
  padding: 0.2em 0.4em !important;
  border-radius: 3px !important;
  font-size: 0.88em !important;
  color: #c7254e !important;
  border: 1px solid #e1e1e1 !important;
}

/* Prism Toolbar (Language Label) */
div.code-toolbar {
  position: relative;
}

div.code-toolbar > .toolbar {
  position: absolute;
  top: 0.5em;
  right: 0.5em;
  opacity: 1;
}

div.code-toolbar > .toolbar .toolbar-item {
  display: inline-block;
}

div.code-toolbar > .toolbar span {
  background: #444;
  color: #ccc;
  padding: 0.25em 0.5em;
  font-size: 11px;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Base responsive container */
#doc {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

/* Prevent text overflow */
body {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#main,
#main .liner,
.post,
.post-summary,
article {
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 100%;
}

/* Long URLs and code should break */
a {
  word-break: break-word;
}

p, li, dd, td, th {
  overflow-wrap: break-word;
}

/* Tablet and below (< 960px) */
@media screen and (max-width: 960px) {
  * {
    box-sizing: border-box;
  }
  
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }
  
  #doc, #wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden;
    padding: 0 !important;
  }
  
  #bd {
    width: 100% !important;
    padding: 15px !important;
  }
  
  #bd.yui3-g {
    display: block;
  }
  
  #main.yui3-u-3-4,
  #sidebar.yui3-u-1-4,
  .yui3-u-3-4,
  .yui3-u-1-4 {
    width: 100% !important;
    display: block;
    float: none;
  }
  
  #main .liner,
  #sidebar .liner {
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* Mobile (< 768px) */
@media screen and (max-width: 768px) {
  /* Header */
  #hd {
    padding: 15px !important;
  }
  
  #hd .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  #hd .site-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  #hd .site-logo img {
    height: 40px;
  }
  
  #hd .site-title {
    font-size: 24px !important;
  }
  
  #hd .site-tagline {
    font-size: 13px !important;
  }
  
  /* Post titles */
  h1 {
    font-size: 1.5em;
  }
  
  h2 {
    font-size: 1.3em;
  }
  
  /* Post list */
  .post-summary h2 {
    font-size: 1.2em;
  }
  
  .post-summary .meta {
    font-size: 0.85em;
  }
  
  /* Breadcrumbs */
  .breadcrumbs {
    font-size: 0.85em;
  }
  
  .breadcrumbs li {
    margin: 0 0.3em 0.3em 0;
  }
  
  /* Sidebar */
  #sidebar {
    margin-top: 2em;
    border-top: 1px solid #ddd;
    padding-top: 1em;
  }
  
  #sidebar .sidebox {
    margin-bottom: 1.5em;
  }
  
  #sidebar select {
    width: 100%;
    padding: 8px;
    font-size: 16px;
  }
  
  #sidebar ul {
    padding-left: 1.2em;
  }
  
  /* Images */
  .post img,
  .entry img,
  article img {
    max-width: 100%;
    height: auto;
  }
  
  /* Tables */
  table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }
  
  /* Code blocks */
  pre {
    font-size: 12px !important;
    padding: 0.75em !important;
  }
  
  /* Pagination */
  .pagination {
    flex-wrap: wrap;
    gap: 0.5em;
  }
  
  .pagination .page-numbers {
    width: 100%;
    text-align: center;
    margin-bottom: 0.5em;
  }
  
  .pagination .page-num {
    padding: 0.4em 0.6em;
    font-size: 0.9em;
  }
  
  /* Footer */
  #ft {
    padding: 15px;
    font-size: 0.85em;
  }
}

/* Small mobile (< 480px) */
@media screen and (max-width: 480px) {
  #hd .site-title {
    font-size: 20px !important;
  }
  
  h1 {
    font-size: 1.3em;
  }
  
  .post-summary h2 {
    font-size: 1.1em;
  }
  
  /* Stack author/date info */
  .post-summary .byline {
    display: block;
  }
  
  /* Smaller code blocks */
  pre {
    font-size: 11px !important;
  }
  
  /* Hide some pagination numbers on very small screens */
  .pagination .page-ellipsis {
    display: none;
  }
}
