/*
Theme Name: chronobio2020
Author: Reto Merz
Description: The theme of chronobiology.ch, updated in 2020.
Version: 0.2.0.0
Text Domain: chronobio2020
Domain Path: /languages
*/

/*
Language Icons from Twemoji by Twitter

https://twemoji.twitter.com/
Copyright 2020 Twitter, Inc and other contributors
Graphics licensed under CC-BY 4.0: https://creativecommons.org/licenses/by/4.0/
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Typography / HTML Tags

# General Site
#     branding
#     navbar
#     main content
#     post navigation
#     widget sidebar
#     footer

# Pages
#     page with featured image 
#     author page

# Shortcodes
#     member overview
#     group overview
#     seminar

# Posts
#     default template
#     vertical summary template

# teachPress publications

# Widgets

# Misc.
#     search form

--------------------------------------------------------------*/

/*--------------------------------------------------------------
>>> TYPOGRAPHY / HTML TAGS
----------------------------------------------------------------*/

body,
html {
  margin: 0;
  padding: 0;
}

body,
button,
input,
select,
textarea {
  color: #404040;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  clear: both;
  font-family: "Raleway", "Open Sans", sans-serif;
  font-weight: bold;
  color: #000000;
  margin-bottom: 0.8rem;
}
h1 {
  font-size: 1.9rem;
}
h2 {
  font-size: 1.6rem;
}
h3 {
  font-size: 1.3rem;
}
h4 {
  font-size: 1rem;
}
h5 {
  font-size: 1rem;
}
h6 {
  font-size: 0.875em;
}
p,
li,
td,
input {
  font-size: 1rem;
}
p {
  margin-bottom: 1em;
}
dfn,
cite,
em,
i {
  font-style: italic;
}
blockquote {
  margin: 0 1.5em;
}
address {
  margin: 0 0 1.5em;
}
pre {
  background: #eee;
  font-family: "Courier 10 Pitch", Courier, monospace;
  font-size: 15px;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1.6em;
  max-width: 100%;
  overflow: auto;
  padding: 1.6em;
}
code,
kbd,
tt,
var {
  font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
  font-size: 15px;
  font-size: 0.9375rem;
}
abbr,
acronym {
  border-bottom: 1px dotted #666;
  cursor: help;
}
mark,
ins {
  background: #fff9c0;
  text-decoration: none;
}
big {
  font-size: 125%;
}
a {
  color: #2d7d8e;

  /* LINE BREAKS in LINKS; from https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/ */
  /* These are technically the same, but use both */
  overflow-wrap: break-word;
  word-wrap: break-word;

  -ms-word-break: break-all;
  /* This is the dangerous one in WebKit, as it breaks things wherever */
  word-break: break-all;
  /* Instead use this non-standard one: */
  word-break: break-word;

  /* Adds a hyphen where the word breaks, if supported (No Blink) */
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
  hyphens: auto;
}

a:hover {
  color: #2d7d8e;
}

textarea:focus,
input:focus {
  outline: none;
}
input {
  padding: 0.5rem;
  padding-left: 1rem;
}

article p img,
article li img,
.wp-block-image img,
.featured-img {
  border-radius: 0.2rem;

  max-width: 100%;
  height: auto;
}

@media (max-width: 575px) {
  .row {
    display: block;
  }
}

.alignleft,
img.alignleft,
.alignright,
img.alignright {
  display: inline;
  margin-bottom: 1rem;
  max-width: 100%;
  height: auto;
}

.alignleft,
img.alignleft {
  float: left;
  margin-right: 1.5rem;
}
.alignright,
img.alignright {
  float: right;
  margin-left: 1.5rem;
}

.alignfull {
  width: 100%;
  height: auto;
}

.wp-block-image img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 575px) {
  .wp-block-image .alignright,
  .wp-block-image .alignleft,
  .wp-block-image .alignright img,
  .wp-block-image .alignleft img,
  .wp-block-image img {
    margin-left: 0;
    margin-right: 0;
	  
	width: 100%;
	height: auto;
  }
}



/*--------------------------------------------------------------
>>> GENERAL SITE
----------------------------------------------------------------*/

.divider {
  border-left: #aaa 1px solid;
  width: 0;
  margin-left: 10px;
  margin-right: 10px;
}

