/**
 * #.# Styles
 *
 * CSS for both Frontend+Backend.
 */

.wp-block-uagb-blockquote {
	padding: 0;
	margin: 0 auto;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;

	.uagb-blockquote__content,
	cite.uagb-blockquote__author {
		display: block;
		font-style: normal;
	}

	cite.uagb-blockquote__author,
	.uagb-blockquote__author {
		-ms-flex-item-align: center;
		align-self: center;
	}

	/* for backward */
	.uagb-blockquote__skin-quotation {
		blockquote.uagb-blockquote {
			margin: 0;
			padding: 0;
			border: 0;
			outline: 0;
			font-size: 100%;
			vertical-align: baseline;
			background: transparent;
			quotes: none;
			border-left: 0 none;
			border-right: 0 none;
			border-top: 0 none;
			border-bottom: 0 none;
			font-style: normal;
		}

		.uagb-blockquote__icon-wrap {
			display: inline-flex;
			float: unset;
		}

		.uagb-blockquote__icon-wrap .uagb-blockquote__icon {
			padding: 0;
			margin-right: 0;
			margin-bottom: 0;
		}

		&.uagb-blockquote__style-style_2 {
			.uagb-blockquote__icon-wrap {
				display: inline-block;
				float: left;
			}
		}
	}

	.uagb-blockquote__tweet-style-classic,
	.uagb-blockquote__tweet-style-bubble {
		a.uagb-blockquote__tweet-button {
			background-color: #1da1f2;
			border-radius: 100em;
			color: #fff;
		}
	}

	.uagb-blockquote__tweet-icon_text a.uagb-blockquote__tweet-button,
	.uagb-blockquote__tweet-text a.uagb-blockquote__tweet-button {
		padding: 10px 14px;
	}

	.uagb-blockquote__with-tweet.uagb-blockquote__align-center .uagb-blockquote footer,
	.uagb-blockquote__align-center .uagb-blockquote footer {
		display: block;
		text-align: center;
	}

	.uagb-blockquote__align-center .uagb-blockquote__author-wrap,
	.uagb-blockquote__align-center.uagb-blockquote__with-tweet .uagb-blockquote__author-wrap {
		justify-content: center;
		-webkit-box-pack: center;
		-ms-flex-pack: center;
		-webkit-justify-content: center;
		-moz-box-pack: center;
	}

	.uagb-blockquote__align-center a.uagb-blockquote__tweet-button {
		display: block;
		text-align: center;
		margin: 0 auto;
		-ms-flex-item-align: center;
		align-self: center;
	}

	.uagb-blockquote__with-tweet {
		.uagb-blockquote footer {
			display: -webkit-box;
			display: -webkit-flex;
			display: -ms-flexbox;
			display: flex;
			-webkit-box-pack: justify;
			-webkit-justify-content: space-between;
			-ms-flex-pack: justify;
			justify-content: space-between;
		}

		.uagb-blockquote__author-wrap.uagb-blockquote__author-at-top {
			width: auto;
			align-items: center;
		}
	}

	.uagb-blockquote__tweet-style-bubble a.uagb-blockquote__tweet-button::before {
		position: absolute;
		top: 50%;
		left: -0.8em;
		border: solid 0.5em transparent;
		border-right-color: #1da1f2;
		transform: translateY(-50%) scale(1, 0.65);
		transition: 0.2s;
		content: "";
		-webkit-transform: translateY(-50%) scale(1, 0.65);
		-ms-transform: translateY(-50%) scale(1, 0.65);
		-webkit-transition: 0.2s;
		-o-transition: 0.2s;
	}

	/* end backward */

	&.uagb-blockquote__skin-quotation {
		blockquote.uagb-blockquote {
			vertical-align: baseline;
			padding: 0;
			margin: 0;
			background: transparent;
			border: 0 none;
			outline: 0;
			font-size: 100%;
			font-style: normal;
			quotes: none;
		}

		.uagb-blockquote__icon {
			position: relative;
			display: inline-block;
			z-index: 1;
			padding: 10px;
			margin-right: 10px;
			border-radius: 100%;
			float: left;
		}

		.uagb-blockquote__icon svg {
			display: inherit;
			width: inherit;
			height: inherit;
		}

		&.uagb-blockquote__style-style_2 {
			&.uagb-blockquote__align-right .uagb-blockquote__icon {
				display: inline-block;
				float: right;
			}

			.uagb-blockquote__icon {
				display: inline-block;
				float: left;
			}
		}

		&.uagb-blockquote__style-style_1 .uagb-blockquote__icon {
			display: inline-flex;
			float: unset;
		}
	}

	blockquote.uagb-blockquote {
		padding: 0;
		margin: 0;
	}

	.uagb-blockquote__style-style_2 .uagb-blockquote__icon {
		display: inline-block;
		float: left;
		text-align: left;
	}

	.uagb-blockquote__separator-parent {
		display: -webkit-box;
		display: -ms-flexbox;
		display: -webkit-flex;
		display: -moz-box;
		display: flex;
		justify-content: flex-start;
		-js-display: flex;
		-webkit-box-pack: start;
		-ms-flex-pack: start;
		-webkit-justify-content: flex-start;
		-moz-box-pack: start;
	}

	&.uagb-blockquote__with-tweet .uagb-blockquote footer {
		display: -webkit-box;
		display: -webkit-flex;
		display: -ms-flexbox;
		display: flex;
		justify-content: space-between;
		-webkit-box-pack: justify;
		-webkit-justify-content: space-between;
		-ms-flex-pack: justify;
	}

	.uagb-blockquote a {
		-webkit-box-shadow: none;
		box-shadow: none;
		text-decoration: none;
	}

	/*Twitter icon CSS.*/
	.uagb-blockquote a.uagb-blockquote__tweet-button {
		position: relative;
		display: -webkit-box;
		display: -webkit-flex;
		display: -ms-flexbox;
		display: flex;
		align-self: center;
		width: -webkit-max-content;
		width: -moz-max-content;
		width: max-content;
		padding: 0;
		background-color: transparent;
		color: #1da1f2;
		line-height: 1;
		transition: 0.2s;
		-webkit-transition: 0.2s;
		-o-transition: 0.2s;
		-webkit-align-self: flex-end;
		-ms-flex-item-align: center;
	}

	a.uagb-blockquote__tweet-button svg {
		align-self: center;
		vertical-align: middle;
		width: 15px;
		height: 15px;
		fill: #fff;
	}

	a.uagb-blockquote__tweet-button,
	a.uagb-blockquote__tweet-button svg {
		font-style: normal;
	}

	&.uagb-blockquote__tweet-icon a.uagb-blockquote__tweet-button svg {
		margin-right: 0;
	}

	&.uagb-blockquote__tweet-icon a.uagb-blockquote__tweet-button {
		padding: 8px;
	}

	&.uagb-blockquote__tweet-icon_text a.uagb-blockquote__tweet-button,
	&.uagb-blockquote__tweet-text a.uagb-blockquote__tweet-button {
		padding: 10px 14px;
	}

	&.uagb-blockquote__tweet-style-link a.uagb-blockquote__tweet-button {
		padding: 10px 0;
	}

	&.uagb-blockquote__tweet-style-classic a.uagb-blockquote__tweet-button,
	&.uagb-blockquote__tweet-style-bubble a.uagb-blockquote__tweet-button {
		background-color: #1da1f2;
		border-radius: 100em;
		color: #fff;
	}

	&.uagb-blockquote__tweet-style-bubble a.uagb-blockquote__tweet-button::before {
		position: absolute;
		top: 50%;
		left: -0.8em;
		border: solid 0.5em transparent;
		border-right-color: #1da1f2;
		transform: translateY(-50%) scale(1, 0.65);
		transition: 0.2s;
		content: "";
		-webkit-transform: translateY(-50%) scale(1, 0.65);
		-ms-transform: translateY(-50%) scale(1, 0.65);
		-webkit-transition: 0.2s;
		-o-transition: 0.2s;
	}

	&.uagb-blockquote__align-right.uagb-blockquote__tweet-style-bubble a.uagb-blockquote__tweet-button::before {
		right: -0.8em;
		left: auto;
		transform: translateY(-50%) scale(1, 0.65) rotate(180deg);
		-webkit-transform: translateY(-50%) scale(1, 0.65) rotate(180deg);
		-ms-transform: translateY(-50%) scale(1, 0.65) rotate(180deg);
	}

	&.uagb-blockquote__align-center.uagb-blockquote__tweet-style-bubble a.uagb-blockquote__tweet-button::before {
		top: -0.8em;
		right: auto;
		left: 50%;
		transform: translate(-50%, 10%) scale(1, 0.85) rotate(90deg);
		-webkit-transform: translateX(-50%) scale(1, 0.85) rotate(90deg);
		-ms-transform: translateX(-50%) scale(1, 0.85) rotate(90deg);
	}

	&.uagb-blockquote__with-tweet.uagb-blockquote__align-center .uagb-blockquote footer,
	&.uagb-blockquote__align-center .uagb-blockquote footer {
		display: block;
		text-align: center;
	}

	&.uagb-blockquote__align-center .uagb-blockquote__author-wrap.uagb-blockquote__author-at-right,
	&.uagb-blockquote__align-center.uagb-blockquote__with-tweet .uagb-blockquote__author-wrap {
		justify-content: center;
		-webkit-box-pack: center;
		-ms-flex-pack: center;
		-webkit-justify-content: center;
		-moz-box-pack: center;
	}

	&.uagb-blockquote__align-center a.uagb-blockquote__tweet-button {
		display: block;
		align-self: center;
		margin: 0 auto;
		text-align: center;
		-ms-flex-item-align: center;
	}

	&.uagb-blockquote__with-tweet.uagb-blockquote__align-right .uagb-blockquote footer,
	&.uagb-blockquote__align-right .uagb-blockquote footer {
		flex-direction: row-reverse;
	}

	/* image */
	.uagb-blockquote__author-wrap {
		display: -webkit-box;
		display: -webkit-flex;
		display: -ms-flexbox;
		display: flex;
		flex-direction: row;
		align-self: center;
		align-items: center;

		img {
			width: 50px;
			height: 50px;
			border-radius: 100%;
			object-fit: cover;
		}
	}

	&.uagb-blockquote__align-right .uagb-blockquote__author-wrap,
	&.uagb-blockquote__align-left .uagb-blockquote__author-wrap.uagb-blockquote__author-at-right {
		justify-content: flex-end;
		-webkit-box-pack: flex-end;
		-ms-flex-pack: flex-end;
		-webkit-justify-content: flex-end;
		-moz-box-pack: flex-end;
	}

	&.uagb-blockquote__align-left .uagb-blockquote__author-wrap,
	&.uagb-blockquote__align-right .uagb-blockquote__author-wrap.uagb-blockquote__author-at-right {
		justify-content: flex-start;
		-webkit-box-pack: flex-start;
		-ms-flex-pack: flex-start;
		-webkit-justify-content: flex-start;
		-moz-box-pack: flex-start;
	}

	&.uagb-blockquote__with-tweet .uagb-blockquote__author-wrap {
		justify-content: unset;
		-webkit-box-pack: unset;
		-ms-flex-pack: unset;
		-webkit-justify-content: unset;
		-moz-box-pack: unset;
	}

	&.uagb-blockquote__align-center .uagb-blockquote__author-wrap,
	&.uagb-blockquote__align-center.uagb-blockquote__with-tweet .uagb-blockquote__author-wrap {
		justify-content: center;
		-webkit-box-pack: center;
		-ms-flex-pack: center;
		-webkit-justify-content: center;
		-moz-box-pack: center;
	}

	/* Top Image */
	.uagb-blockquote__author-wrap.uagb-blockquote__author-at-top {
		flex-direction: column;
		width: 100%;
		-webkit-flex-direction: column;
		-ms-flex-direction: column;
		align-items: flex-start;
	}

	.uagb-blockquote__author-wrap.uagb-blockquote__author-at-top .uagb-blockquote__author-wrap,
	.uagb-blockquote__author-wrap.uagb-blockquote__author-at-top .uagb-blockquote__author {
		width: inherit;
	}

	&.uagb-blockquote__with-tweet .uagb-blockquote__author-wrap.uagb-blockquote__author-at-top {
		width: auto;
	}

	/* Left Image */

	&.uagb-blockquote__align-right .uagb-blockquote__author-wrap.uagb-blockquote__author-at-top {
		text-align: right;
		align-items: flex-end;
	}

	&.uagb-blockquote__align-center .uagb-blockquote__author-wrap.uagb-blockquote__author-at-top {
		text-align: center;
		align-items: center;
	}

	.uagb-blockquote__author-wrap.uagb-blockquote__author-at-right {
		-webkit-flex-direction: row-reverse;
		-ms-flex-direction: row-reverse;
		flex-direction: row-reverse;
		justify-content: flex-end;
	}
}

