/**
 * CTA styles
 * Loads on front end and back end
 */

 .ab-block-cta {
	margin: 0 0 1.2em 0;
	position: relative;
	background: #f2f2f2;
    color: #293038;
	padding: 5% 3%;
	border-radius: 5px;

	.components-autocomplete {
		display: inline-block;
		width: auto;
		margin: 0 auto;
		position: relative;
	}

	* {
		z-index: 10;
		position: relative;
	}

	&.alignfull {
		border-radius: 0;
		padding: 8% 3%;
	}

	@media only screen and (max-width: 768px) {
		padding: 8% 6%;	
	}
	
	&.alignfull .ab-cta-content,
	&.alignfull .ab-cta-button {
		@media only screen and (min-width: 768px) {
			max-width: 60%;
			margin: 0 auto;
		}
	}

	&.alignwide .ab-cta-content,
	&.alignwide .ab-cta-button {
		@media only screen and (min-width: 768px) {
			max-width: 80%;
			margin: 0 auto;
		}
	}

	.ab-cta-image-wrap {
		position: absolute;
		top: 0;
		right: 0;
		left: 0;
		height: 100%;
		z-index: 1;
	}

	.ab-cta-image {
		object-fit: cover;
		height: 100%;
		width: 100%;
		transition: .3s ease;
	}

	.ab-cta-title {
		display: inline-block;
		width: 100%;
		margin-bottom: .3em;
		line-height: 1.2;
	}

	.ab-cta-text {
		line-height: 1.4;

		p {
			color: inherit;
		}

		a {
			color: inherit;
			box-shadow: 0 -1px 0 inset;
			text-decoration: none;

			&:hover {
				color: inherit;
				box-shadow: 0 -2px 0 inset;
			}
		}
	}

	.ab-cta-button .blocks-rich-text {
		display: inline-flex;
	}

	.ab-button {
		text-align: center;
		font-size: 18px;
		line-height: 1 !important;
		background-color: #32373c;
		border: none;
		border-radius: 50px;
		box-shadow: none;
		color: #fff;
		cursor: pointer;
		padding: .6em 1em;
		text-decoration: none;
		word-break: break-word;
		transition: .3s ease;
		display: inline-block;

		&:hover {
			box-shadow: inset 0 0 200px rgba(255, 255, 255, 0.15);
		}
	}

	.ab-cta-title:empty,
	.ab-cta-text:empty,
	.ab-cta-button:empty,
	.ab-button:empty {
		display: none;
	}

	.ab-button-shape-square {
		border-radius: 0;
	}

	.ab-button-shape-rounded {
		border-radius: 5px;
	}

	.ab-button-shape-circular {
		border-radius: 100px;
	}

	.ab-button-size-small {
		font-size: 14px;
	}

	.ab-button-size-medium {
		font-size: 20px;
	}

	.ab-button-size-large {
		font-size: 26px;
		padding: .8em 1.2em;
	}

	.ab-button-size-extralarge {
		font-size: 32px;
		padding: .8em 1.2em;
	}

	.ab-font-size-24.ab-cta-title {
		font-size: 24px;
	}
  
	.ab-font-size-26.ab-cta-title {
		font-size: 26px;
	}

	.ab-font-size-28.ab-cta-title {
		font-size: 28px;
	}

	.ab-font-size-30.ab-cta-title {
		font-size: 30px;
	}

	.ab-font-size-32.ab-cta-title {
		font-size: 32px;
	}

	.ab-font-size-34.ab-cta-title {
		font-size: 34px;
	}

	.ab-font-size-36.ab-cta-title {
		font-size: 36px;
	}

	.ab-font-size-38.ab-cta-title {
		font-size: 38px;
	}

	.ab-font-size-40.ab-cta-title {
		font-size: 40px;
	}

	.ab-font-size-42.ab-cta-title {
		font-size: 42px;
	}

	.ab-font-size-44.ab-cta-title {
		font-size: 44px;
	}

	.ab-font-size-46.ab-cta-title {
		font-size: 46px;
	}

	.ab-font-size-48.ab-cta-title {
		font-size: 48px;
	}

	.ab-font-size-50.ab-cta-title {
		font-size: 50px;
	}

	.ab-font-size-52.ab-cta-title {
		font-size: 52px;
	}

	.ab-font-size-54.ab-cta-title {
		font-size: 54px;
	}

	.ab-font-size-56.ab-cta-title {
		font-size: 56px;
	}

	.ab-font-size-58.ab-cta-title {
		font-size: 58px;
	}

	.ab-font-size-60.ab-cta-title {
		font-size: 60px;
	}

	.blocks-button__inline-link {
		margin-top: 15px;
	}

	.ab-cta-image:not(.has-background-dim) {
		opacity: 0;
	}

	.has-background-dim {
		opacity: .5;
	}

	.has-background-dim-10 {
		opacity: .1;
	}

	.has-background-dim-20 {
		opacity: .2;
	}

	.has-background-dim-30 {
		opacity: .3;
	}
	
	.has-background-dim-40 {
		opacity: .4;
	}

	.has-background-dim-50 {
		opacity: .5;
	}

	.has-background-dim-60 {
		opacity: .6;
	}

	.has-background-dim-70 {
		opacity: .7;
	}

	.has-background-dim-80 {
		opacity: .8;
	}

	.has-background-dim-90 {
		opacity: .9;
	}

	.has-background-dim-100 {
		opacity: 1;
	}
}

.ab-button-right {
	transform: translateX(-100%);
	left: 100%;
	position: relative;
}

.ab-button-center {
	margin: 0 auto;
}

.ab-cta-inspector-media.components-button {
	vertical-align: top;
	border: 1px solid #e2e4e7;
	background-color: #fff;
	display: inline-flex;
	border-radius: 3px;
	margin-bottom: 15px;

	&:hover {
		box-shadow: none !important;
		border: solid 1px #555d66;
	}

	&:first-child {
		margin-right: 8px;
	}

	svg {
		margin-right: 5px;
	}
}