/*
 Theme Name:   Volvo Dealer theme - Alf Pettersson child theme
 Description:  Child theme for Alf Pettersson Volvo Dealer 
 Author:       WebbTrim
 Author URI:   https://webbtrim.se
 Template:     alfpettersson
 Version:      2.0.1
 Text Domain:  wtchildtheme
*/

:root {
	--bg: #f4f2ec;
	--black: #333;
	--green: #bfc00e	
}

#kntft .widget.widget_block {
	padding: 0;
    margin: 0;
    background: var(--bg);
}

main#primary.apab-volvo-front-page div.entry-content {
	margin-top: 0;
	padding-top: 20px;
}
body.page #page .entry-content.ap-content-locked,
.page-template-template-empty .entry-content {
	margin-top: 0;
	padding-top: 20px;
}

/****************************************************
GUTENBERG
****************************************************/

/* Removes padding left for lates posts block */

.wp-block-latest-posts__list {
	margin-left:0 !important;
}

/****************************************************
HEADER
****************************************************/
#kontakttopmenu {
	padding: 0;
	display: flex;
    justify-content: stretch;
}
#kontakttopmenu > a {
	padding: 0 16px;
	width: 100%;
}

#toprightbtns {
    z-index: 2;
}

/* Huvudmeny för NO & SE */
.huvudmeny {
    padding-top: 20px;
    font-family: 'Muli', sans-serif;
    letter-spacing: 1px;
    font-size: 95%;
    font-weight: bold;
	text-transform: uppercase;
}

@media only screen and (max-width: 1100px) {
	.huvudmeny {
		padding-top: 0 !important;
		letter-spacing: 0;
		font-size: 85%;
	}
}

.sub-menu {
	padding: 10px 20px 0 !important; 
	align-items: center;
	gap: 20px;
}

.huvudmeny li:hover .sub-menu {
	left: 0;
    right: 0;
    box-shadow: none;
    background: #f9f8f4;
    z-index:999999;
}

@media only screen and (max-width: 600px) {

	.huvudmeny .sub-menu {
		all: initial;
		font-family: inherit;
		overflow: hidden;
	}

	.huvudmeny li {
		line-height: normal !important;
		overflow: hidden;
	}

	.huvudmeny > .menu > li > a {
		line-height: 41px !important;
		margin-bottom: 4px;
	}
	.huvudmeny .sub-menu li {
		margin: 0 auto;
		width: 30%;
		float: left;
		margin: 0 auto;
		width: 100%;
		float: left;
		padding: 0 1%;
		clear: initial;
		font-family: inherit;
		font-size: 100% !important;
		font-weight: normal;
		padding-bottom: 5px;
		padding-left: 20px; 
	}

	.huvudmeny .sub-menu li a {
		line-height: 100%;
	}

	.huvudmenyn .sub-menu img { display:none}
}

.huvudmeny .sub-menu li {
	width: auto !important;
    text-align: center;
    padding-bottom: 9px;
}

.huvudmeny .sub-menu li a {
	white-space: nowrap;
}

/****************************************************
SINGLE POST
****************************************************/

@media screen and (max-width: 560px) {
	.nav-links {
		display: block !important;
		text-align: left;
	}	

	.nav-links > div {
		padding-bottom: 0.5rem;
	}	

	.nav-links * {
		text-align: left !important;
		font-size: 1rem;
	}	
}

/****************************************************
MARKETS
****************************************************/

.market-list {
	display: flex;
	justify-content: space-evenly;
	flex-direction: column;
	gap: 2rem;
}

@media only screen and (min-width: 767px) {
	.market-list {
		flex-direction: row;
		flex-wrap: wrap;
	}
}

.market-list a {
	text-decoration: none !important;
}

.market-list h2 {
	display: flex;
	align-items: center;
	gap: 0.2em;
	text-decoration: none !important;
	color: var(--black);
}

.selected-market h2::after{
	content:"\f12a";
	display: block;
	position: relative;
    -webkit-font-smoothing: antialiased;
    font: normal 16px / 1 'dashicons';
	top: 2px;
	color: var(--green);
	font-size: 1.5rem;
}

.market-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.market-icon-wrapper { 
	width: 100%;
	max-width:250px;
}

.market-icon {
	position: relative;
	min-width: 150px;
	width: 100%;
	padding-bottom: 100%;
	overflow: hidden;
	border-radius: 100%;
	transition: all 0.5s ease-in-out;
}

.market-icon img {
	object-fit: cover;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	top: 0;
	min-width: 100%;
	min-height: 100%;
	height: auto;
	width: auto;
}

.market-item p {
	display: flex;
	align-items: center;
	gap: 0.05em;
	transition: all 0.5s ease-in-out;
	margin-top: 23px;
}
.market-item p::after {
	content: "\f347";
    display: block;
	position: relative;
    -webkit-font-smoothing: antialiased;
    font: normal 16px / 1 'dashicons';
	transform: rotate(-90deg);
	top: 1px;
}


.market-item:hover p {
	gap: 0.3em;
	transition: all 0.5s ease-in-out;
}