@media only screen and ( max-width: 976px ) {
	.wp-block-uagb-blockquote {
		&.uagb-blockquote__stack-img-tablet {
			.uagb-blockquote__author {
				width: 100%;
			}

			.uagb-blockquote__author-wrap.uagb-blockquote__author-at-right,
			.uagb-blockquote__author-wrap.uagb-blockquote__author-at-left {
				-webkit-flex-direction: column;
				-ms-flex-direction: column;
				flex-direction: column;
				align-items: flex-start;
			}

			/* Left alignment */
			&.uagb-blockquote__with-tweet .uagb-blockquote footer {
				-webkit-flex-direction: column;
				-ms-flex-direction: column;
				flex-direction: column;
				align-self: flex-start;
				-ms-flex-item-align: flex-start;
			}

			.uagb-blockquote__author-wrap.uagb-blockquote__author-at-left,
			a.uagb-blockquote__tweet-button {
				-ms-flex-item-align: flex-start;
				align-self: flex-start;
			}

			/* Right ALignment */
			&.uagb-blockquote__align-right.uagb-blockquote__with-tweet .uagb-blockquote footer,
			&.uagb-blockquote__align-right .uagb-blockquote__author-wrap.uagb-blockquote__author-at-left,
			&.uagb-blockquote__align-right a.uagb-blockquote__tweet-button {
				-ms-flex-item-align: flex-end;
				align-self: flex-end;
			}

			&.uagb-blockquote__align-right.uagb-blockquote__tweet-style-bubble a.uagb-blockquote__tweet-button::before,
			&.uagb-blockquote__align-left.uagb-blockquote__tweet-style-bubble a.uagb-blockquote__tweet-button::before {
				top: -0.8em;
				right: auto;
				left: 50%;
				transform: translate(-50%, 10%) scale(1, 0.85) rotate(90deg);
				-webkit-transform: translateX(-50%) scale(1, 0.85) rotate(90deg);
				-ms-transform: translateX(-50%) scale(1, 0.85) rotate(90deg);
			}
		}

		.uagb-blockquote__align-right.uagb-blockquote__stack-img-tablet .uagb-blockquote__author-wrap {
			-ms-flex-item-align: flex-end;
			align-self: flex-end;
		}

		.uagb-blockquote__align-left.uagb-blockquote__stack-img-tablet .uagb-blockquote__author-wrap,
		.uagb-blockquote__align-left.uagb-blockquote__stack-img-tablet .uagb-blockquote__author {
			-ms-flex-item-align: flex-start;
			align-self: flex-start;
		}
	}
}