/* BRANDING */
.site-header {
  margin-bottom: 1.5rem;
}

#branding-container {
  margin-top: 0.8rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.branding-logo {
  max-width: 100px;
  height: auto;
  width: 100%;
}

.branding-title-container {
  margin-left: 0.5rem;
  justify-content: space-evenly !important;
}

.branding-title {
  margin: 0;
  font-weight: bold;
  font-family: "Segoe UI", Arial, sans-serif;
  max-width: 16rem;
  font-size: 1.5rem;
}

.branding-title a {
  color: #212529;
  text-decoration: none;
	
  /* Don't hyphenate */
  -ms-hyphens: none;
  -moz-hyphens: none;
  -webkit-hyphens: none;
  hyphens: none;
}

header .logo-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

header .upk-link {
  margin: 0;
  font-family: sans-serif;
  font-weight: 400;
  font-size: 1.2rem;
}

header .upk-link a {
  color: #555555;
}

#branding-right .unibas-logo img {
  max-height: 5rem;
  margin-right: 1rem;
}

#branding-right .mcn-logo img {
  max-height: 3.5rem;
}

@media (max-width: 575px) {
  #branding-right {
    display: none !important;
  }
}

.branding-subdivision {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#branding-left {
  display: flex;
}

#branding-right {
  display: flex;
}

/* NAVBAR */
header nav {
  background-color: #93cbd7;
  border-radius: 0.4em;
  padding: 0.4rem 1rem !important;
}

header nav div ul {
    flex: 1;
    justify-content: space-between;
}

header nav a {
  font-size: 1rem;
}

header nav .dropdown-menu a {
  font-size: 1.1rem;

  white-space: pre-wrap; /* css-3 */
  white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
  white-space: -pre-wrap; /* Opera 4-6 */
  white-space: -o-pre-wrap; /* Opera 7 */
  word-wrap: break-word; /* Internet Explorer 5.5+ */
}

header nav .nav-link {
  font-weight: 500;
  color: #ffffff;
}

.dropdown-menu {
  top: 90%;
}

@media (min-width: 992px) {
  .dropdown:hover .dropdown-menu {
    /* expand menu on hover */
    display: block;
  }

  /* header nav li:not(:last-child) .dropdown-menu a {
    width: 20rem;
  } */

  header nav li .dropdown-menu a {
    width: 15rem;
  }
}

.dropdown-item {
  color: #6facb9;
}

.dropdown-item:hover {
  color: #6f9aa3;
  background-color: #effcff;
}

.dropdown-item:active {
  background-color: #effcff;
  color: #6f9aa3;
}

/* MAIN CONTENT */
.site-main {
  width: 100%;
}

.page-title,
.single-title {
  font-weight: bold;
  margin-bottom: 1rem;
}

.site-content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

@media (max-width: 767px) {
  .site-content {
    display: block;
  }
}

.content-area {
  width: 100%;
}

.posts-container {
  flex-direction: column;
}

.post-content {
  font-size: 1rem;
}

/* COMMENTS */

#comments {
  margin-top: 2rem;
}

#commentform .comment-form-comment {
  display: flex;
  flex-direction: column;
}

#commentform .comment-form-comment label[for="comment"] {
  font-weight: bold;
}

#comments .comment-list,
#comments .comment-list ol.children {
  list-style-type: disc;
  padding-left: 1.5rem;
}

#comments .comment-meta {
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid grey;
  padding-bottom: 0.5rem;
}

#comments .comment-list article.comment-body {
  margin-bottom: 0.5rem;
}

#comments .comment-list .comment-content p {
  margin-bottom: 0.2rem;
}

/* POST NAVIGATION */

.post-navigation {
  margin-top: 2rem;
}