.market-item:hover .market-icon {
	transform: scale(1.05);
	transition: all 0.5s ease-in-out;
}
	
/****************************************************
SEARCH
****************************************************/
.nav-links {font-size:120%;}
#sokkk input {
	text-align: left;
    display:inline;
}
@media screen and (min-width: 1192px) {
	ul.products.columns-4 li.product {
		width: 23.35%;
		margin-right: 0.6em !important;
		margin-left: 0.6em !important;
	}
}
	@media screen and (min-width: 1192px) {
	ul.products li.product.first {
		clear: none !important;
	}
}
@media screen and (max-width: 1192px) {
	ul.products.columns-4 li.product {
		width: 31.35%;
		
	}
}
	@media screen and (max-width: 1192px) {
	ul.products li.product.first {
		clear: both !important;
	}
}

@media screen and (max-width: 767px) {
	ul.products.columns-4 li.product {
		width: 31.35%;
		
	}
}
@media screen and (max-width: 767px) {
	ul.products li.product.first {
		clear: both !important;
	}
	ul.products.columns-4 li.product {
		width: 100%;
		
	}
}

@media screen and (max-width: 500px) {
	.fillt {
		display: block;
    	clear: both;
    	width:100%;
	}
	
}

input[type='radio']:checked:after {
	width: 16px;
	height: 16px;
	border-radius: 15px;
	top: -3px;
	left: -1px;
	position: relative;
	background-color: white;
	content: '';
	display: inline-block;
	visibility: visible;
	border: 6px solid #023b5b;
}


.no-results.not-found {text-align:center}
.search-field {
	padding: 7px 10px 10px 14px !important;
	width: 60%;
}
.search-submit {
	background: #356990 !important;
	width: 10% !important;
	margin-left: 10px !important;
	cursor: pointer !important;
	padding: 15px !important;
	border: none !important;
	margin: 0 !important;
	color: #fff !important;
	margin-top:-12px;
}
.search-submit:hover {
	background: #041725 !important;
}

@media only screen and (max-width:600px) {
		.search-submit {
		width: 20% !important;
	}
}

/*****************************************************
*****       AP-locked content / WT-USER		  ********
*****************************************************/
.ap-locked-content {
	background-color: #f9f8f4;
    padding: 2rem;
}

body.search-results #primary .ap-locked-content > p{
	padding-left: 0 !important;
	margin-bottom: 1.5rem !important;
}

.wt-toggle-buttons-wrapper {
	border-bottom: 1px solid #003b5c;
    display: flex;
    column-gap: 10px;
}
.wt-toggle-button {
	cursor: pointer;
    padding: 4px 0;
	margin-bottom: 4px;
}
.wt-toggle-button:hover,
.wt-toggle-button.wt-active {
    border-bottom: 4px solid #003b5c;
	margin-bottom: 0;
}

#wt-forms-wrapper {
	display: flex;
    justify-content: space-between;
}

.wt-locked-content-img {
	display: flex;
    align-items: center;
    justify-content: center;
}
@media only screen and (max-width:768px) {
	.wt-locked-content-img{
		display: none;
	}
}

#wtin-login-wrapper.wt-hidden,
#wtin-forgot-password-wrapper.wt-hidden,
#wtin-register-wrapper.wt-hidden {
	display: none;
}


#wtin-login-wrapper,
#wtin-forgot-password-wrapper,
#wtin-register-wrapper {
	display: flex;
	flex-direction: column;
}

#wtin-login-wrapper > div:not(:last-child),
#wtin-register-wrapper > div:not(:last-child){
	border-bottom: 2px solid #003b5c;
}

#wtin-login-wrapper.wt-resetpassword h2 {
	padding-top:0px !important;
}

.wt-profile-ui-wrapper .button {
	background: #003B5C;
    padding: 10px 30px;
    color: #fff;
    text-decoration: none;
	font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
	cursor: pointer;
} 
.wt-profile-ui-wrapper .button.button-primary {
	background: #BFBF10;
}

.wt-profile-ui-wrapper .wt-my-account-email{
	font-weight: bold;
	margin-left: 6px;
}

.wt-profile-ui-wrapper form li,
.wt-profile-ui-wrapper form p {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	margin-bottom: 1.5rem ;
	margin-top: 0;
	padding: 0 !important;
}
body.search-results #primary .wt-profile-ui-wrapper form p.login-username,
body.search-results #primary .wt-profile-ui-wrapper p.login-password,
body.search-results #primary .wt-profile-ui-wrapper p.login-remember,
body.search-results #primary .wt-profile-ui-wrapper p.login-submit {
	margin-bottom: 1.5rem !important;
	margin-top: 0 !important;
}

.wt-profile-ui-wrapper form li > input,
.wt-profile-ui-wrapper form p > input { 
	width: 280px;
}

#wt-forgot-password-form ul,
#wt-registration-form ul {
	margin: 0;
    padding: 0;
	display: flex;
    flex-direction: column;
}


#wt-forgot-password-link,
.wt-resetpassword-login-link a {
	font-size: 14px;
    color: inherit !important;
}

