/**
 * Gift card field states, after the design by Samen Gebrand.
 *
 * @package Fitleven_Gifty
 */

.fitleven-gifty-status:empty {
	display: none;
}

.fitleven-gifty-status {
	margin-top: 10px;
}

.fitleven-gifty-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.fitleven-gifty-msg {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	border-radius: 7px;
	padding: 12px 14px;
	font-size: 16px;
	line-height: 1.4;
}

.fitleven-gifty-msg.is-error {
	color: #b3261e;
	background: #fbecea;
}

.fitleven-gifty-msg.is-warn {
	color: #6f5310;
	background: #fbf3dc;
}

.fitleven-gifty-msg svg,
.fitleven-gifty-applied svg,
.fitleven-gifty-note svg {
	flex: none;
	margin-top: 1px;
}

.fitleven-gifty-applied {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	color: #2f6b3a;
	background: #eaf3e6;
	border: 1px solid #bfd9be;
	border-radius: 7px;
	padding: 14px 16px;
	line-height: 1.4;
}

.fitleven-gifty-applied b {
	display: block;
	color: #2f6b3a;
}

.fitleven-gifty-applied span {
	font-size: 15px;
	color: #33402f;
}

.gfield.fitleven-gifty-has-error input {
	border-color: #b3261e;
	box-shadow: inset 0 0 0 1px #b3261e;
}

.fitleven-gifty-note {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin-top: 10px;
	font-size: 16px;
	line-height: 1.4;
	color: #4a423c;
}

.fitleven-gifty-note svg {
	color: #8a4b3c;
}

.fitleven-gifty-have {
	display: inline-flex;
	gap: 10px;
	align-items: center;
	margin-top: 10px;
	padding: 4px 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 16px;
	color: #8a4b3c;
	cursor: pointer;
}

.fitleven-gifty-have span {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.fitleven-gifty-have:focus-visible {
	outline: 2px solid #8a4b3c;
	outline-offset: 2px;
}

/* Folded: only "I have a gift card" shows. Applied: only the green box shows. */
.gfield.fitleven-gifty-collapsed > :not(.fitleven-gifty-toggle),
.gfield.fitleven-gifty-is-applied > :not(.fitleven-gifty-status):not(.validation_message):not(.gfield_validation_message) {
	display: none !important;
}

.gfield .fitleven-gifty-toggle {
	margin: 0 0 10px;
	min-height: 44px;
	font-weight: 500;
}

.gfield.fitleven-gifty-collapsed .fitleven-gifty-toggle {
	margin-bottom: 0;
}

.fitleven-gifty-code-row {
	display: flex;
	gap: 10px;
	align-items: stretch;
}

.fitleven-gifty-input {
	position: relative;
	flex: 1;
	min-width: 0;
}

.fitleven-gifty-input input {
	width: 100%;
	padding-right: 46px !important;
}

.fitleven-gifty-spinner {
	display: none;
	position: absolute;
	top: 50%;
	right: 16px;
	width: 20px;
	height: 20px;
	margin-top: -10px;
	border: 2px solid #e8e1d8;
	border-top-color: #8a4b3c;
	border-radius: 50%;
	animation: fitleven-gifty-spin 0.7s linear infinite;
}

.fitleven-gifty-busy .fitleven-gifty-spinner {
	display: block;
}

@keyframes fitleven-gifty-spin {
	to {
		transform: rotate(360deg);
	}
}

.fitleven-gifty-icon-chev {
	transition: transform 0.18s ease;
}

.fitleven-gifty-toggle[aria-expanded="true"] .fitleven-gifty-icon-chev {
	transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
	.fitleven-gifty-spinner {
		animation-duration: 2s;
	}

	.fitleven-gifty-icon-chev {
		transition: none;
	}
}

.fitleven-gifty-apply {
	flex: none;
	padding: 0 24px;
	border: 1.5px solid #8a4b3c;
	border-radius: 36px;
	background: #fff;
	color: #8a4b3c;
	font: inherit;
	font-size: 17px;
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
}

.fitleven-gifty-apply {
	min-height: 48px;
}

.fitleven-gifty-remove {
	display: inline-flex;
	flex: none;
	align-items: center;
	align-self: flex-start;
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: #8a4b3c;
	font: inherit;
	font-size: 15px;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
	cursor: pointer;
}

.fitleven-gifty-apply:hover {
	background: #fbf1ec;
}

.fitleven-gifty-apply[disabled] {
	opacity: 0.55;
	cursor: default;
}

.fitleven-gifty-apply:focus-visible,
.fitleven-gifty-remove:focus-visible {
	outline: 2px solid #8a4b3c;
	outline-offset: 2px;
}

.fitleven-gifty-applied-text {
	flex: 1;
	min-width: 0;
}

.fitleven-gifty-applied-text span {
	display: block;
}

.fitleven-gifty-applied .fitleven-gifty-rest {
	margin-top: 4px;
	color: #6b625b;
}

.fitleven-gifty-footer {
	flex-wrap: wrap;
}

.fitleven-gifty-after {
	flex-basis: 100%;
	width: 100%;
	margin: 10px 0 0;
	font-size: 15px;
	color: #4a423c;
}

@media (max-width: 520px) {
	.fitleven-gifty-code-row {
		flex-direction: column;
	}

	.fitleven-gifty-apply {
		width: 100%;
	}
}
