/*
Theme Name: Sitefactory
Theme URI: http://www.sitefactory.fi/
Author: Sitefactory Oy
Author URI: http://www.sitefactory.fi/
Description: Sitefactory default theme
Version: 1.0
Tags: responsive
Text Domain: sitefactory
*/

.field-wrap {
    flex-wrap: wrap;
}

.nf-form-content .label-right .nf-field-description {
	margin-right: 0;
}

.nf-form-content .label-right .nf-field-description > div {
	margin-top: 1em;
}

.nf-form-content .label-right .nf-field-description div > br {
	display: none;
}

#page-template-inner-content > h1:not(:first-child),
#page-template-inner-content > h2:not(:first-child),
#page-template-inner-content > h3:not(:first-child),
#page-template-inner-content > h4:not(:first-child),
#page-template-inner-content > h5:not(:first-child),
#page-template-inner-content > h6:not(:first-child) {
	margin-top: 2em;
}

#jasensivut_password_form fieldset, #jasensivut_userinfo_form fieldset {
	border: none;
	margin-left: 0;
    padding-left: 0;
}

#jasensivut_password_form label, #loginform label, #jasensivut_userinfo_form label {
	display: block;
	font-size: 15px;
    line-height: 22px;
    color: #555555;
    font-weight: 600;
    margin-bottom: 1em;
    text-align: left;
}

.jasensivut-account-heading {
	margin: 0;
    font-size: 18px;
    line-height: 18px;
    font-weight: bold;
    color: #555;
    margin-bottom: .5em;
}

.jasensivut-asterisk {
	font-size: 3em;
	vertical-align: middle;
	vertical-align: -webkit-baseline-middle;
}

#jasensivut_password_submit, .login-submit input, #jasensivut_userinfo_submit{
	background: #3ba1da;
	font-size: 15px;
    border: none !important;
    display: block;
    width: 100%;
    line-height: 1em !important;
    padding: 16px 20px !important;
    text-decoration: none !important;
    text-align: center;
    text-transform: none !important;
    font-weight: normal !important;
    overflow: hidden;
    position: relative;
    transition: 0.25s;
    box-sizing: border-box;
    -moz-border-radius: 4px !important;
    -webkit-border-radius: 4px !important;
    border-radius: 4px !important;
    -webkit-box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
    box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
    opacity: 1;
    vertical-align: middle !important;
    height: auto !important;
    font-size: 15px;
    cursor: pointer !important;
    width: auto;
    box-shadow: none;
    text-shadow: none;
    font-family: inherit;
    outline: none !important;
    margin: 0;
    opacity: 1;
    -webkit-appearance: none;
}

.jasensivut_message.success {
	margin-bottom: 1em;
}

#loginform {
    text-align: center;
    max-width: 400px;
	margin: 0 auto;
}

#loginform input {
	width: 100%;
}

#loginform + a {
	display: inline-block;
	line-height: 22px;
	color: #888 !important;
	display: block !important;
	text-decoration: none !important;
	font-weight: normal;
	text-align: center;
	border-bottom: none !important;
}

#lostpasswordform {
    text-align: center;
}

#lostpasswordform fieldset, #password-lost-form-wrap fieldset {
    border: none;
}

#lostpasswordform fieldset label {
    display: none;
}

#lostpasswordform #somfrp_user_info {
    display: inline-block;
    margin-top: 1em;
}

#lostpasswordform  button[type="submit"], .lostpassword-submit #reset-pass-submit {
    background-color: #3ba1da;
    vertical-align: middle !important;
    height: auto !important;
    font-size: 15px;
    cursor: pointer !important;
    width: 100%;
    box-shadow: none;
    text-shadow: none;
    font-family: inherit;
    outline: none !important;
    margin: 0;
    opacity: 1;
    -webkit-appearance: none;
    font-size: 15px;
    border: none !important;
    display: block;
    width: 100%;
    line-height: 1em !important;
    padding: 16px 20px !important;
    text-decoration: none !important;
    text-align: center;
    text-transform: none !important;
    font-weight: normal !important;
    overflow: hidden;
    position: relative;
    transition: 0.25s;
    box-sizing: border-box;
    -moz-border-radius: 4px !important;
    -webkit-border-radius: 4px !important;
    border-radius: 4px !important;
    -webkit-box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
    box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
    opacity: 1;
}

.som-password-error-message {
    background: #C74A4A;
    border: none;
    text-align: center;
}

.som-password-sent-message {
    text-align: center;
}

.somfrp-lost-pass-form-text, #password-lost-form-wrap form p {
    color: #777;
    font-size: 17px;
}

.som-password-sent-message + #lostpasswordform {
    display: none;
}

.blog-list ul li .wprss-feed-meta > span {
	display: block;
}


#sidebar .menu-jasensivut-container ul.sub-menu li.sub-menu-item ul.sub-sub-menu {
    padding-top: 0;
}

