@import "@wordpress/base-styles/breakpoints";
@import "@wordpress/base-styles/mixins";
@import "@wordpress/base-styles/variables";

.a4a-migration-offer-v2 {
	display: flex;
	flex-direction: row;
	gap: 16px;

	border-radius: 4px;
	border: 1px solid var(--color-primary-5);
	background-color: var(--color-primary-0);
	transition: padding 0.15s linear;
	padding: 8px 16px;

	@include break-medium {
		padding: 20px 32px;
		&.is-expanded {
			padding: 20px 32px 24px;
		}
	}
}

.a4a-migration-offer-v2__side {
	height: 48px;
}

.a4a-migration-offer-v2__side,
.theme-a8c-for-agencies .components-button.a4a-migration-offer-v2__view-toggle {
	display: none;

	@include break-medium {
		display: block;
	}
}

.a4a-migration-offer-v2__icon {
	min-width: 48px;
	height: 48px;
}

.a4a-migration-offer-v2__main {
	flex-direction: column;
	gap: 8px;
	flex-grow: 1;
}

.a4a-migration-offer-v2__title {
	@include heading-medium;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;

	margin-block-end: 0;

	@include break-medium {
		@include heading-large;
		margin-block-start: 10px;
		margin-block-end: 8px;
	}
}

.a4a-migration-offer-v2__body {
	display: flex;
	gap: 16px;
	align-content: center;
	flex-direction: column;

	@include break-xlarge {
		gap: 40px;
		flex-direction: row;
	}
}

.a4a-migration-offer-v2__description {
	@include body-medium;
	margin: 0;
	max-width: 800px;

	a {
		color: var(--color-text);
		text-decoration: underline;
	}

	@include break-medium {
		@include body-large;
	}
}

.a4a-migration-offer-v2__asterisk {
	color: var(--studio-gray-80);
	@include body-medium;
	margin-block-start: 12px;
	margin-bottom: 0;
}

.a4a-migration-offer-v2__button {
	border: 1px solid var(--color-neutral-5);
	display: flex;
	flex-direction: row;
	gap: 4px;
	align-items: center;
	align-content: center;

	@include body-medium;
}

.theme-a8c-for-agencies .components-button.a4a-migration-offer-v2__view-toggle-mobile {
	display: block;

	@include break-medium {
		display: none;
	}
}

.theme-a8c-for-agencies .components-button.a4a-migration-offer-v2__view-toggle,
.theme-a8c-for-agencies .components-button.a4a-migration-offer-v2__view-toggle-mobile {
	&,
	&:hover,
	&:focus,
	&:focus-visible {
		background-color: transparent;

		&:not(:focus-visible) {
			border: none;
			box-shadow: none;
		}
	}

	svg {
		transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease-in;
	}
}

.a4a-migration-offer-v2.is-expanded {
	.components-button.a4a-migration-offer-v2__view-toggle svg,
	.components-button.a4a-migration-offer-v2__view-toggle-mobile svg {
		transform: rotate(180deg);
	}
}
