/*
Selkosanomat yleisiä määrityksiä
  1. Etusivun iso logo
  2. Hakukenttä
  3. Lätta bladet -painike
  4. Yleinen painike ja Lataa lisää uutisia -painike
  5. Sivun ala- ja yläreunaan -painikkeet
  6. Leivänmurut
  7. Muita yleisiä määrityksiä
*/

/* 1. Iso Selkosanomat logo */
.header-etusivu {
  max-width: 640px;
  width: 100%;
  height: auto;
  padding: 1.5em 3em;
  margin: 3em auto 0 !important;
}

/* 2. Hakukenttä */
.custom-search-form {
  display: flex;
  flex-direction: row;
  margin: 0 auto;
  padding: 0 1em;
  width: 100%;
  max-width: 900px;
}

.custom-search-form span {
  margin: auto;
  margin-right: 0;
  width: fit-content;
  white-space: nowrap;
}

.custom-search-form .search-field {
  color: #000;
  background-color: #fff;
  border-color: #000;
  border-radius: 30px;
  width: calc(100% - 280px);
  margin: 0 10px;
}

.custom-search-form .search-field:focus {
  color: #000;
  border: 2px solid #000;
}

.custom-search-form .search-submit {
  font-size: 20px;
  line-height: 1;
  border: 1px solid;
  padding: 0.75em 0.5em 0.75em 0.75em;
  color: black;
  background: #e5e5e5;
  border-radius: 30px;
  transition: background 0.2s;
  display: inline-block;
  width: 120px;
}

.custom-search-form .search-submit:hover,
.custom-search-form .search-submit:focus,
.custom-search-form .search-submit:active {
  text-decoration: underline;
  background: #ffbc10;
}

/* sl = suurennuslasi */
svg.sl {
  position: relative;
  top: 0.125em;
  flex-shrink: 0;
  height: 1em;
  width: 1em;
  fill: currentColor;
  transition: fill 0.2s;
  width: 30px;
}

@media only screen and (max-width: 768px) {
  .custom-search-form {
    flex-direction: column;
  }
  .custom-search-form span {
    margin: 0 auto;
    text-align: center;
  }
  .custom-search-form .search-field {
    margin: 0.75em auto;
    width: 95%;
  }
  .custom-search-form .search-submit {
    margin: 0 auto;
  }
}

/* Hakutuloksien otsikko, koskee myös kategorioiden otsikkoa */
.page-header {
  padding: 30px !important; /* vaatii toimiakseen !important */
  text-align: center;
}

/* 3. Lätta bladet -painike */
.buttonbladet {
  height: 3.125em;
  border: 1px solid;
  padding: 0;
  color: black;
  background: #e5e5e5;
  border-radius: 30px;
  transition: background 0.2s;
  display: flex;
  justify-content: center;
  width: 15em;
  text-align: center;
}

img.lattabladet-logo {
  display: flex;
  width: 150px;
  height: auto;
  margin: 12px;
}

.buttonbladet:hover,
.buttonbladet:focus,
.buttonbladet:active {
  background: #ffbc10;
  color: #000;
}

svg.nuoli-lattabladet {
  display: flex;
  height: 1.25em;
  width: 1.25em;
  margin: 15px 5px;
}

.lattabladet-button {
  position: absolute;
  right: 1%;
  top: 0;
  margin-top: 1em;
}

/* 4. Yleinen painike ja Lataa lisää uutisia -painike */
.button {
  background-color: #e5e5e5;
  color: #000;
  font-size: 16px;
  font-weight: 600;
  border-radius: 30px;
  border: 1px solid #000;
  text-align: center;
  padding: 0;
}

.masonry-load-more,
.button {
  width: 100%;
}

.masonry-load-more > a.button {
  border: 2px solid #000;
}

div.masonry-load-more a.button::after {
  content: '';
  margin-left: 5px;
  margin-bottom: -3px;
  height: 20px;
  width: 20px;
  background-image: url('../images/nuoli.png');
  background-repeat: no-repeat;
  background-position: right;
  background-size: 16px 16px;
  display: inline-block;
  -webkit-transform: rotate(90deg);
  -ms-transform: rotate(90deg);
  transform: rotate(90deg);
}

.masonry-load-more .button:active,
.masonry-load-more .button:hover,
.masonry-load-more .button:focus-within {
  background: #ffbc10;
  text-decoration: underline;
}

/* 5. Sivun ylä- ja alareunaan -painikkeet */
#buttondown {
  box-sizing: border-box;
  position: fixed;
  display: flex;
  right: 2%;
  top: calc(100vh - 4.7em);
  border: 1px solid black;
  background-color: #e5e5e5;
  color: black;
  cursor: pointer;
  border-radius: 1.9em;
  width: 12.8em;
  height: 3em;
  padding: 0;
  z-index: 1000;
  justify-content: center;
}

