/**
 * Frontend styles.
 *
 * My Account → License keys endpoint.
 *
 * @since 1.0.0
 */

/* ---------- Product sections ---------- */
.lm-myaccount-license-keys .lm-license-product {
	margin-bottom: 32px;
}

.lm-myaccount-license-keys .lm-license-product__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.lm-myaccount-license-keys .lm-license-product__title {
	margin: 0;
	font-size: 1.1em;
}

.lm-myaccount-license-keys .lm-license-product__title a {
	text-decoration: none;
}

.lm-myaccount-license-keys .lm-license-product__count {
	font-size: 0.8em;
	color: #777;
	white-space: nowrap;
}

/* ---------- Table ---------- */
.lm-myaccount-license-keys .lm-license-table {
	border: 1px solid #e4e6eb;
	border-radius: 10px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	width: 100%;
}

.lm-myaccount-license-keys .lm-license-table th {
	background: #f7f8fa;
	font-size: 0.78em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #555;
	padding: 10px 14px;
}

.lm-myaccount-license-keys .lm-license-table td {
	padding: 12px 14px;
	vertical-align: middle;
	border-top: 1px solid #eef0f3;
}

.lm-myaccount-license-keys .lm-license-table tbody tr:hover td {
	background: #fafbfc;
}

/* ---------- License key + copy ---------- */
.lm-myaccount-license-keys .lm-license-key-wrap {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.lm-myaccount-license-keys .lm-license-key {
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 4px 8px;
	font-size: 0.85em;
	letter-spacing: 0.03em;
	white-space: nowrap;
}

.lm-myaccount-license-keys .lm-copy-key {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 9px;
	font-size: 0.75em;
	font-weight: 600;
	line-height: 1.4;
	color: #555;
	background: #fff;
	border: 1px solid #d8dbe0;
	border-radius: 6px;
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.lm-myaccount-license-keys .lm-copy-key:hover {
	color: #1d2327;
	border-color: #b6bcc4;
	background: #f7f8fa;
}

.lm-myaccount-license-keys .lm-copy-key.is-copied {
	color: #0a7d43;
	border-color: #9fd8bb;
	background: #effaf4;
}

/* ---------- Status badges ---------- */
.lm-myaccount-license-keys .lm-license-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.75em;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
}

.lm-myaccount-license-keys .lm-license-badge--active {
	background: #e7f7ee;
	color: #0a7d43;
}

.lm-myaccount-license-keys .lm-license-badge--expired {
	background: #fdeceb;
	color: #b42318;
}

.lm-myaccount-license-keys .lm-license-badge--info {
	background: #e8f1fd;
	color: #1d4ed8;
}

.lm-myaccount-license-keys .lm-license-badge--idle {
	background: #f1f2f4;
	color: #5d6470;
}

.lm-myaccount-license-keys .lm-license-expired-date {
	color: #b42318;
}

/* ---------- Actions ---------- */
.lm-myaccount-license-keys .lm-license-order-link {
	font-size: 0.85em;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.lm-myaccount-license-keys .lm-license-actions {
	text-align: right;
}

.lm-myaccount-license-keys td.lm-license-actions {
	display: table-cell;
}

.lm-myaccount-license-keys .lm-license-actions .lm-license-renew + .lm-license-order-link {
	display: inline-block;
	margin-top: 8px;
}

.lm-myaccount-license-keys .lm-license-renew {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 8px;
	background: #4f46e5;
	color: #fff;
	font-size: 0.85em;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s ease;
}

.lm-myaccount-license-keys .lm-license-renew:hover,
.lm-myaccount-license-keys .lm-license-renew:focus {
	background: #4338ca;
	color: #fff;
}

.lm-myaccount-license-keys .lm-license-renew svg {
	flex-shrink: 0;
}

/* ---------- Empty state ---------- */
.lm-license-empty {
	text-align: center;
	padding: 48px 24px;
	border: 1px dashed #d8dbe0;
	border-radius: 12px;
	color: #98a0ab;
}

.lm-license-empty__title {
	margin: 12px 0 4px;
	font-size: 1.05em;
	font-weight: 600;
	color: #3c434a;
}

.lm-license-empty__text {
	margin: 0 0 18px;
	font-size: 0.9em;
}

/* ---------- Mobile (WooCommerce responsive table) ---------- */
@media screen and (max-width: 768px) {
	.lm-myaccount-license-keys .lm-license-table td {
		border-top: 0;
	}

	.lm-myaccount-license-keys .lm-license-table tbody tr {
		border-top: 1px solid #eef0f3;
	}

	.lm-myaccount-license-keys .lm-license-actions {
		text-align: left;
	}
}
