/*
 Theme Name:   Chatwriters theme
 Theme URI:    https://generatepress.com
 Description:  GeneratePress child theme
 Author:       EnterTalkPro Ltd
 Author URI:   https://entertalkpro.com
 Template:     generatepress
 Version:      1.0
*/

/* Main navigation height */
.main-navigation .main-nav ul li a {
	line-height: 3em;
}

/* Images and videos in Posts have margin under them */
article.type-post figure.wp-block-image, article.type-post figure.wp-block-embed-youtube {
	margin-bottom: 1.5em;
	margin-left: -50px;
	margin-right: -50px;
	@media (max-width: 768px) {
		margin-left: 0;
		margin-right: 0;
	}
}

/* Images and videos caption style */
figure.wp-block-embed figcaption.wp-element-caption, figure.wp-block-image figcaption.wp-element-caption {
	font-size: 80%;
	color: var(--contrast-2);
	text-align: center;
	@media (max-width: 768px) {
		line-height: 1.5em;
	}
}

/* Images and videos have border-radius */
figure.wp-block-image img, figure.wp-block-embed-youtube div.wp-block-embed__wrapper, figure.wp-block-video {
	border-radius: 4px;
	overflow: hidden;
	z-index: 1;
}

/* Start of YARPP Related Posts styling */
.yarpp-related {
	margin-left: auto !important;
	margin-right: auto !important;
}

.yarpp-thumbnails-horizontal {
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	row-gap: 20px;
}

.yarpp-thumbnails-horizontal .yarpp-thumbnail {
	border: none !important;
	width: 100% !important;
	display: flex !important;
	column-gap: 10px;
	align-items: center;
	overflow: hidden;
	color: var(--contrast);	
	flex-direction: row;	
	@media (max-width: 768px) {
		flex-direction: column;
	}
	&:hover {
		color: var(--contrast-2);
		transition: color .1s ease-in-out, background-color .1s ease-in-out;
	}
}

.yarpp-thumbnail img {
	object-fit: cover;
	margin: 0 !important;
	width: 50% !important;
	@media (max-width: 768px) {
		width: 100% !important;
	}
	@media (min-width: 769px) {
		height: auto !important;
	}
}

.yarpp-thumbnail .yarpp-thumbnail-title {
	padding: 5px 0px;
	display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
	width: 50% !important;
	@media (max-width: 768px) {
		width: 100% !important;
		overflow: visible !important;
	}
}

.yarpp-related-none p {
	text-align: center;
}

.yarpp-related h3 {
	display: none;
}
/* End of YARPP Related posts styling */


/* Start of Fluent Forms styling */
/* FF default submit button on-brand */
.ff-btn-submit:not(.ff_btn_no_style) {
	background-color: var(--accent) !important;
	color: var(--base-3);
	text-transform: uppercase !important;
	border-radius: 4px !important;
	width: 100%;
	margin-top: 1em;
	@media (max-width: 768px) { 
		/* mobile styling for button */
	}
}

/* FF fields, checkboxes with text */
.fluentform .ff-el-group {
	margin-bottom: 10px !important;
}

.fluentform .ff-el-group.ff-el-input--content .ff-el-form-check {
	margin-bottom: -10px !important;
	@media (max-width: 768px) { 
		/* mobile styling */
		margin-bottom: -5px !important;
	}
}

.fluentform .ff-el-form-check {
	font-size: 14px;
	line-height: 1.7em;
}

.fluentform .ff-el-form-check-label .ff-el-form-check-input {
  height: 20px;
  width: 20px;
  margin-right: 8px;
	margin-top: 2px;
}

/* Checkbox styling */
input[type="checkbox"] {
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	background-color: var(--base-2);
	border: 1px solid var(--fluentform-border-color);
	border-radius: 4px;
}

/* Change the background color when checkbox is checked */
input[type="checkbox"]:checked {
	background-color: var(--accent) !important;
	border: 1px solid var(--accent) !important;
}

/* Add a check mark when checked */
input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	width: 8px;
	height: 14px;
	border-width: 0 3px 3px 0;
	transform: rotate(45deg);
	border-color: white;
	border-style: solid;
}

/* Signing up with our partner - notice */
div.form-partner-notice {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	overflow: visible;
	align-items: center;
	column-gap: 6px;
	row-gap: 10px;	
	font-size: 13px;
	line-height: 16px;
	color: var(--contrast-2);
}

div.form-partner-notice p {
	margin: 0;
	&::before {
		display: inline-block;
		margin-right: 0.2rem;
		content: "\238B";
		transform: rotate(90deg);
	}
}

div.form-chip {
	border: 1px solid var(--contrast-3);
	padding: 5px 12px;
	border-radius: 99px;
	color: var(--contrast);
}

img.form-chip-icon {
	margin: 0 0.15rem 0 0;
	max-height: 13px;
	min-height: 13px;
}

span.form-chip-name {
	font-weight: 500;
	font-size: 12px;
}
/* End of Fluent Forms styling */


/* Start of WPML language switcher widget styling */
/* Main menu item WPML */
.wpml-ls-item.wpml-ls-last-item {
	border: 1px solid var(--base);
	transition: 0.5s;
	border-radius: 4px;
	&:hover {
		background-color: var(--base-2);
	}
}
.wpml-ls-item.menu-item-has-children {
	border: 1px solid var(--base);
	transition: 0.5s;
	border-radius: 4px;
	&:hover {
		background-color: var(--base-2);
	}
	@media (max-width: 768px) {
		margin-top: 20px;
		border: 2px solid var(--base);
		outline: 18px solid var(--base-3);
	}
}
span.dropdown-menu-toggle {
	margin-left: auto;
}

/* Submenu items WPML */
.wpml-ls-item.menu-item-has-children .menu-item-object-wpml_ls_menu_item {
	background-color: var(--base-2);
	&:hover {
		opacity: 0.75;
	}
	&:not(:first-child) {
		border-top: 1px solid var(--base);
	}
}
.sub-menu {
	border: 1px solid var(--base);
}
.sub-menu,
.sub-menu > li:first-child > a {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}
.sub-menu,
.sub-menu > li:last-child > a {
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
}
/* End of WPML widget styling */

