/**
 * @file OATN site-specific styling.
 */

/* Page */
#content {
  position: relative;
  margin-top: 20px;
}

/* Nodes */
body.page-node #page-title {
  margin-top: 0;
}

article.node .node-header .solution {
  position: absolute;
  padding: 1px 10px 1px 6px;
  right: 0;
  top: -21px;
}

.views-row article.node .node-header .solution {
  top: 0;
}

ul.links.inline {
  margin: 0;
  line-height: 3;
}

.node .field-name-field-kb-type,
.node .field-name-field-cems-type {
  position: absolute;
  top: -24px;
}

.node .field-name-field-kb-type a,
.node .field-name-field-cems-type a {
  text-transform: uppercase;
  letter-spacing: 1px;
}

.view .node .field-name-field-kb-type,
.view .node .field-name-field-cems-type {
  position: relative;
  top: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 1rem;
}

.node .group-info {
  background: #e9e9e9;
  padding: 0.5em 1em;
  margin: 1em 0;
}

.view .node .group-info {
  margin-top: 0;
}

.field-name-field-kb-sis .field-label {
  letter-spacing: 1px; /* SIS */
}

@media (max-width: 767px) {
  .field-name-field-kb-type,
  .field-name-field-cems-type {
    top: -20px;
  }
  article.node header .solution {
    top: -22px;
  }
}

/* Node form */
.filter-guidelines {
  display: none;
}

.linkit-field-button {
  display: none;
}

.textarea-processed + .field-suffix .linkit-field-button {
  display: inline;
}

/* Comments */
#comments {
  margin-top: 2rem;
}

#comments h2.title {
  margin: 0;
  padding: 1em;
  background: #ccc;
}

.subject-wrapper h3 {
  margin-top: 0;
}

.comment {
    border-left: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    padding-left: 1em;
    margin-top: 1rem;
}

.comment-solution .subject-wrapper {
  background-color: #dff0d8;
  border-radius: 10px;
  padding: 0 6px;
  margin-top: 2em;
}

.comment-solution .subject-wrapper h3 {
  display: inline;
}

article.resolved .comment.not-solution .flag-wrapper {
  display: none;
}

.solution {
  text-transform: uppercase;
  font-weight: bold;
  padding-right: 6px;
}

.comment .links li,
.comment > .flag-wrapper {
  padding: 0;
  margin-right: 4px;
}

.links a,
.links a.active,
.flag-wrapper a,
.field-name-field-kb-type a,
.field-name-field-cems-type a {
  background: #555;
  padding: 0.25em 1em;
  color: white;
  white-space: nowrap;
}

.flag-solution a.unflag-action {
  background: #b94a48; /* = .alert-error */
}

.flag-solution a.flag-action {
  background: #dff0d8; /* = .alert-error */
  color: #468847;
}

/* Comment form */
body.page-comment .node footer ul.links,
body.page-comment-reply .comment ul.links {
  display: none;
}

#comment-form {
  margin: 1em 0;
  padding: 1em 0;
  border-top: 1px solid #a1a1a1;
}

#edit-preview {
  display: none;
}

/* Taxonomy */
.page-taxonomy .node {
  margin-bottom: 2em;
  padding-bottom: 2em;
  border-bottom: 1px solid #e9e9e9;
}

.page-taxonomy .node .field-name-field-kb-type,
.page-taxonomy .node .field-name-field-cems-type {
  top: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Back to Top scrolling */
#back-top {
	position: fixed;
	bottom: 30px;
  right: 10%;
  background: #525051;
  background: rgba(40, 40, 40, 0.4);
  z-index: 9999;
}

#back-top a {
  font-family: Calibri, "Lucida Grande", "Lucida Sans", sans-serif;
	display: block;
	text-align: center;
	text-decoration: none;
  color: white;
  color: rgba(255, 255, 255, 0.8);
  font-weight: bold;
  font-size: 36px;
  padding: 18px;

	/* transition */
	-webkit-transition: 1s;
	-moz-transition: 1s;
	transition: 1s;
}
#back-top a:hover {
	color: #ffa300;
}

/* Views */
.views-exposed-widget-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid #666;
}

.views-exposed-form .btn {
  width: 100%;
}

/* Override views.css */
.views-exposed-form .views-exposed-widget {
  padding: 0;
}

/* Turn from span4 to span8 */
#edit-posted-wrapper {
  width: 65.6666666667%;
}

