// Common styles for both views (editor and frontend).
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;

.wp-block-jetpack-donations {

	.donations__container {
		border: 1px solid gb.$gray-400;
	}

	.donations__nav {
		display: flex;
		border-bottom: 1px solid gb.$gray-400;
	}

	.donations__nav-item {
		font-weight: 700;
		display: inline-block;
		flex: 1;
		text-align: center;
		font-size: 16px;
		padding: 12px;
		border-inline-start: 1px solid gb.$gray-400;
		background: gb.$white;
		color: gb.$gray-900;
		cursor: pointer;

		@include gb.break-small() {
			padding: 16px 24px;
		}

		&:first-child {
			border-inline-start: none;
		}

		&.is-active {
			background: gb.$gray-900;
			color: gb.$white;
			cursor: default;
		}
	}

	.donations__content {
		padding: 16px;

		@include gb.break-small() {
			padding: 32px;
		}

		h4,
		p {
			margin: 0 0 16px;

			@include gb.break-small() {
				margin: 0 0 24px;
			}
		}
	}

	.donations__amounts {
		margin-bottom: 16px;
		display: flex;
		flex-wrap: wrap;

		@include gb.break-small() {
			margin: 0 0 24px;
		}
	}

	.donations__amount {
		display: inline-block;
		padding: 16px 24px;
		background-color: gb.$white;
		color: gb.$gray-900;
		border: 1px solid gb.$gray-400;
		margin-inline-end: 8px;
		margin-bottom: 8px;
		font-weight: 600;
		font-size: 16px;
		white-space: nowrap;

		&.has-error {
			box-shadow: 0 0 0 1px gb.$white, 0 0 0 3px gb.$alert-red;
			outline: 2px solid transparent;
			outline-offset: -2px;
		}
	}

	.donations__custom-amount .donations__amount-value {
		display: inline-block;
		margin-inline-start: 4px;
		min-width: 60px;
	}

	.donations__separator {
		margin-bottom: 16px;
		margin-top: 16px;

		@include gb.break-small() {
			margin-bottom: 32px;
			margin-top: 32px;
		}
	}

	.donations__donate-button-wrapper,
	.donations__donate-button {
		margin: 0;
	}
}