#buttondown p,
#buttonup p {
  margin: 11px 15px;
}

#buttondown:hover,
#buttondown:focus {
  background-color: #ffbc10;
  text-decoration: underline;
  text-decoration-color: black;
}

svg.nuoli {
  height: 1.2em;
  width: 1.2em;
  margin: 15px 0;
}

svg.oikealle {
  transform: rotate(270deg);
}

svg.vasemmalle {
  transform: rotate(90deg);
}

#buttonup {
  box-sizing: border-box;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear 300ms, opacity 300ms, background-color 150ms;
  position: fixed;
  display: flex;
  right: 2%;
  top: calc(100vh - 8.2em);
  border: 1px solid black;
  background-color: #e5e5e5;
  color: black;
  cursor: pointer;
  border-radius: 1.9em;
  width: 12.8em;
  height: 3em;
  padding: 0;
  z-index: 1000;
  justify-content: center;
}
#buttonup:hover,
#buttonup:focus {
  background-color: #ffbc10;
  text-decoration: underline;
}

svg.backtotop {
  margin-left: 0.3em;
  margin-top: 0.2em;
  height: 1em;
  width: 1em;
}

/* 6. Muropolku */
/* Murupolun sijainti. Vaikuttaa myös LättaBladetin asetteluun. Loput murupolun tyyleistä löytyy Breadcrum hookista */
.header-aligned-center:not([class*='nav-float-']) .inside-header {
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start !important; /* vaatii toimiakseen !important */
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row !important; /* vaatii toimiakseen !important */
  flex-direction: row !important; /* vaatii toimiakseen !important */
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  align-content: center;
  padding: 0 !important; /* vaatii toimiakseen !important */
  height: 100%;
}

/* Nappien taustavärin vaihtumisen nopeus */
.button,
button.search-submit,
#submit,
button.buttonbladet,
#buttondown,
.wp-polls .Buttons,
.secondary-navigation .main-nav ul li:hover > a {
  -webkit-transition: background-color 150ms ease;
  -o-transition: background-color 150ms ease;
  transition: background-color 150ms ease;
}

.breadcrumbs {
  display: flex;
  font-size: 80%;
  padding-left: 3%;
  font-family: inherit;
  margin-top: 2em !important;
}

.breadcrumbs a {
  margin-left: 10px;
  display: inline;
  padding: 5px;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus {
  color: #000;
  text-decoration: underline;
}

svg.murunuoli {
  position: relative;
  top: -0.2em;
  flex-shrink: 0;
  height: 2em;
  width: 2em;
  fill: currentColor;
}

svg.takaisinnuoli {
  display: inline-block;
  vertical-align: middle;
  top: 1em;
  left: 1em;
  position: relative;
  flex-shrink: 0;
  fill: currentColor;
}

.back {
  font-size: 0.9em;
  height: 50px;
  border: 1px solid black;
  color: black;
  background: #e5e5e5;
  border-radius: 30px;
  transition: background 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 145px;
  padding: 0;
  padding-left: 15px;
  margin-top: 1em !important;
}

.back p {
  margin: auto;
}

.back:hover,
.search-submit:focus,
.search-submit:active {
  text-decoration: underline;
  background: #ffbc10;
  color: black;
}

/* 7. Yleisiä määrityksiä */

/* Otsikot */
h2,
h3,
h4,
h5,
h6 {
  margin-top: 2em;
}

h4 {
  margin-bottom: 0.5em;
}

h5,
h6 {
  margin-bottom: 0.1em;
}

.post-category {
  float: right;
  font-size: 16px;
  font-weight: 700;
  padding: 10px;
  margin-bottom: 1.25em;
  width: 114px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.date:not(.archive) {
  font-size: 16px;
  padding-top: 10px;
  padding-left: 20px;
}

.visually-hidden {
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

#masthead {
  height: auto;
  min-height: 100px;
}

.content-area #main.site-main {
  margin-top: 50px;
}

#main.site-main > article {
  margin-bottom: 50px;
}

.copyright-bar {
  margin: 2em auto !important;
}

@media only screen and (max-width: 1023px) {
  .masonry-load-more {
    padding: 0 20px;
  }
}

@media only screen and (max-width: 992px) {

  #masthead {
    min-height: auto;
  }

  .header-etusivu {
    margin-top: 1em !important;
  }

  .hideonmobile, .back, .breadcrumbs, .lattabladet-button {
    display: none !important; /* vaatii toimiakseen !important */
  }

  .custom-search-form {
    margin-top: 50px;
  }
}
