/* crazymonk.org - Original theme recreation */
/* Based on SEO Position Theme (Drupal 5 Edition) */

* { margin: 0; padding: 0; }

body {
  font-family: verdana, arial, sans-serif;
  color: #333;
  background: #fff;
}

a, a:visited {
  border-bottom: 1px dotted #006286;
  color: #006286;
  text-decoration: none;
}

a:active, a:hover {
  border-bottom: 1px solid #414141;
  color: #994D00;
  text-decoration: none;
}

a.no_underline { border-bottom: 0; }
a img { border-bottom: 0; }

p { margin-bottom: 1em; }
h1, h2, h3, h4 { font-weight: normal; }

blockquote {
  padding: 4px 0;
  margin-left: 20px;
  color: #444;
  font-size: 10px;
  line-height: 1.4em;
}

/* Layout */
#container {
  width: 980px;
  margin: auto;
  position: relative;
}

#main {
  width: 960px;
  padding-top: 152px;
  line-height: 1.25em;
}

/* Header */
#header {
  background: #444 url('/assets/images/header.jpg') no-repeat;
  height: 149px;
  width: 936px;
  font-family: helvetica, verdana, arial, sans-serif;
  color: #fff;
  position: absolute;
  top: 0;
  left: 22px;
}

#header h1.site-name {
  padding: 20px 12px 0.2em 730px;
  font-size: 1.8em;
  line-height: 1em;
}

#header h1.site-name a {
  color: #fff;
  border-bottom: 0;
}

#header h2.site-slogan {
  padding: 3px 12px 0.2em 780px;
  font-size: 0.7em;
}

a.banner { border-bottom: 0; }
a.banner img {
  position: absolute;
  border-bottom: 0;
  top: 0;
  left: 0;
}

/* Content */
#content {
  width: 620px;
  padding: 12px 12px 0 22px;
  font-size: 0.75em;
  float: left;
  box-sizing: border-box;
}

#content .content img,
#content .node img,
#content .editor-preview img {
  padding: 3px 7px;
  max-width: 100%;
}

#content h2 {
  color: #006286;
  font-size: 1.7em;
  font-family: helvetica, verdana, arial, sans-serif;
  padding-top: 0.4em;
  margin-bottom: 0.5em;
  border-top: 2px solid #414141;
}

#content h2 a, #content h2 a:visited {
  border-bottom: 0;
  color: #1d491d;
}

#content h2 a:active, #content h2 a:hover {
  border-bottom: 0;
  color: #994D00;
}

#content .meta {
  border-bottom: 1px solid #414141;
  border-top: 1px dashed #414141;
  clear: both;
  font-size: 0.9em;
  margin: 2em 0;
  padding: 0.2em 0 0.3em;
  text-align: right;
  text-transform: uppercase;
}

#content ul { padding-bottom: 5px; }

#content li {
  padding-left: 8px;
  margin: 0 20px 5px 10px;
  text-align: left;
}

/* Asides (short posts) */
#content ul.aside {
  list-style-type: none;
  padding-bottom: 20px;
}

#content ul.aside li {
  background: url('/assets/images/arrow.gif') left 0.5em no-repeat;
  padding-left: 16px;
  margin: 0 20px 5px 10px;
  text-align: left;
  list-style-type: none;
}

.aside_date {
  font-size: 0.75em;
  display: inline;
  color: #444;
}

/* Full posts */
.content.full {
  margin-bottom: 1em;
}

.node {
  margin-bottom: 20px;
}

/* Links */
ul.links.inline {
  list-style: none;
  padding: 0;
}

ul.links.inline li {
  display: inline;
  background: none;
  list-style-type: none;
  margin: 0;
  padding: 0 10px;
}

/* Continue reading link */
li.node_read_more {
  background: url('/assets/images/page.gif') left 0.25em no-repeat;
  padding-left: 13px;
}

/* Sidebar */
#sidebar {
  width: 300px;
  float: left;
  padding-top: 17px;
  margin: 0 0 10px 9px;
  font-size: 0.7em;
  font-family: verdana, arial, sans-serif;
  background: #fff;
  border-bottom: 1px solid #ddd;
  box-sizing: border-box;
}

#sidebar .block { margin-bottom: 20px; }

/* About box at top of sidebar */
#bothcols {
  width: 300px;
  background: url('/assets/images/boxtop.png') no-repeat;
  background-size: 100% auto;
  float: left;
}

#bothcolscontent {
  width: 100%;
  background: url('/assets/images/boxbottom.png') bottom no-repeat;
  background-size: 100% auto;
  padding: 12px 12px 1px 12px;
  text-align: left;
  min-height: 90px;
  box-sizing: border-box;
}

