/**
 * DPP Frontend Styles
 *
 * @package WooCommerce_Prevent_Duplicate_Purchases
 */

.dpp-alert-box {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 18px;
	margin: 18px 0;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
	transition: all 0.25s ease-in-out;
}

/* Notice & Confirm Mode: warm amber */
.dpp-alert-box.dpp-mode-confirm,
.dpp-alert-box.dpp-mode-notice {
	background-color: #fff9e6;
	border: 1px solid #ffd875;
	color: #7a5200;
}

.dpp-alert-box.dpp-mode-confirm .dpp-alert-icon svg,
.dpp-alert-box.dpp-mode-notice .dpp-alert-icon svg {
	stroke: #d97706;
}

/* Block Mode: alert red */
.dpp-alert-box.dpp-mode-block {
	background-color: #fef2f2;
	border: 1px solid #fca5a5;
	color: #991b1b;
}

.dpp-alert-box.dpp-mode-block .dpp-alert-icon svg {
	stroke: #dc2626;
}

.dpp-alert-icon {
	flex-shrink: 0;
	margin-top: 2px;
}

.dpp-alert-content {
	flex-grow: 1;
}

.dpp-alert-message {
	margin-bottom: 8px;
}

.dpp-alert-message strong {
	font-weight: 600;
	color: inherit;
}

.dpp-alert-message a.dpp-order-link {
	display: inline-block;
	margin-left: 6px;
	color: #2563eb;
	text-decoration: underline;
	font-weight: 500;
	transition: color 0.15s ease;
}

.dpp-alert-message a.dpp-order-link:hover {
	color: #1d4ed8;
	text-decoration: none;
}

/* Confirmation Checkbox Styling */
.dpp-confirm-wrap {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed rgba(0, 0, 0, 0.12);
}

.dpp-confirm-label {
	display: flex !important;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-weight: 600;
	font-size: 14px;
	user-select: none;
	color: #374151;
}

.dpp-confirm-label input[type="checkbox"] {
	width: 18px !important;
	height: 18px !important;
	cursor: pointer;
	margin: 0 !important;
	accent-color: #2563eb;
}

/* Checkout Confirmation Box */
.dpp-checkout-confirm-box {
	background-color: #fff9e6;
	border: 1px solid #ffd875;
	border-radius: 6px;
	padding: 14px 16px;
	margin: 15px 0;
}

.dpp-checkout-notice-text {
	font-size: 13px;
	color: #7a5200;
	margin-bottom: 10px;
	line-height: 1.4;
}

.dpp-checkout-notice-text strong {
	display: block;
	font-weight: 600;
	margin-bottom: 3px;
}

.dpp-checkout-confirm-label {
	display: flex !important;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-weight: 600;
	color: #854d0e;
	font-size: 14px;
}

.dpp-checkout-confirm-label input[type="checkbox"] {
	width: 18px !important;
	height: 18px !important;
	margin: 0 !important;
	accent-color: #2563eb;
}

/* Disabled add to cart state for Block Mode */
.single_add_to_cart_button.dpp-disabled {
	opacity: 0.55 !important;
	cursor: not-allowed !important;
	pointer-events: none !important;
}

.dpp-error-highlight {
	display: block;
	margin-top: 4px;
	font-weight: 600;
	color: #b91c1c;
}

.dpp-cart-notice {
	margin-bottom: 20px !important;
}

/* Shake animation on unconfirmed submit */
@keyframes dpp-shake {
	0%, 100% { transform: translateX(0); }
	15%, 45%, 75% { transform: translateX(-6px); }
	30%, 60%, 90% { transform: translateX(6px); }
}

.dpp-shake {
	animation: dpp-shake 0.5s ease-in-out;
	border-color: #ef4444 !important;
	box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}

