@import '@wordpress/base-styles/mixins';
@import '@wordpress/base-styles/variables';

.build-report {
	.build-report__content {
		max-width: 660px;
		margin-inline: auto;
		margin-block-start: 32px;
	}

	.build-report__form {
		display: flex;
		flex-direction: column;
		gap: 16px;
		border: 1px solid var( --color-neutral-10 );
		border-radius: 4px;
		padding: 16px 24px;
	}

	.build-report__step-title {
		@include heading-large;
		margin-block-end: 0;
		padding-block: 8px 4px;
	}

	.build-report__step-description {
		@include body-medium;
		color: var( --color-neutral-70 );
		margin-block-end: 0;
		display: flex;
		flex-direction: column;
		gap: 4px;
	}

	.build-report__group-label {
		@include heading-medium;
		margin-block-end: 16px;
	}

	// Fixing margins from StyledHelp-deprecatedMarginHelp which is being inserted by the component
	.components-base-control__help {
		margin-block-start: 0;
		margin-block-end: 0;
	}

	.build-report__actions {
		display: flex;
		gap: 8px;
		padding-block: 8px;
	}

	.build-report__date-fields-container {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 16px;

		@media (max-width: 768px) {
			grid-template-columns: 1fr;
		}
	}

	.build-report__date-field {
		.build-report__date-input {
			.components-text-control__input {
				cursor: pointer;

				&:focus,
				&:hover {
					border-color: var( --color-primary );
					box-shadow: 0 0 0 1px var( --color-primary );
					outline: none;
				}
			}
		}
	}

	.build-report__preview-button {
		width: fit-content;
	}

	.build-report__error-message {
		color: var( --color-error );
		font-size: 12px;
		margin-block-start: 4px;
		margin-block-end: 0;
	}
}

.build-report__select-site-subtitle {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.build-report__content-header {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-block-end: 24px;
}

.build-report__content-title {
	@include heading-2x-large;
}

.build-report__content-description {
	@include body-medium;
	color: var( --color-neutral-50 );
	margin-block-end: 0;
}

.build-report__content-note {
	@include body-small;
	display: flex;
	align-items: center;

	svg {
		margin: 5px 10px 5px 0;
	}
}

.build-report__date-popover {
	.components-popover__content {
		padding: 16px;
	}
}

.build-report__loading-state {
	display: flex;
	padding-block: 16px;
	align-items: center;

	svg {
		margin: 5px 15px 5px 0;
	}
}

.build-report__loading-actions,
.build-report__error-actions {
	display: flex;
	gap: 8px;
}

.build-report__step-note {
	@include body-small;
	color: var(--color-neutral-50);
	margin-block: 0.5rem -0.5rem;
}

.build-report__stats-fieldset {
	display: flex;
	flex-direction: column;
	gap: 16px;
}