/**
 * Woo Free Gift Threshold — Frontend Styles
 *
 * BEM naming with .wfgt- prefix, mirroring the Lef Creative house style
 * from the defibrion-keuzehulp reference plugin.
 *
 * Color palette:
 *   Primary red : #e63946
 *   Green unlock: #16a34a
 *   Text dark   : #111827
 *   Text medium : #374151
 *   Border      : #d1d5db
 *   Track bg    : #e5e7eb
 */

/* ==========================================================================
   Progress Wrapper
   ========================================================================== */

.wfgt-progress-wrap {
	margin: 0 0 28px;
	background: #fafafa;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 16px 20px;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.wfgt-progress {
	margin-bottom: 8px;
}

.wfgt-progress__track {
	background: #e5e7eb;
	border-radius: 4px;
	height: 10px;
	overflow: hidden;
	margin-bottom: 10px;
}

.wfgt-progress__bar {
	background: #e63946;
	height: 100%;
	border-radius: 4px;
	/* Smooth animation when cart total changes on page load/update */
	transition: width 0.35s ease;
	min-width: 0;
}

/* Text below the bar */
.wfgt-progress__text {
	font-size: 0.9rem;
	color: #374151;
	margin: 0 0 4px;
	line-height: 1.5;
}

.wfgt-progress__text strong {
	color: #111827;
	font-weight: 700;
}

/* ==========================================================================
   Gift Messages
   ========================================================================== */

.wfgt-gift-message {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 16px;
	border-radius: 8px;
	margin-top: 10px;
	font-size: 0.9rem;
	line-height: 1.5;
}

/* Unlocked gift — green tint */
.wfgt-gift-message--unlocked {
	background: rgba(22, 163, 74, 0.08);
	border: 1px solid rgba(22, 163, 74, 0.3);
	color: #15803d;
}


/* Dashicons inside message */
.wfgt-gift-message__icon {
	font-size: 20px;
	line-height: 1.4;
	flex-shrink: 0;
	margin-top: 1px;
}

.wfgt-gift-message__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wfgt-gift-message__text {
	line-height: 1.5;
}

/* ==========================================================================
   Gift add-to-cart area
   ========================================================================== */

/* Variation form row */
.wfgt-variation-form {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 8px;
}

.wfgt-attrs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: flex-end;
}

.wfgt-attr {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.wfgt-attr__label {
	font-size: 0.72rem;
	font-weight: 600;
	color: #15803d;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.wfgt-attr-select {
	border: 1px solid rgba( 22, 163, 74, 0.4 );
	border-radius: 6px;
	background: #fff;
	color: #111827;
	font-size: 0.85rem;
	padding: 5px 8px;
	min-width: 110px;
	cursor: pointer;
}

.wfgt-attr-select:focus {
	outline: 2px solid rgba( 22, 163, 74, 0.5 );
	outline-offset: 1px;
}

/* Add-to-cart icon button */
.wfgt-add-btn.button,
a.wfgt-add-btn.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-height: 0;
	border-radius: 6px;
	background: #15803d !important;
	color: #fff !important;
	border: none;
	cursor: pointer;
	padding: 0;
	text-decoration: none;
	flex-shrink: 0;
	transition: background 0.15s ease;
}

.wfgt-add-btn.button:hover,
a.wfgt-add-btn.button:hover {
	background: #166534 !important;
	color: #fff !important;
}

.wfgt-add-btn.button[disabled],
.wfgt-add-btn.button:disabled {
	background: #e5e7eb !important;
	color: #9ca3af !important;
	cursor: not-allowed;
	pointer-events: none;
}

.wfgt-add-btn .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	line-height: 1;
}

/* Already-in-cart badge */
.wfgt-in-cart-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.82rem;
	font-weight: 600;
	color: #15803d;
}

.wfgt-in-cart-badge .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 1.1;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media ( max-width: 600px ) {
	.wfgt-gift-message {
		flex-direction: column;
		gap: 6px;
	}

	.wfgt-gift-message__icon {
		align-self: flex-start;
	}
}

/* ==========================================================================
   WooCommerce notices — restyled to match plugin visual language
   ========================================================================== */

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
	border-radius: 8px !important;
	border-top: none !important;
	padding: 12px 16px !important;
	margin-bottom: 20px !important;
	font-size: 0.9rem;
	line-height: 1.5;
	display: flex !important;
	align-items: center;
	gap: 10px;
	list-style: none !important;
}

/* Success — green tint (matches .wfgt-gift-message--unlocked) */
.woocommerce-message {
	background: rgba( 22, 163, 74, 0.08 ) !important;
	border: 1px solid rgba( 22, 163, 74, 0.3 ) !important;
	color: #15803d !important;
}

/* Error — red tint */
.woocommerce-error {
	background: rgba( 230, 57, 70, 0.07 ) !important;
	border: 1px solid rgba( 230, 57, 70, 0.3 ) !important;
	color: #b91c1c !important;
}

/* Info — neutral blue tint */
.woocommerce-info {
	background: rgba( 34, 113, 177, 0.07 ) !important;
	border: 1px solid rgba( 34, 113, 177, 0.3 ) !important;
	color: #1d4ed8 !important;
}

/* "Bekijk winkelwagen" button inside the notice */
.woocommerce-message .button,
.woocommerce-info .button {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	padding: 5px 14px;
	border-radius: 6px;
	font-size: 0.82rem;
	font-weight: 600;
	background: #15803d !important;
	color: #fff !important;
	border: none;
	text-decoration: none;
	transition: background 0.15s ease;
	white-space: nowrap;
}

.woocommerce-message .button:hover,
.woocommerce-info .button:hover {
	background: #166534 !important;
	color: #fff !important;
}

.woocommerce-error .button {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	padding: 5px 14px;
	border-radius: 6px;
	font-size: 0.82rem;
	font-weight: 600;
	background: #b91c1c !important;
	color: #fff !important;
	border: none;
	text-decoration: none;
	transition: background 0.15s ease;
	white-space: nowrap;
}

.woocommerce-error .button:hover {
	background: #991b1b !important;
	color: #fff !important;
}