#bothcolscontent h2 {
  background: none;
  color: #000;
  font-size: 1.7em;
  font-weight: normal;
  text-transform: uppercase;
  margin-bottom: 0.5em;
  font-family: helvetica, verdana, arial, sans-serif;
}

/* Left and right columns in sidebar */
#leftcol {
  width: 100%;
  margin-top: 10px;
  background: #fff;
  float: left;
}

#leftcol .block h2,
#rightcol .block h2 {
  padding: 1px 6px;
  background-color: #27546b;
  color: #fff;
  font-size: 1.1em;
  text-transform: uppercase;
  border-bottom: 2px solid #555;
  margin-bottom: 0.5em;
}

#sidebar ul {
  list-style-type: none;
  padding: 0;
}

#sidebar li {
  list-style-type: none;
  padding: 0;
  margin: 0 0 3px 0;
}

#sidebar li a {
  display: block;
  border: 0;
  padding: 0 2px;
}

#sidebar li a:hover {
  background: #eee;
}

/* Footer */
#footer {
  clear: both;
  width: 980px;
  text-align: center;
  padding: 12px 0;
  border-top: 1px solid #ddd;
  margin-top: 20px;
}

/* Pagination */
.pager {
  text-align: center;
  padding: 20px 0;
  font-size: 0.9em;
}

.pager a {
  padding: 2px 8px;
  margin: 0 2px;
}

.pager-current {
  font-weight: bold;
  padding: 2px 8px;
}

/* Comments */
#comments {
  margin-top: 2em;
  border-top: 2px solid #414141;
  padding-top: 0.5em;
}

#comments h3.comment-header {
  color: #006286;
  font-size: 1.4em;
  font-family: helvetica, verdana, arial, sans-serif;
  font-weight: normal;
  margin-bottom: 1em;
}

#comments .comment.clear-block {
  margin: 0.5em 0 0.2em 0;
}

#comments .comment .content {
  line-height: 1.4em;
}

#comments .comment .content p {
  margin-bottom: 0.5em;
}

#comments .commentfooter {
  border-bottom: 1px dashed #aaa;
  padding-bottom: 0.8em;
  margin-bottom: 0.8em;
  font-size: 0.85em;
  color: #666;
  text-align: right;
}

#comments .commentfooter a {
  color: #006286;
}

/* Mastodon Comments */
#mastodon-comments {
  margin-top: 2em;
  border-top: 2px solid #414141;
  padding-top: 0.5em;
}

#mastodon-comments h3.comment-header {
  color: #006286;
  font-size: 1.4em;
  font-family: helvetica, verdana, arial, sans-serif;
  font-weight: normal;
  margin-bottom: 1em;
}

.mastodon-comment {
  margin: 0.5em 0 0.2em 0;
  padding: 0;
}

.mastodon-comment.threaded {
  margin-left: 24px;
  border-left: 2px solid #ddd;
  padding-left: 12px;
}

.mastodon-comment.threaded-2 { margin-left: 48px; }
.mastodon-comment.threaded-3 { margin-left: 72px; }
.mastodon-comment.threaded-4 { margin-left: 96px; }

.mastodon-comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.mastodon-comment-avatar,
#content .mastodon-comment-avatar {
  width: 24px;
  height: 24px;
  max-width: 24px;
  border-radius: 50%;
  padding: 0 !important;
}

.mastodon-comment-meta a {
  font-weight: bold;
  font-size: 0.9em;
}

.mastodon-comment-content {
  line-height: 1.4em;
  margin-bottom: 0.2em;
}

.mastodon-comment-content p {
  margin-bottom: 0.5em;
}

.mastodon-loading {
  color: #666;
  font-style: italic;
}

/* Editor */
.editor-container {
  max-width: 100%;
}

.editor-session {
  margin-bottom: 1em;
  font-size: 0.9em;
  color: #666;
}

.editor-session img,
#content .editor-session img {
  width: 20px;
  height: 20px;
  max-width: 20px;
  border-radius: 50%;
  vertical-align: middle;
  padding: 0 !important;
}

.editor-form label {
  display: block;
  margin: 0.8em 0 0.2em;
  font-weight: bold;
  font-size: 0.9em;
  color: #333;
}

.editor-form input[type="text"],
.editor-form select {
  width: 100%;
  padding: 4px 6px;
  font-size: 0.9em;
  font-family: verdana, arial, sans-serif;
  border: 1px solid #aaa;
  box-sizing: border-box;
}

.editor-form .editor-textarea {
  width: 100%;
  min-height: 250px;
  padding: 6px;
  font-family: monospace;
  font-size: 0.85em;
  line-height: 1.4em;
  border: 1px solid #aaa;
  box-sizing: border-box;
  resize: vertical;
}