#edit-posted-wrapper .views-widget,
#edit-posted-wrapper .views-widget input {
  width: 100%;
  border: 1px solid #777;
  padding: 4px;
  box-sizing: border-box;
}

#edit-date-filter-min-wrapper,
#edit-date-filter-max-wrapper {
  display: inline-block;
  width: 48%;
}

#edit-date-filter-min-wrapper *,
#edit-date-filter-max-wrapper * {
  width: 100%;
}

#edit-date-filter-min-wrapper {
  margin-right: 4%;
}

.views-row {
  position: relative;
  padding: 3rem 0;
}

.views-row .node-header > h2 {
  margin-top: 0;
}

.dashboard table {
  table-layout: fixed;
  position: relative;
}

.dashboard caption {
  position: absolute;
  top: 0;
  left: 1em;
  padding-top: 9px;
  line-height: 18px;
  text-align: left;
  text-transform: uppercase;
  font-weight: bold;
  color: white;
}

.dashboard .views-field-edit-node {
  width: 2em;
  min-width: 24px;
}

.dashboard .views-field-title {
}

.dashboard th.views-field-field-kb-type {
  width: 7em;
}

.dashboard .views-field-created {
  text-align: center;
  width: 4em;
}

.dashboard .views-field-comment-count {
  width: 6em;
  text-align: center;
}

// .view-knowledge-base-search .views-widget-sort-order {
//   display: none;
// }

// .view-knowledge-base-search .views-exposed-form .views-exposed-widget {
//   width: 30%;
//   padding: 1em 1%;
// }

// .view-knowledge-base-search .views-exposed-widget select {
//   width: 100%;
// }

// .view-knowledge-base-search .views-exposed-widget input {
//   width: 90%;
// }

.ui-datepicker th {
  text-transform: none;
  min-width: inherit;
}

.form-type-date-popup .description {
color: #e9e9e9;
}

// .view-knowledge-base-search #edit-posted-wrapper {
//   width: 50%;
//   border: 2px solid #666;
// }

// .view-knowledge-base-search #edit-date-filter-min-wrapper {
//   float: left;
//   width: 50%;
// }

// .view-knowledge-base-search #edit-date-filter-max-wrapper {
//   float: left;
// }

// .view-knowledge-base-search .views-submit-button {
//   text-align: right;
// }

/* Blocks */
.block-menu {
  background: #e9e9e9;
}

.block-menu h2,
#block-menu-menu-quick-links h2 {
  background: #525051;
  color: white;
  font-size: 16px;
  line-height: 36px;
  padding-left: 15px;
  margin-top: 0;
}

.block-menu li + li {
  border-top: 1px solid #d4d4d4;
}

.block-menu ul li.leaf:before {
  content: none;
}

#subscribe table .form-item,
#subscriptions-page-form table .form-item {
  margin: 0;
}

#subscribe legend,
#subscriptions-page-form legend {
  margin-bottom: 0;
}

#subscribe table th {
  display: none;
}

/* @media styling */
@media (max-width: 480px) {
  .dashboard .views-field-edit-node {
    display: none;
  }
}

/* Misc */
#edit-subscriptions-notify .description {
  display: none;
}

.icon-pin {
  color: #700017;
  height: 1.4rem;
  width: 1.4rem;
  display: inline;
  vertical-align: inherit;
}

th.search-result-col {
  width: 6.5rem;
}

.search-result,
.row-fluid span.search-result {
  background: #ccc;
  max-height: 8px;
  min-height: 8px;
  margin-top: 0.5rem;
}

.row-fluid span.search-result {
  margin-top: 10px;
}

.row-fluid span.search-score {
  background: #509e2f;
  max-height: 8px;
  min-height: 8px;
  margin: 0;
}

.node-header .row-fluid span.search-result {
  margin-top: 24px;
}

/* Hide name from add-comment form. */
#edit-author--2 {
  display: none;
}

.page-comment-reply #page-title {
  margin-bottom: 36px;
}

/* ATC Search Styling. */
article.node footer {
  text-align: left;
  padding: 0;
  margin-top: 1em;
}

article.node .comment-wrapper h2.title, article.node .comment-wrapper a {
  font-size: 14px;
}

article.node .comment-wrapper .comment {
  border-left: 0;
  border-bottom: 0;
  padding-left: 0;
}

#comments h2.title {
  padding: 0.5em;
}
