/**
 * Teydea Admin design tokens
 *
 * The values of the Teydea Admin design system. The accent always follows the user's admin
 * color scheme. Where WordPress 7.0 defines a `--wpds-*` color for the same role, that color
 * is used, and the fixed value behind it is what WordPress 6.8 and 6.9 get, so the layout
 * and the contrast are the same on every supported version.
 */

/**
 * Colors
 */
$tsc-surface: var(--wpds-color-background-surface-neutral, #fff);
$tsc-ink: var(--wpds-color-foreground-content-neutral, #1e1e1e);
$tsc-ink-muted: var(--wpds-color-foreground-content-neutral-weak, #757575);
$tsc-border: var(--wpds-color-stroke-surface-neutral, #e0e0e0);
$tsc-hairline: #f0f0f0;
$tsc-surface-hover: #f8f8f8;
$tsc-surface-sunken: #f8f8f8;
$tsc-surface-preview: #f4f4f4;
$tsc-field-border: #949494;

$tsc-accent: var(--wp-admin-theme-color, #3858e9);
$tsc-accent-hover: var(--wp-admin-theme-color-darker-10, #183ad6);
$tsc-accent-pressed: var(--wp-admin-theme-color-darker-20, #132ea8);
$tsc-accent-subtle: #eef1fd;
$tsc-accent-ink: #2a44c4;

// Core's success text colors are nearly black (`--wpds-color-foreground-content-success`) or, under the
// pale success ground, short of 4.5:1 (`-weak`, 4.3:1). This green is 5.3:1 there.
$tsc-success: #007017;
// Not core's `--wpds-color-background-surface-success-weak` (#ebffed): on a white card that ground is barely visible. Under success text, 5.3:1.
$tsc-success-subtle: #d7f2dc;
// The `-weak` text colors are the colored ones; the others are nearly black from WordPress 7.0.
$tsc-warning-ink: var(--wpds-color-foreground-content-warning-weak, #926300);
$tsc-warning-icon: #8a5a00;
$tsc-warning-subtle: var(--wpds-color-background-surface-warning-weak, #fff7e1);
$tsc-warning-border: #e5c45c;

// The PRO mark's ground, always under ink text and icon (9.9:1), never used as a text color.
$tsc-pro-gold: #e9b949;
$tsc-error: var(--wpds-color-foreground-content-error-weak, #cc1818);
$tsc-error-subtle: var(--wpds-color-background-surface-error-weak, #fff6f5);

/**
 * Type
 */
$tsc-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

/**
 * Spacing, on a 4 px base; 24 px is the panel's inner edge every region starts on
 */
$tsc-space-1: 4px;
$tsc-space-2: 8px;
$tsc-space-3: 12px;
$tsc-space-4: 16px;
$tsc-space-5: 20px;
$tsc-space-6: 24px;
$tsc-space-8: 32px;
$tsc-space-10: 40px;

/**
 * Corners
 */
$tsc-radius-md: 6px;
$tsc-radius-lg: 8px;
// Core's own panel corner: WordPress 7.1 gives it the `--wpds-border-radius-xl` token (12 px), and 7.0, which has no such token, draws it at 8 px.
$tsc-radius-panel: var(--wpds-border-radius-xl, 8px);
$tsc-radius-pill: 999px;

/**
 * Shadows, only for what floats over the content
 */
$tsc-shadow-popover: 0 10px 30px rgba(0, 0, 0, 0.12);
$tsc-shadow-drawer: -12px 0 32px rgba(0, 0, 0, 0.08);
$tsc-shadow-drag: 0 12px 28px rgba(0, 0, 0, 0.16);

/**
 * Sizes
 */
$tsc-touch-target: 44px;
// How wide a column of choices and the cards around it run, so that their edges line up.
$tsc-form-width: 620px;
$tsc-subnav-width: 260px;
$tsc-side-card-width: 300px;
$tsc-help-panel-width: 400px;

/**
 * The width at and below which WordPress switches the admin to its narrow layout
 */
$tsc-narrow-breakpoint: 782px;

/**
 * Text that only screen readers read
 */
@mixin tsc-visually-hidden {
	border: 0;
	clip: rect(0 0 0 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

/**
 * Section overline: small, semibold and uppercase by CSS, written in sentence case
 */
@mixin tsc-overline {
	color: $tsc-ink-muted;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 16px;
	text-transform: uppercase;
}