.editor-type-toggle {
  display: flex;
  gap: 12px;
  margin: 0.5em 0;
}

.editor-type-toggle label {
  display: inline;
  font-weight: normal;
  cursor: pointer;
}

.editor-type-toggle input {
  margin-right: 4px;
}

.editor-actions {
  margin-top: 1em;
  display: flex;
  gap: 10px;
}

.editor-actions button {
  padding: 6px 16px;
  font-size: 0.9em;
  cursor: pointer;
  border: 1px solid #aaa;
  background: #f5f5f5;
}

.editor-actions button[type="submit"] {
  background: #27546b;
  color: #fff;
  border-color: #27546b;
  font-weight: bold;
}

.editor-actions button[type="submit"]:hover {
  background: #1d3f50;
}

.editor-preview {
  margin-top: 1em;
  padding: 12px;
  border: 1px solid #ddd;
  background: #fafafa;
  min-height: 60px;
  line-height: 1.4em;
}

.editor-preview h4 {
  margin-bottom: 0.5em;
  color: #006286;
  font-family: helvetica, verdana, arial, sans-serif;
}

.editor-status {
  margin-top: 1em;
  padding: 8px;
  font-size: 0.9em;
}

.editor-status.success {
  background: #e6f9e6;
  border: 1px solid #4a4;
  color: #2a2;
}

.editor-status.error {
  background: #fde6e6;
  border: 1px solid #a44;
  color: #a22;
}

/* Editor image upload */
.editor-image-upload {
  margin: 0.8em 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-image-upload input[type="file"] {
  font-size: 0.85em;
}

.editor-image-upload button {
  padding: 4px 12px;
  font-size: 0.85em;
  cursor: pointer;
  border: 1px solid #aaa;
  background: #f5f5f5;
}

.editor-image-upload button:hover {
  background: #eee;
}

.editor-image-status {
  font-size: 0.85em;
  color: #666;
  width: 100%;
}

/* Markdown cheatsheet */
.editor-cheatsheet {
  margin: 0.8em 0;
  font-size: 0.85em;
}

.editor-cheatsheet summary {
  cursor: pointer;
  color: #006286;
  font-weight: bold;
}

.editor-cheatsheet table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5em;
}

.editor-cheatsheet td {
  padding: 3px 8px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.editor-cheatsheet td:first-child {
  font-family: monospace;
  white-space: nowrap;
  color: #555;
}

/* Editor full-width layout */
.editor-layout #content {
  width: 936px;
  max-width: 100%;
}

/* Clear fix */
.clear-block:after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive adjustments for modern browsers */
@media (max-width: 1000px) {
  #container {
    width: 100%;
    max-width: 980px;
  }

  #main {
    width: 100%;
    padding-top: 160px;
  }

  #header {
    width: calc(100% - 44px);
    background-size: cover;
  }

  #content {
    width: 62%;
    padding: 12px;
    box-sizing: border-box;
  }

  #sidebar {
    width: 34%;
    box-sizing: border-box;
  }

  #bothcols,
  #leftcol {
    width: 100%;
    float: none;
    border-left: 0;
    padding: 10px 0;
  }

  #footer {
    width: 100%;
  }

  .editor-layout #content {
    width: 100%;
  }
}

@media (max-width: 768px) {
  #main {
    padding-top: 0;
  }

  #header {
    position: relative;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 80px;
    padding: 10px;
    box-sizing: border-box;
  }

  a.banner img {
    position: relative;
    width: 100%;
    height: auto;
  }

  #header h1.site-name {
    padding: 10px;
    font-size: 1.4em;
  }

  #header h2.site-slogan {
    padding: 0 10px 10px;
    font-size: 0.6em;
  }

  #content,
  #sidebar {
    width: 100%;
    float: none;
    padding: 10px;
    box-sizing: border-box;
  }

  #bothcols,
  #leftcol {
    width: 100%;
  }

  #footer {
    width: 100%;
  }

  .editor-layout #content {
    width: 100%;
  }

  .editor-actions {
    flex-wrap: wrap;
  }

  .editor-actions button {
    flex: 1;
    min-width: 120px;
  }

  .editor-form .editor-textarea {
    min-height: 180px;
  }
}

@media (max-width: 480px) {
  #header h1.site-name {
    font-size: 1.1em;
    padding: 8px;
  }

  #header h2.site-slogan {
    display: none;
  }

  #content h2 {
    font-size: 1.3em;
  }

  .mastodon-comment.threaded,
  .mastodon-comment.threaded-2,
  .mastodon-comment.threaded-3,
  .mastodon-comment.threaded-4 {
    margin-left: 12px;
  }

  .editor-image-upload {
    flex-direction: column;
    align-items: flex-start;
  }
}