.wt-forgot-password-response-error:before,
.wt-error:before{
	content: "\f12a";
	font-family: "Font Awesome 5 Free";
	font-weight: bold;
	margin-right: .5rem;
	color: white;
    background: #cf2e2e;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100%;
    font-size: 12px;
}
.wt-forgot-password-response-error,
.wt-error {
	margin-top: 0;
	display: flex;
}
.wt-error:not(:last-of-type) {
	margin-bottom: .5rem;
}
.wt-forgot-password-response-error{
	margin-bottom: 1rem;
}

.wt-resetpassword-hint {
	padding-bottom: 1.5rem;
}
.wt-resetpassword-hint::before {
	content: "\f05a";
	font-family: "Font Awesome 5 Free";
	font-weight: bold;
	margin-right: .5rem;
	color: #BFBF10;
}

#wt-login-link.ap-rp-success {
	text-align: center !important;
}

/********************************************
HEADER UPDATE
********************************************/

#menwi {
	float:left;
 	width: calc(100% - 248px);
}

#mainmen nav{
	float:left;
	width: auto;
}

.main-navigation ul {
    position: relative !important;
    font-family: 'Muli', sans-serif;
    letter-spacing: 1px;
    font-size: 95%;
    font-weight: bold;
}

.main-navigation ul .sub-menu {
    display: none;
}
.main-navigation ul li {
	display: flex;
	align-items: center;
    flex-direction: column;
}

@media screen and (min-width: 601px) {
    .main-navigation ul { 
        display: flex;
        flex-direction: column;
        gap: 1em;
        justify-content: space-between;
        flex-direction: row;
    }
}

#toprightbtns {
	float: right;
    position: absolute;
    right: 15px;
    width:100%;
	padding-right: 3px;
    z-index: -1;
    display: flex;
    align-items: center;
	justify-content: flex-end;
}

@media screen and (min-width:600px) and (max-width:1100px) {
	#menwi {
		display: flex;
		align-items: center;
	}

	#site-navigation {
		flex: 1;
		padding-left: 2rem;
	}
}

@media only screen and (max-width:1100px) {	

	/* fullwidth knappar*/
	#toprightbtns {
		/*float: none;*/
		position: relative;
		right: 0;
		padding-right: 0;
		width: 100%;
	}
	#kontakttopmenu {
    	width: 50%;
    	line-height: 40px;
	}
	#srchtopbtn {
		width: 50%;
	}
	.search-wrapper .btn {
		width:62px;
	}
	.search-wrapper {
		margin-right:0px;
	}
	.search-wrapper .btn.pull-right {
		width: 100%;
		line-height: 40px;
	}
	.search-wrapper .inputten {
		width:70%;
	}
	.search-wrapper #searchsubmit {
		width: 20%;
	}
	.search-wrapper .main-search .form-search .search-control input {
		padding: 7px 5px 9px 15px;
	}
	#menwi {
		width: 100%;
	}
	.huvudmenyn {
		letter-spacing: 0px;
		font-size: 85%;
		padding-top: 0;
	}
	.search-wrapper .main-search.active .form-search {
		top: 40px;
	}
}



/********************************************
WEGLOT Language switcher
********************************************/
/* GEMENSAMT */
.langswitcher-header,
.langswitcher-footer {
	display: flex;
}

.langswitcher-header .country-selector,
.langswitcher-footer .country-selector {
	background-color: transparent !important;
	margin-bottom: 0 !important;
}

.langswitcher-header .country-selector ul,
.langswitcher-footer .country-selector ul {
	position: relative;
	display: block !important;
	background: no-repeat;
	box-shadow: none;
	border: 0;
}

.langswitcher-header .country-selector ul a,
.langswitcher-footer .country-selector ul a {
	padding: 0;
	height: 24px;
}

.langswitcher-header .country-selector a,
.langswitcher-header .country-selector span,
.langswitcher-footer .country-selector a,
.langswitcher-footer .country-selector span {
	height: 24px;
}

.langswitcher-header .country-selector ul a:before,
.langswitcher-footer .country-selector ul a:before {
	margin: 0;
	vertical-align: top;
}

.langswitcher-header .country-selector .wgcurrent,
.langswitcher-header .country-selectordropdown .wglanguage-name,
.langswitcher-footer .country-selector .wgcurrent,
.langswitcher-footer .country-selector .wglanguage-name {
	display: none !important;
}

/* SPECIFIKT FÖR HEADER */
@media screen and (max-width: 1100px) {
	.langswitcher-header {
		display: none !important;
	}
}

.langswitcher-header {
	margin-right: 28px;
}

/* SPECIFIKT FÖR FOOTER */
.langswitcher-footer {
	position: fixed;
	z-index: 800;
	right: calc(70px + 28px);
	bottom: calc(60px / 2) !important;
	transform: translateY(50%);
	margin-bottom: 14px;
}

.langswitcher-footer .country-selector ul a {
	height: 26px;
	border: 1px solid white;
	box-shadow: 0 0 0.3rem rgba(0, 0, 0, 0.5);
	border-radius: 100%;
	display: block;
}