ul#menu-paavalikko li#nav-menu-item-40086 ul.sub-menu,
ul#menu-paavalikko li#nav-menu-item-40095 ul.sub-menu { left: auto; right:-4px; }
ul#menu-paavalikko li#nav-menu-item-40098 ul.sub-menu { left: auto; right:-4px; }

article.category-ajankohtaista section.entry-content div.wp-caption img.wp-post-image,
article.category-ajankohtaista section.entry-content div.wp-caption img.wp-post-image ~ p.wp-caption-text,
body.single-paper_post article.paper_post section.entry-content div.wp-caption img.wp-post-image,
body.single-paper_post section.entry-content div.wp-caption img.wp-post-image ~ p.wp-caption-text {display:none;}

button.icon-back {margin-top:1em;}
button.customBtn {
}

ul.columns-4 {}

/* Add multi-line by line breaks to Gutenberg galleries. */
.blocks-gallery-item figcaption {
    white-space: pre-line;
    color: #555 !important;
}

/* Prevent the last image from growing to fill available space if there aren't three images in a row. */
.blocks-gallery-item {
    flex-grow: 0 !important;
    display: inline-block !important;
}

.wp-block-gallery .blocks-gallery-image figure, .wp-block-gallery .blocks-gallery-item figure {
    display: inline-block;
    height: auto;
    padding: 5px 0;
}

.wp-block-gallery.is-cropped .blocks-gallery-image a, .wp-block-gallery.is-cropped .blocks-gallery-image img, .wp-block-gallery.is-cropped .blocks-gallery-item a, .wp-block-gallery.is-cropped .blocks-gallery-item img {
    height: 260px;
}   

/*.wp-block-gallery.is-cropped .blocks-gallery-item img {height:auto;} *//*Ticket #1984 */

.wp-block-gallery .blocks-gallery-image figcaption, .wp-block-gallery .blocks-gallery-item figcaption {
    position: relative;
    background: none;
    margin: 10px 0 15px 0;
    padding: 0;
    line-height:1.6em;
}

#colorbox.advgb_lightbox #cboxTitle {
    color:#333!important;
    padding: 8px 10px 10px 10px;
    height:43px;
    width:95%!important;
}

ul.wp-block-gallery.columns-5.is-cropped li.blocks-gallery-item img {height:145px;}
ul.wp-block-gallery.columns-4.is-cropped li.blocks-gallery-item img {height:188px;}
ul.wp-block-gallery.columns-2.is-cropped li.blocks-gallery-item img {height:400px;}


/* --------------------------
 *
 * Post category navigation
 *
** ----------------------- */


nav.nav--post-category {
    padding-bottom:2rem;
    display: flex;
    flex-direction: column;
}
a:focus {
    outline: solid 2px #00668c;		
}
.dark-bg a:focus {
    outline: solid 2px #fff;		
}

.nav--post-category a { 
    padding:0.75rem 1.5rem;
    margin-right:0.5rem;
    max-width:100%;
    text-align: center;
}

nav.nav--post-category a:hover {
    opacity: .8;
    background-color: white;
}

nav.nav--post-category a.selected {
    color: gray;
    background-color: lightgray;
}

.page-template-article_list .entry-summary p {
    color: #151515;
    font-weight: 400;
    font-size: 0.9375rem;
    line-height: 1.5em;
}


.page-template-article_list .list-article .entry-title > h3 {
    font-size: inherit !important;
    padding-top: 0.3em;
} 

.page-template-article_list .category-tag {
    color: gray;
    max-width: fit-content;
    padding: 0.25rem .1rem;
    font-size: 1rem;
    display: inline-block;
}

.page-template-article_list .article-date {
    display: inline-block;
    margin-right: 1rem;
    font-size: inherit !important;
}

.nav--post-category__container {
    display: flex;
    flex-direction:column;
    font-size:0.9rem;
}

/* TODO: Hide category title */ 
.archive #page-template-inner-content h1,
.page-template-article_list #page-template-inner-content h1 {
    display: none;
}

@media screen and (min-width:768px) {
    .page-template-article_list .entry-summary p {
        font-size: 1.125rem;
    }
    .page-template-article_list .alignleft {
        margin: 0 1rem 1rem 0;
    }
    nav.nav--post-category {
        flex-direction:row;
        max-width: fit-content;
    }
    nav.nav--post-category a {
        max-width: 10rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .nav--post-category__container {
      display: flex;
        flex-direction:row;
        align-items: center;
    }
    .nav--post-category__container h5 {
      max-width: fit-content;
        padding-bottom: 1.6rem;
        margin-right: 0.5rem;
        font-size:0.9rem !important;
    }
}

.page-template-article_list .nav--post-category a:first-of-type {
    background-color: lightgray;
    color: gray;
}

.nav--post-category__container h5 {
    font-size:0.6rem;
}
