/*
 * Badge trạng thái license — dùng chung trang admin (SMT License) và tab
 * "License của tôi" phía khách hàng (WooCommerce My Account).
 */

.smt-license-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
}

.smt-license-badge--pending {
	background: #e2e8f0;
	color: #334155;
}

.smt-license-badge--active {
	background: #d4edda;
	color: #14532d;
}

.smt-license-badge--expiring {
	background: #fff3cd;
	color: #7a4d00;
}

.smt-license-badge--expired {
	background: #fecaca;
	color: #991b1b;
}

.smt-license-badge--revoked {
	background: #f8d7da;
	color: #7a1420;
}

.smt-license-badge--subscription {
	background: #e2e8f0;
	color: #334155;
}

.smt-license-badge--lifetime {
	background: #dbeafe;
	color: #1e3a8a;
}

/* Bảng admin: căn giữa theo chiều dọc, license key dễ đọc hơn. */
.wp-list-table .column-status {
	white-space: nowrap;
}

.wp-list-table td code {
	font-size: 13px;
}

/* Tab "License của tôi" phía khách hàng. */
.smt-license-my-account table.smt-license-table {
	width: 100%;
	border-collapse: collapse;
}

.smt-license-my-account table.smt-license-table th,
.smt-license-my-account table.smt-license-table td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid #e2e2e2;
}

.smt-license-my-account .smt-license-empty {
	padding: 16px 0;
	color: #666;
}

/* Gợi ý số lượng = số domain, trang chi tiết sản phẩm lifetime. */
.smt-license-quantity-hint {
	padding: 8px 12px;
	margin: 0 0 12px;
	background: #eff6ff;
	border-left: 3px solid #1e3a8a;
	font-size: 13px;
}

.smt-license-badge--trial {
	background: #ede9fe;
	color: #4c1d95;
}

.smt-license-badge--flagged {
	background: #7a1420;
	color: #fff;
	margin-left: 4px;
}

/* Danh sách admin: key hiện dạng che, bấm mới mở key đầy đủ. */
.smt-license-key summary {
	cursor: pointer;
	list-style: none;
}

.smt-license-key[open] summary {
	margin-bottom: 4px;
}

/* Card catalog — thắng .form-table / Woo admin (label mặc định bị wrap hẹp). */
.form-table fieldset.smt-license-type-radios,
fieldset.smt-license-type-radios {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.form-table fieldset.smt-license-type-radios label.smt-license-type-option,
fieldset.smt-license-type-radios label.smt-license-type-option {
	display: flex !important;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: 12px;
	width: auto;
	min-width: 22rem;
	max-width: 28rem;
	margin: 0;
	padding: 14px 18px 14px 16px;
	border: 1px solid #d0d5dd;
	border-radius: 12px;
	background: #fff;
	line-height: 1.35;
	cursor: pointer;
	box-sizing: border-box;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	float: none;
}

.form-table fieldset.smt-license-type-radios label.smt-license-type-option:hover,
fieldset.smt-license-type-radios label.smt-license-type-option:hover {
	border-color: #98a2b3;
}

.form-table fieldset.smt-license-type-radios label.smt-license-type-option:focus-within,
fieldset.smt-license-type-radios label.smt-license-type-option:focus-within {
	border-color: #0f4c81;
	box-shadow: 0 0 0 1px #0f4c81;
}

.form-table fieldset.smt-license-type-radios label.smt-license-type-option:has(input:checked),
fieldset.smt-license-type-radios label.smt-license-type-option:has(input:checked) {
	border-color: #0f4c81;
	background: #f4f8fc;
	box-shadow: 0 0 0 1px #0f4c81;
}

.form-table fieldset.smt-license-type-radios label.smt-license-type-option--internal:has(input:checked),
fieldset.smt-license-type-radios label.smt-license-type-option--internal:has(input:checked) {
	border-color: #50575e;
	background: #f6f7f7;
	box-shadow: 0 0 0 1px #50575e;
}

.form-table fieldset.smt-license-type-radios label.smt-license-type-option input[type="radio"],
fieldset.smt-license-type-radios label.smt-license-type-option input[type="radio"] {
	margin: 3px 0 0;
	flex: 0 0 auto;
	align-self: flex-start;
}

.form-table fieldset.smt-license-type-radios .smt-license-type-option__text,
fieldset.smt-license-type-radios .smt-license-type-option__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	min-width: 0;
	flex: 1 1 auto;
	text-align: left;
}

.form-table fieldset.smt-license-type-radios .smt-license-type-option__title,
fieldset.smt-license-type-radios .smt-license-type-option__title {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
	white-space: nowrap;
}

.form-table fieldset.smt-license-type-radios .smt-license-type-option__hint,
fieldset.smt-license-type-radios .smt-license-type-option__hint {
	display: block;
	font-size: 12px;
	font-weight: 400;
	color: #667085;
	white-space: normal;
}

/* Trang Bảo mật: bảng khóa ký, khối hướng dẫn. */
.smt-license-security pre {
	padding: 10px 12px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	overflow-x: auto;
	white-space: pre;
}

.smt-license-security .smt-license-callout {
	padding: 10px 14px;
	margin: 0 0 14px;
	background: #fffbea;
	border-left: 3px solid #b45309;
}