.post-navigation .nav-title {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.posts-navigation .nav-links a {
  font-size: 1rem;
}

.post-navigation .nav-links a:hover {
  background: #93cbd7;
}

.post-navigation .nav-links {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 2rem;
}
.post-navigation .nav-previous .nav-subtitle {
  align-self: flex-end;
}
.post-navigation .nav-next {
  grid-column-start: 1;
  grid-row-start: 1;
}
.post-navigation .nav-previous {
  grid-column-start: 2;
  justify-self: end;
}

.posts-navigation {
  margin-bottom: 1rem;
}

@media (max-width: 767px) {
  /* reorder content on smaller screens and make img full width  */
  .post-navigation .nav-links {
    display: flex;
    flex-flow: column;
  }

  .post-navigation .nav-next {
    order: 1;
    margin-bottom: 0.5rem;
  }
  .post-navigation .nav-previous {
    order: 2;
  }
}

.to-the-top,
.post-navigation .nav-links a {
  font-weight: bold;
  font-size: 1rem;
  padding: 0.5rem;
  border: 1px solid black;
  border-radius: 0.1rem;
  color: black;
  display: flex;
  flex-direction: column;
  max-width: max-content;
}

.to-the-top:hover {
  background: #ffffff;
}

/* WIDGET SIDEBAR */

.menu {
  margin-top: 20px;
}

.sidebar {
  display: flex;
  flex-direction: row;
  min-width: max-content;
  max-width: 12rem;
  align-self: flex-start;

  margin-left: 2rem;
}

@media (max-width: 767px) {
  .sidebar {
    margin-left: 0;
    min-width: initial;
    max-width: initial;
  }
}

.sidebar-content {
  flex-direction: column;
}

.sidebar ul {
  padding-left: 30px;
}

/* FOOTER */

footer.bottom-bar {
  margin-top: 2rem;
}

footer.bottom-bar {
  padding-top: 1rem;
  padding-bottom: 1rem;
  background-color: #93cbd7;
}

footer.bottom-bar a {
  color: #000000;
  font-weight: bold;
}

.copyright {
  margin-top: 1rem;
  font-weight: bold;
  color: #000000;
}

/*--------------------------------------------------------------
>>> PAGES
----------------------------------------------------------------*/

/* PAGE WITH FEATURED IMAGE */

.content-with-featured-image .featured-img {
  float: right;
  margin-left: 1rem;
  margin-bottom: 0.5rem;
  width: 45%;
}

@media (max-width: 1199px) {
  /* xl */
  .content-with-featured-image .featured-img {
    width: 50%;
  }
}

@media (max-width: 991px) {
  .content-with-featured-image .featured-img {
    width: 60%;
  }
}

@media (max-width: 767px) {
  /* sm and smaller */
  .content-with-featured-image .featured-img {
    float: none;
    width: 100%;
    margin-left: 0;
    margin-bottom: 1rem;
  }
}

.single-content > * {
  clear: none;
}

/* AUTHOR PAGE */

.author-info {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  column-gap: 2rem;
}

.author-title {
  min-height: 0;
}

.author-overview {
  grid-row-end: span 3;
  max-width: 15rem;

  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.author-desc {
  margin-bottom: 2rem;
}

@media (max-width: 767px) {
  /* reorder content on smaller screens and make img full width  */
  .author-info {
    display: block;
  }

  .author-overview {
    max-width: 100%;
  }

  .author-overview img {
    width: 100% !important;
  }
}

.author-name {
  margin: 0;
}
.author-position {
  flex-direction: column;
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.author-overview img {
  border-radius: 5px;
  margin-bottom: 1rem;
  width: 15rem;
  height: auto;
}
.author-contact,
.author-links {
  font-size: 1.1rem;
}

.author-publications > h2 {
  margin-bottom: 0;
}

.author-publications tr:not(.tp_publication) {
  /* hide year section on author page */
  display: none;
}

/* PUBLICATIONS PAGE */
.research-header {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 4rem;
  margin-bottom: 1rem;
}

.research-header img {
	width: 100%;
}

@media screen and (max-width: 991px) {
  .research-header {
    gap: 2rem;
    grid-template-columns: 2fr 5fr;
  }
}

@media screen and (max-width: 767px) {
  .research-header {
    display: block;
  }
}

/*--------------------------------------------------------------
>>> SHORTCODES
----------------------------------------------------------------*/

/* MEMBER OVERVIEW SHORTCODE [member_overview name="..."] */
.member-overview {
  display: flex;
  flex-direction: row;
  /* border: 1px solid #aaa; */
  /* border-radius: 0.5rem; */
  overflow: hidden;
}

.member-overview-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.member-overview-position {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.member-overview-info {
  padding-right: 1rem;
  padding-top: 0;
  padding-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.member-overview-img {
  /* background-color: #93cbd7; */
  /* align-items: center; */
  align-items: flex-start;
  display: flex !important;
}

.member-overview-img img {
  height: 100px;
  width: auto;
  border-radius: 0.5rem;
  margin-right: 1rem;
}

.member-overview-link-container {
  display: flex;
  flex: 1;
  flex-direction: row;
}

.member-overview-link {
  padding-right: 3rem;
  align-self: flex-end;
  font-size: 1rem;
}

.member-overview-link:last-child {
  padding-right: 0rem;
}

/* MEMBER PORTRAIT SHORTCODE */
.member-portrait {
  display: flex;
  align-self: center;
  flex-direction: column;
  /*width: 12rem;*/
}

.member-portrait img {
  margin-bottom: 1rem;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

@media screen and (max-width: 767px) {
  .member-portrait {
    align-self: center;
    width: 75%;
    margin: auto;
    margin-bottom: 1rem;
  }
}

/* GROUP OVERVIEW SHORTCODE */
.group-overview-container {
  padding: 1rem;
  display: flex;
}

.group-overview {
  padding: 0;
  border: 1px solid grey;
  border-radius: 5px;
}

.group-overview:hover {
  background-color: #4a4a4a;
}

.group-overview:hover .group-overview-name {
  color: #ffffff;
}

.group-overview img {
  max-width: 100%;
}

.group-overview-info {
  padding: 0.8rem;
  padding-top: 1rem;
}

.group-overview-info .group-overview-name {
  margin: 0;
  font-weight: 400;
}

.group-overview:hover .group-overview-name {
  text-decoration: underline;
}

.group-overview-img-container {
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}

.group-overview-img-container img {
  transform: scale(1.02);
  transition: transform 0.5s ease;
}

.group-overview:hover img {
  transform: scale(1.05);
}

/* LINK SHOWCASE uses same classes as group-overview */

.link-showcase-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.link-showcase-container .group-overview {
  margin-bottom: 1rem;
}

/* SEMINAR SHORTCODE */
.seminar {
  margin-bottom: 1.5rem;
}
.seminar p {
  margin-bottom: 0;
}

.seminar .time-place {
  display: flex;
}
.seminar .time-place p:not(:last-child) {
  margin-right: 0.5rem;
}
/*
.seminar .time-place p:first-child {
  min-width: 3rem;
}
.seminar .time-place p:nth-child(2) {
  min-width: 6rem;
}*/

/*--------------------------------------------------------------
>>> POSTS
----------------------------------------------------------------*/

article.entry {
  padding-bottom: 1rem;
  font-size: 1rem;
}

/* DEFAULT TEMPLATE */
article.default-article:not(:first-child) {
  border-top: 1px solid #aaa;
  padding-top: 1rem;
}

article.sticky {
  background-color: #eef7ff;
  padding: 0.4rem;
}
article.sticky:first-child {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}
article.sticky:last-child {
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  margin-bottom: 1rem;
}


article .post-date {
  font-weight: bold;
  font-size: 1.1rem;
  margin-right: 0.5rem;
}

/* VERTICAL SUMMARY TEMPLATE */
@media (min-width: 768px) {
  .post-card-container {
    display: flex;
    align-items: stretch;
  }
}

.post-card {
  padding-top: 0.5rem;
  border: 1px solid grey;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 1rem;
  width: 100%;
}

.post-card:hover {
  background-color: #effcff;
}

.post-card .post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.post-card .post-meta p {
  margin-bottom: 0;
}

.post-card .category-container {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: -0.5rem;
  justify-content: flex-end;
}

.post-card .category-tag {
  background-color: #dbeff3;
  padding: 0.2rem;
  border-radius: 0.2rem;
  margin-bottom: 0.5rem !important;
}
.post-card .category-tag:not(:first-child) {
  margin-left: 0.5rem;
}

.post-card .content {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.post-card .img-container {
  overflow: hidden;
  /* margin-bottom: 0.5rem; */
}

.post-card img {
  width: 100%;
  transition: transform 0.5s ease;
}

.post-card .image-link {
  overflow: hidden;
}

.post-card:hover img {
  transform: scale(1.03);
}

.post-card .post-content {
  margin-top: 0.5rem;
}

/*--------------------------------------------------------------
>>> TEACHPRESS PUBLICATIONS
----------------------------------------------------------------*/

.teachpress_publication_list {
  /* cancels with 1.5rem margin on year */
  margin-top: 0.5rem;
}

.teachpress_publication_list tr {
  margin-bottom: 1rem;
}

.teachpress_publication_list tr.tp_publication {
  margin-bottom: 0;
}

.teachpress_publication_list td {
  padding-left: 0 !important;
  border: 0;
}

.teachpress_publication_list tr.tp_publication {
  display: block;
}

/* links */
ul.tp_pub_list {
  padding: 0;
}

.tp_publication p,
.tp_publication a {
  font-size: 1rem !important;
}

.teachpress_publication_list .tp_h3 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.5rem;
  margin-top: 1.5rem;
}

.tp_publication .tp_links .tp_pub_list {
  margin-bottom: 0;
}

/* FILTERS */
.teachpress_pub_list .teachpress_filter {
  display: flex;
}
.teachpress_pub_list .teachpress_filter select:not(:last-child) {
  margin-right: 0.5rem;
}

.teachpress_pub_list .teachpress_filter select {
  display: block;
  font-family: sans-serif;
  color: #444;
  line-height: 1.3;
  padding: 0.6em 1.4em 0.5em 0.8em;
  max-width: 10rem;
  box-sizing: border-box;
  border: 1px solid #aaa;
  box-shadow: 0 1px 0 1px rgba(0, 0, 0, 0.04);
  border-radius: 0.5em;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"),
    linear-gradient(to bottom, #ffffff 0%, #e5e5e5 100%);
  background-repeat: no-repeat, repeat;
  background-position: right 0.7em top 50%, 0 0;
  background-size: 0.65em auto, 100%;
}
.teachpress_pub_list .teachpress_filter select::-ms-expand {
  display: none;
}
.teachpress_pub_list .teachpress_filter select:hover {
  border-color: #888;
}
.teachpress_pub_list .teachpress_filter select:focus {
  border-color: #aaa;
  box-shadow: 0 0 1px 3px rgba(59, 153, 252, 0.7);
  box-shadow: 0 0 0 3px -moz-mac-focusring;
  color: #222;
  outline: none;
}
.teachpress_pub_list .teachpress_filter select option {
  font-weight: normal;
}

/* hide SEARCH RESULTS in [tpsearch ...] since results are also shown in [tplist] */
.teachpress_pub_list:not(:last-of-type) table.teachpress_publication_list {
  display: none;
}
.teachpress_pub_list:not(:last-of-type) form p:last-child {
  display: none;
}
.teachpress_pub_list:not(:last-of-type) .teachpress_message_error {
  display: none;
}
.teachpress_pub_list:not(:last-of-type) .tablenav {
  display: none;
}


.teachpress_pub_list form p:last-child {
  /* Show all */
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  text-align: start !important;
  font-size: 1.3rem;
}

/*--------------------------------------------------------------
>>> WIDGETS
----------------------------------------------------------------*/

/* Language Widget */
.lang-item img {
  max-height: 1.2rem;
}

/*--------------------------------------------------------------
>>> MISC
----------------------------------------------------------------*/

/* SEARCH FORM */
.sidebar .searchform {
  margin-bottom: 1rem;
  max-width: 20rem;
}

.searchform {
  margin-bottom: 2rem;
}

.tp_search_input {
  margin-bottom: 0.3rem;
}

.searchform,
.tp_search_input {
  max-width: 31rem;

  border: 1px solid grey;
  border-radius: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: row;
}

.searchform input,
.tp_search_input #tp_search_input_field {
  flex: 1;
  border: 0;
}

.main-search .searchform input {
  font-size: 1.25rem;
}

.searchform .search-button-container,
.tp_search_input .tp_search_button {
  display: flex;
  align-items: center;
  background-color: #93cbd7;

  font-size: 1rem;
  margin-left: 0;
}

.searchform button,
input.tp_search_button {
  border: 0 !important;
  border-radius: 0 !important;
}
input.tp_search_button:hover {
  background-color: #93cbd7 !important;
}
