/**
 * LatePoint Gift Cards - Frontend Styles
 *
 * @package LatePointGiftCards
 */

/* Gift Card Applied Message */
.lp-gift-card-applied {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 15px;
	background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
	border: 1px solid #81c784;
	border-radius: 8px;
	margin: 10px 0;
}

.lp-gift-card-applied .gift-card-info {
	display: flex;
	align-items: center;
	gap: 10px;
}

.lp-gift-card-applied .gift-card-icon {
	font-size: 20px;
	color: #43a047;
}

.lp-gift-card-applied .gift-card-details {
	display: flex;
	flex-direction: column;
}

.lp-gift-card-applied .gift-card-code {
	font-weight: 600;
	color: #2e7d32;
	font-size: 14px;
}

.lp-gift-card-applied .gift-card-balance {
	font-size: 12px;
	color: #558b2f;
}

.lp-gift-card-applied .gift-card-remove {
	background: none;
	border: none;
	color: #c62828;
	cursor: pointer;
	padding: 5px;
	font-size: 16px;
	opacity: 0.7;
	transition: opacity 0.2s;
}

.lp-gift-card-applied .gift-card-remove:hover {
	opacity: 1;
}

/* Price Breakdown - Gift Card Credit Row */
.lp-price-breakdown .gift-card-credit,
.os-price-breakdown-row.gift-card-credit {
	color: #2e7d32;
	font-weight: 500;
}

.lp-price-breakdown .gift-card-credit .row-value,
.os-price-breakdown-row.gift-card-credit .breakdown-value {
	color: #2e7d32;
}

/* Gift Card Input Enhancement */
.lp-coupon-form-wrapper.has-gift-card .lp-coupon-input {
	border-color: #81c784;
	background: #e8f5e9;
}

/* Success/Error Messages */
.lp-gift-card-message {
	padding: 10px 15px;
	border-radius: 6px;
	margin: 10px 0;
	font-size: 14px;
}

.lp-gift-card-message.success {
	background: #e8f5e9;
	border: 1px solid #81c784;
	color: #2e7d32;
}

.lp-gift-card-message.error {
	background: #ffebee;
	border: 1px solid #e57373;
	color: #c62828;
}

/* Gift Card Balance Display */
.lp-gift-card-balance-info {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: #f5f5f5;
	border-radius: 6px;
	font-size: 13px;
	margin-top: 8px;
}

.lp-gift-card-balance-info .balance-label {
	color: #666;
}

.lp-gift-card-balance-info .balance-amount {
	font-weight: 600;
	color: #2e7d32;
}

.lp-gift-card-balance-info .remaining-label {
	color: #888;
	font-size: 12px;
}

/* Animation for applying gift card */
@keyframes lp-gift-card-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(67, 160, 71, 0.4);
	}
	70% {
		box-shadow: 0 0 0 10px rgba(67, 160, 71, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(67, 160, 71, 0);
	}
}

.lp-gift-card-applied.just-applied {
	animation: lp-gift-card-pulse 0.5s ease-out;
}

/* Order Confirmation - Gift Card Info */
.lp-order-confirmation .gift-card-payment-info {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px;
	background: #e8f5e9;
	border-radius: 6px;
	margin: 10px 0;
}

.lp-order-confirmation .gift-card-payment-info .gc-icon {
	font-size: 24px;
	color: #43a047;
}

.lp-order-confirmation .gift-card-payment-info .gc-details {
	flex: 1;
}

.lp-order-confirmation .gift-card-payment-info .gc-code {
	font-weight: 600;
	color: #2e7d32;
}

.lp-order-confirmation .gift-card-payment-info .gc-amount {
	font-size: 13px;
	color: #558b2f;
}

.lp-order-confirmation .gift-card-payment-info .gc-remaining {
	font-size: 12px;
	color: #888;
}

/* ----------------------------------------
   Gift Card Applied Wrapper (New UI)
---------------------------------------- */
.lp-gc-applied-wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
	border: 1px solid #a5d6a7;
	border-radius: 8px;
	margin: 12px 0;
	gap: 10px;
}

.lp-gc-applied-wrapper.lp-gc-just-applied {
	animation: lp-gc-slide-in 0.3s ease-out;
}

