@use "../teydea-admin" as *;

/**
 * Status label
 */
.tsc-status-label {
	align-items: center;
	align-self: flex-start;
	border: 1px solid transparent;
	border-radius: $tsc-radius-pill;
	box-sizing: border-box;
	display: inline-flex;
	flex: none;
	font-size: 11px;
	font-weight: 600;
	height: 20px;
	line-height: 1;
	padding: 0 7px;
	white-space: nowrap;

	&--large {
		font-size: 12px;
		height: 22px;
		padding: 0 8px;
	}

	&--neutral {
		background: $tsc-hairline;
		color: $tsc-ink;
	}

	&--success {
		background: $tsc-success-subtle;
		color: $tsc-success;
	}

	&--accent {
		background: $tsc-accent-subtle;
		color: $tsc-accent-ink;
	}

	&--outline {
		background: $tsc-surface;
		border-color: $tsc-border;
		color: $tsc-ink;
	}

	&--pro {
		background: $tsc-pro-gold;
		color: $tsc-ink;
		font-weight: 700;
		gap: 3px;
		padding-left: 5px;

		// The system font's bold capitals rise above its cap-height metric, so trimmed to it "PRO" sat about a pixel higher than the crown beside it.
		.tsc-status-label__text {
			translate: 0 0.06em;
		}
	}

	&--with-dot {
		gap: 6px;
		padding-left: 7px;
	}

	&__dot {
		background: currentColor;
		border-radius: 50%;
		flex: none;
		height: 7px;
		width: 7px;
	}

	&__crown {
		flex: none;
	}

	// A line box is taller than the capitals and sits them low; trimmed to the capitals, the words center in the label.
	&__text {
		text-box: trim-both cap alphabetic;
	}

	&--error {
		background: $tsc-error-subtle;
		color: $tsc-error;
	}

	&--warning {
		background: $tsc-warning-subtle;
		color: $tsc-warning-ink;
	}
}
