/* Checkout coupon picker — aligned with zalo SelectCouponPopup */
.yk-coupon-picker-layer.layui-layer {
	border-radius: 12px;
	display: flex !important;
	flex-direction: column !important;
	max-height: 90vh !important;
	overflow: hidden !important;
	box-sizing: border-box;
}

/* PC / 平板宽屏：水平居中（layui 默认 margin-left 负半宽，勿置 0） */
@media (min-width: 769px) {
	.yk-coupon-picker-layer.layui-layer {
		width: 520px !important;
		max-width: 92vw !important;
		left: 50% !important;
		right: auto !important;
		margin-left: calc(min(520px, 92vw) / -2) !important;
		transform: none !important;
	}
}
.yk-coupon-picker-layer .layui-layer-title {
	flex-shrink: 0;
	font-size: 16px;
	font-weight: 600;
	text-align: center;
	padding: 14px 40px 12px;
	border-bottom: none;
	background: #fff;
}
.yk-coupon-picker-layer .layui-layer-content {
	flex: 1 1 auto;
	min-height: 0;
	padding: 0;
	max-height: none !important;
	height: auto !important;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.yk-coupon-picker-layer .layui-layer-btn {
	flex-shrink: 0;
	position: relative;
	padding: 10px 16px 16px;
	border-top: 1px solid #f0f0f0;
	text-align: center;
	background: #fff;
}
.yk-coupon-picker-layer .layui-layer-btn a {
	float: none;
	display: block;
	width: 100%;
	margin: 0;
	text-align: center;
	box-sizing: border-box;
}
.yk-coupon-picker-layer .layui-layer-btn0 {
	height: 44px;
	line-height: 44px;
	padding: 0;
	border-radius: 8px;
	background: linear-gradient(90deg, #ff8a4c 0%, #f53b25 100%) !important;
	border: none !important;
	color: #fff !important;
	font-size: 15px;
	font-weight: 600;
}

.yk-coupon-picker {
	padding: 12px 14px 4px;
	background: #f7f7f7;
}

.yk-recharge-record-list {
	padding: 12px 14px 4px;
	background: #f7f7f7;
	max-height: calc(78vh - 120px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.yk-recharge-record-list .order-detail-item .pull-right {
	max-width: 58%;
	text-align: right;
	word-break: break-word;
}
.yk-coupon-picker .yk-cp-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.yk-cp-skip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	border-radius: 8px;
	background: #fff;
	border: 2px solid #eee;
	box-sizing: border-box;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s;
}
.yk-cp-skip.selected {
	border-color: #f53b25;
	background: #fde7d5;
}
.yk-cp-skip .yk-cp-skip-label {
	font-size: 14px;
	color: #333;
}
.yk-cp-skip .yk-cp-check {
	flex-shrink: 0;
}

.yk-cp-item {
	position: relative;
	border-radius: 8px;
	background: #fde7d5;
	border: 2px solid transparent;
	box-sizing: border-box;
	overflow: hidden;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.yk-cp-item.selected {
	border-color: #f53b25;
	box-shadow: 0 0 0 1px rgba(245, 59, 37, 0.12);
}
.yk-cp-item.disabled {
	opacity: 0.72;
	filter: grayscale(0.08);
	cursor: not-allowed;
}

.yk-cp-header {
	padding: 8px 10px 0;
	min-height: 26px;
}
.yk-cp-type-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	font-size: 11px;
	line-height: 1.3;
	color: #fff;
	background: linear-gradient(90deg, #ff8a4c 0%, #f53b25 100%);
	border-radius: 8px 0 8px 0;
	max-width: 100%;
}
.yk-cp-type-badge .yk-cp-stackable {
	padding: 0 4px;
	font-size: 10px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.25);
	white-space: nowrap;
}

.yk-cp-main {
	display: flex;
	align-items: stretch;
	min-height: 96px;
	padding-bottom: 8px;
}
.yk-cp-left {
	width: 10px;
	flex-shrink: 0;
	background-color: #fde7d5;
	background-image: url("/img/coupon_bg_left.png");
	background-size: 100% 100%;
	background-repeat: no-repeat;
}
.yk-cp-center {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	padding: 6px 8px 0;
	background-color: #fde7d5;
	background-image: url("/img/coupon_bg_main.png");
	background-size: 100% 100%;
	background-repeat: repeat-x;
}
.yk-cp-price {
	display: flex;
	align-items: baseline;
	gap: 2px;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.1;
	color: #f53b25;
}
.yk-cp-price .yk-cp-unit {
	font-size: 14px;
	font-weight: 500;
}
.yk-cp-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.yk-cp-meta-line {
	font-size: 11px;
	line-height: 1.35;
	color: #999;
	word-break: break-word;
}
.yk-cp-right {
	position: relative;
	width: 72px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #fde7d5;
	background-image: url("/img/coupon_bg_right.png");
	background-size: 100% 100%;
	background-repeat: no-repeat;
}

.yk-cp-check {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid #ccc;
	box-sizing: border-box;
	background: transparent;
	transition: background-color 0.2s, border-color 0.2s;
}
.yk-cp-skip .yk-cp-check.active {
	border-color: #f53b25;
	background: #f53b25;
}
.yk-cp-skip .yk-cp-check.active::after,
.yk-cp-right .yk-cp-check.active::after {
	content: "\2713";
	display: block;
	font-size: 12px;
	font-weight: 700;
	line-height: 14px;
	text-align: center;
	color: #fff;
}
.yk-cp-right .yk-cp-check {
	border-color: rgba(255, 255, 255, 0.85);
}
.yk-cp-right .yk-cp-check.active {
	background: #fff;
	border-color: #fff;
}
.yk-cp-right .yk-cp-check.active::after {
	color: #f53b25;
	line-height: 16px;
}

.yk-cp-reason {
	padding: 8px 12px 10px;
	font-size: 11px;
	line-height: 1.45;
	color: #f53b25;
	word-break: break-word;
	background: rgba(245, 59, 37, 0.06);
	border-top: 1px dashed rgba(245, 59, 37, 0.25);
}

/* 手机端：底部全宽抽屉，避免 60% 宽度过窄 */
@media (max-width: 768px) {
	.yk-coupon-picker-layer.layui-layer {
		width: 100% !important;
		max-width: 100% !important;
		left: 0 !important;
		right: 0 !important;
		transform: none;
		margin-left: 0 !important;
		border-radius: 16px 16px 0 0;
	}
	.yk-coupon-picker-layer .layui-layer-title {
		font-size: 17px;
		padding: 16px 44px 14px;
	}
	.yk-coupon-picker-layer.layui-layer {
		max-height: 78vh !important;
	}
	.yk-coupon-picker-layer .layui-layer-content {
		max-height: none !important;
	}
	.yk-coupon-picker {
		padding: 14px 16px 8px;
	}
	.yk-cp-skip {
		padding: 16px 18px;
	}
	.yk-cp-skip .yk-cp-skip-label {
		font-size: 15px;
	}
	.yk-cp-main {
		min-height: 104px;
	}
	.yk-cp-type-badge {
		font-size: 12px;
		padding: 3px 10px;
	}
	.yk-cp-price {
		font-size: 32px;
	}
	.yk-cp-price .yk-cp-unit {
		font-size: 16px;
	}
	.yk-cp-meta-line {
		font-size: 12px;
	}
	.yk-cp-right {
		width: 56px;
	}
	.yk-cp-check {
		width: 22px;
		height: 22px;
	}
	.yk-coupon-picker-layer .layui-layer-btn0 {
		height: 48px;
		line-height: 48px;
		font-size: 16px;
	}
}
