@import './../../stylesheets/abstracts/variables';

.payment-method-checkbox {
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-between;
	align-items: center;
	width: 100%;

	@include breakpoint( '<660px' ) {
		flex-wrap: wrap;
		justify-content: flex-start;
		row-gap: 5px;
	}

	margin-bottom: $gap;
	&:last-child {
		margin-bottom: $gap-smallest;
	}

	& > * {
		margin: 0 3px;

		@include breakpoint( '<660px' ) {
			flex-basis: 100%;
		}
	}

	input[type='checkbox'] {
		&:disabled {
			cursor: not-allowed;
		}
	}

	.components-base-control__field,
	.loadable-checkbox__spinner {
		margin-bottom: 0;
		@include breakpoint( '<660px' ) {
			display: flex;
			margin: 4px 0;
		}
	}

	&__pills {
		display: flex;
		flex-wrap: nowrap;
		text-transform: uppercase;
		flex: 1;

		&-left,
		&-right {
			display: flex;
			flex: 1 1 auto;
			flex-wrap: nowrap;
			gap: 5px;
			align-items: center;
			gap: 5px;
			margin-right: 3px;
		}

		&-right {
			justify-content: flex-end;
		}

		.wcpay-pill {
			margin: 0;
		}

		@include breakpoint( '<660px' ) {
			margin-left: 40px;
			flex-wrap: wrap;
		}
	}

	&__label {
		text-transform: initial;
	}

	&__required-label {
		display: block;
		font-size: 11px;
		line-height: 1em;
		color: $gray-700;
	}

	&__info {
		> * {
			margin: 0;
			color: $gray-600;
		}
	}

	&.overlay {
		position: relative;
		&::after {
			content: '';
			position: absolute;
			// adds some spacing for the borders, so that they're not part of the opacity
			top: 1px;
			bottom: 1px;
			// ensures that the info icon isn't part of the opacity
			left: 55px;
			right: 0;
			background: #fff;
			opacity: 0.5;
			pointer-events: none;
		}
	}

	.wcpay-pill {
		margin-left: $gap-smaller;

		&.payment-status-pending-approval,
		&.payment-status-pending-verification {
			border: 0 solid transparent;
			background: #f0b849;
			color: #1f1f1f;
		}
		&.payment-status-inactive {
			border: 0 solid transparent;
			background: $studio-yellow-5;
			color: $studio-yellow-50;
		}
	}
}

.woocommerce-payments__payment-method-icon {
	@include breakpoint( '<660px' ) {
		svg {
			margin-right: 4px;
		}
	}
}