@media screen and ( max-width: 767px ) {
	.wp-block-uagb-blockquote {
		&.uagb-blockquote__stack-img-mobile {
			.uagb-blockquote__author {
				width: 100%;
			}

			.uagb-blockquote__author-wrap.uagb-blockquote__author-at-right,
			.uagb-blockquote__author-wrap.uagb-blockquote__author-at-left {
				-webkit-flex-direction: column;
				-ms-flex-direction: column;
				flex-direction: column;
				align-items: flex-start;
			}

			/* Left alignment */
			&.uagb-blockquote__with-tweet .uagb-blockquote footer {
				-webkit-flex-direction: column;
				-ms-flex-direction: column;
				flex-direction: column;
				align-self: flex-start;
				-ms-flex-item-align: flex-start;
			}

			.uagb-blockquote__author-wrap.uagb-blockquote__author-at-left,
			a.uagb-blockquote__tweet-button {
				-ms-flex-item-align: flex-start;
				align-self: flex-start;
			}

			/* Right ALignment */
			&.uagb-blockquote__align-right.uagb-blockquote__with-tweet .uagb-blockquote footer,
			&.uagb-blockquote__align-right .uagb-blockquote__author-wrap.uagb-blockquote__author-at-left,
			&.uagb-blockquote__align-right a.uagb-blockquote__tweet-button {
				-ms-flex-item-align: flex-end;
				align-self: flex-end;
			}

			&.uagb-blockquote__align-right.uagb-blockquote__tweet-style-bubble a.uagb-blockquote__tweet-button::before,
			&.uagb-blockquote__align-left.uagb-blockquote__tweet-style-bubble a.uagb-blockquote__tweet-button::before {
				top: -0.8em;
				right: auto;
				left: 50%;
				transform: translate(-50%, 10%) scale(1, 0.85) rotate(90deg);
				-webkit-transform: translateX(-50%) scale(1, 0.85) rotate(90deg);
				-ms-transform: translateX(-50%) scale(1, 0.85) rotate(90deg);
			}
		}

		.uagb-blockquote__align-right.uagb-blockquote__stack-img-mobile .uagb-blockquote__author-wrap {
			-ms-flex-item-align: flex-end;
			align-self: flex-end;
		}

		.uagb-blockquote__align-left.uagb-blockquote__stack-img-mobile .uagb-blockquote__author-wrap,
		.uagb-blockquote__align-left.uagb-blockquote__stack-img-tablet .uagb-blockquote__author {
			-ms-flex-item-align: flex-start;
			align-self: flex-start;
		}
	}
}