@keyframes lp-gc-slide-in {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.lp-gc-applied-wrapper.lp-gc-removing {
	opacity: 0.5;
	pointer-events: none;
}

.lp-gc-applied-info {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
}

.lp-gc-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: #fff;
	border-radius: 50%;
	color: #43a047;
	flex-shrink: 0;
}

.lp-gc-icon svg {
	width: 20px;
	height: 20px;
}

.lp-gc-applied-details {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.lp-gc-applied-label {
	font-size: 11px;
	color: #558b2f;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-weight: 500;
}

.lp-gc-applied-code {
	font-weight: 600;
	color: #2e7d32;
	font-size: 14px;
	font-family: monospace;
	letter-spacing: 0.5px;
}

.lp-gc-remove-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: rgba(255, 255, 255, 0.8);
	border: none;
	border-radius: 50%;
	color: #757575;
	cursor: pointer;
	padding: 0;
	transition: all 0.2s ease;
	flex-shrink: 0;
}

.lp-gc-remove-btn:hover {
	background: #ffebee;
	color: #c62828;
}

.lp-gc-remove-btn svg {
	width: 16px;
	height: 16px;
}

/* Price breakdown gift card row styling */
.summary-price-item-w.spi-positive,
.summary-price-item-w[class*="gift-card"] {
	color: #2e7d32;
}

.summary-price-item-w.spi-positive .spi-price,
.summary-price-item-w[class*="gift-card"] .spi-price {
	color: #2e7d32;
	font-weight: 600;
}

/* ----------------------------------------
   Gift Card Applied Credit (in wrapper)
---------------------------------------- */
.lp-gc-applied-credit {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
	padding-left: 10px;
}

.lp-gc-credit-label {
	font-size: 12px;
	color: #558b2f;
}

.lp-gc-credit-amount {
	font-weight: 700;
	color: #2e7d32;
	font-size: 14px;
}

/* ----------------------------------------
   Gift Card on Verify Step
---------------------------------------- */
.lp-gc-applied-wrapper.lp-gc-on-verify {
	margin: 15px 0;
}

/* ----------------------------------------
   Gift Card Badge in PB Heading
---------------------------------------- */
.lp-gc-heading-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 8px;
	background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
	border: 1px solid #a5d6a7;
	border-radius: 12px;
	font-size: 11px;
	margin-left: auto;
	flex-shrink: 0;
}

.lp-gc-badge-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #43a047;
}

.lp-gc-badge-icon svg {
	width: 12px;
	height: 12px;
}

.lp-gc-badge-code {
	font-weight: 600;
	color: #2e7d32;
	font-family: monospace;
	letter-spacing: 0.3px;
}

.lp-gc-badge-credit {
	font-weight: 700;
	color: #2e7d32;
}

/* Make pb-heading flexible to accommodate the badge */
.summary-price-breakdown-wrapper .pb-heading {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
}

/* ----------------------------------------
   Zero Total Info (when GC covers 100%)
---------------------------------------- */
.lp-gc-zero-total-info {
	padding: 12px 15px;
	background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
	border: 1px solid #a5d6a7;
	border-radius: 8px;
	margin: 10px 0;
}

.lp-gc-zero-message {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #2e7d32;
	font-weight: 500;
	font-size: 14px;
}

.lp-gc-zero-message .lp-gc-badge-icon {
	color: #43a047;
}

/* Responsive */
@media (max-width: 480px) {
	.lp-gift-card-applied {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.lp-gift-card-applied .gift-card-remove {
		align-self: flex-end;
	}

	.lp-gc-applied-wrapper {
		padding: 8px 10px;
		flex-wrap: wrap;
	}

	.lp-gc-icon {
		width: 28px;
		height: 28px;
	}

	.lp-gc-icon svg {
		width: 16px;
		height: 16px;
	}

	.lp-gc-applied-code {
		font-size: 13px;
	}

	.lp-gc-applied-credit {
		width: 100%;
		justify-content: flex-end;
		margin-left: 0;
		padding-left: 0;
		padding-top: 8px;
		border-top: 1px solid rgba(0, 0, 0, 0.1);
	}

	.lp-gc-heading-badge {
		margin-top: 5px;
		margin-left: 0;
	}
}
