/**
 * Styles pour le widget "Code Promo" - Design Ultra Compact
 * Version 4.4 - Coupons très compacts avec hauteur réduite
 */

/* === Widget Principal === */
.mwb-wpr-points-widget {
	background: #ffffff;
	border-radius: 12px;
	padding: 25px;
	margin-bottom: 25px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	border: 1px solid #e5e7eb;
}

/* === Titre === */
.mwb-wpr-points-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px 0;
	font-size: 18px;
	font-weight: 600;
	color: #1f2937;
}

.mwb-wpr-points-title .dashicons {
	color: #8b5cf6;
	font-size: 24px;
	width: 24px;
	height: 24px;
}

/* === Notice date d'expiration === */
.mwb-wpr-expiry-notice {
	background: #fef3c7;
	border: 1px solid #fcd34d;
	border-radius: 8px;
	padding: 12px 15px;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #92400e;
}

.mwb-wpr-expiry-notice .dashicons {
	color: #f59e0b;
	font-size: 18px;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.mwb-wpr-expiry-notice strong {
	font-weight: 700;
}

/* === Container de coupons === */
.mwb-wpr-coupons-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* === Coupon Ticket ULTRA COMPACT === */
.mwb-wpr-ticket-coupon {
	background: #f8f9fa;
	border: 2px solid #dee2e6;
	border-radius: 8px;
	overflow: hidden;
	position: relative;
	cursor: pointer;
	transition: all 0.3s ease;
}

.mwb-wpr-ticket-coupon:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	border-color: #8b5cf6;
}

/* === Coupon Disabled === */
.mwb-wpr-ticket-coupon.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

.mwb-wpr-ticket-coupon.disabled:hover {
	transform: none;
	box-shadow: none;
	border-color: #dee2e6;
}

/* === Bords dentelés (très petits) === */
.mwb-wpr-ticket-coupon::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 100%;
	pointer-events: none;
	z-index: 1;
}

/* === Corps du ticket (ULTRA COMPACT) === */
.mwb-wpr-ticket-body {
	padding: 8px 12px;
	display: flex;
	align-items: center;
	gap: 15px;
	position: relative;
	z-index: 2;
}

/* === Icône (très petite) === */
.mwb-wpr-ticket-icon {
	width: 28px;
	height: 28px;
	background: url(/wp-content/uploads/icone-c.svg) center / contain no-repeat !important;
}

.mwb-wpr-ticket-icon .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: #8b5cf6;
}

/* === Contenu === */
.mwb-wpr-ticket-content {
	flex: 1;
}

.mwb-wpr-ticket-label {
	font-size: 11px;
	color: #6b7280;
	margin-bottom: 2px;
}

.mwb-wpr-ticket-value {
	font-size: 14px;
	margin-top: -10px;
	font-weight: 700;
	color: #1f2937;
	font-family: 'Courier New', monospace;
}

/* === Ligne pointillée === */
.mwb-wpr-ticket-divider {
	height: 1px;
	background: linear-gradient(to right, #dee2e6 50%, transparent 50%);
	background-size: 8px 1px;
	margin: 0 12px;
}

/* === Action en dessous (réduite mais avec plus de padding pour texte long) === */
.mwb-wpr-ticket-action {
	padding: 8px 12px;
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	color: #8b5cf6;
	text-transform: none;
	letter-spacing: 0.3px;
	background: rgba(139, 92, 246, 0.05);
	line-height: 1.4;
}

.mwb-wpr-ticket-coupon.disabled .mwb-wpr-ticket-action {
	color: #ec0000;
	background: #f9fafb;
}

.mwb-wpr-ticket-coupon:hover .mwb-wpr-ticket-action {
	background: rgba(139, 92, 246, 0.1);
}

.mwb-wpr-ticket-coupon.disabled:hover .mwb-wpr-ticket-action {
	background: #f9fafb;
}

/* === Coupon appliqué === */
.mwb-wpr-coupon-applied {
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
	border-radius: 12px;
	padding: 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	color: #ffffff;
}

.mwb-wpr-applied-badge {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
}

.mwb-wpr-applied-badge .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	flex-shrink: 0;
}

.mwb-wpr-applied-text {
	font-size: 15px;
	line-height: 1.4;
}

.mwb-wpr-remove-coupon {
	background: rgba(255, 255, 255, 0.2);
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-radius: 8px;
	color: #ffffff;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

.mwb-wpr-remove-coupon:hover {
	background: rgba(255, 255, 255, 0.3);
	border-color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.mwb-wpr-remove-coupon .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* === Messages === */
.mwb-wpr-points-message {
	margin-top: 15px;
	padding: 12px 15px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
}

.mwb-wpr-points-message.success {
	background: #d1fae5;
	border: 1px solid #6ee7b7;
	color: #065f46;
}

.mwb-wpr-points-message.error {
	background: #fee2e2;
	border: 1px solid #fca5a5;
	color: #991b1b;
}

.mwb-wpr-points-message.info {
	background: #dbeafe;
	border: 1px solid #93c5fd;
	color: #1e40af;
}

/* === États de chargement === */
.mwb-wpr-points-widget.loading {
	opacity: 0.6;
	pointer-events: none;
	position: relative;
}

.mwb-wpr-points-widget.loading::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	border: 4px solid rgba(139, 92, 246, 0.2);
	border-radius: 50%;
	border-top-color: #8b5cf6;
	animation: mwb-wpr-spin 0.8s linear infinite;
	z-index: 10;
}

@keyframes mwb-wpr-spin {
	to { transform: translate(-50%, -50%) rotate(360deg); }
}

.mwb-wpr-ticket-coupon.loading {
	opacity: 0.7;
	cursor: not-allowed;
}

/* === Responsive === */
@media (max-width: 768px) {
	.mwb-wpr-points-widget {
		padding: 20px;
	}

	.mwb-wpr-ticket-value {
		font-size: 13px;
	}

	.mwb-wpr-ticket-body {
		padding: 7px 10px;
	}

	.mwb-wpr-ticket-action {
		padding: 5px 10px;
		font-size: 10px;
	}

	.mwb-wpr-coupon-applied {
		flex-direction: column;
		text-align: center;
	}

	.mwb-wpr-remove-coupon {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.mwb-wpr-ticket-icon {
		width: 24px;
		height: 24px;
	}

	.mwb-wpr-ticket-icon .dashicons {
		font-size: 14px;
		width: 14px;
		height: 14px;
	}

	.mwb-wpr-ticket-value {
		font-size: 12px;
	}

	.mwb-wpr-ticket-label {
		font-size: 10px;
	}
}
