/*
 * ClarkConnect design tokens — public MFE contract, and the one token source for every surface.
 *
 * Served at _content/ClarkConnect.Styles/css/cc-tokens.css and linked first by Host (both the
 * static-SSR shell and the /{view} MFE-document pipeline), VendorAdmin.Client, and Admin.Client
 * (which re-points a few in admin-spot.css). MFE HTML inherits these :root vars; the only other
 * ClarkConnect CSS reaching MFE content is the cc-base layer. See docs/mfe-authoring-guide.md →
 * "Design tokens".
 *
 * Naming: every token is named EXACTLY what the Figma "Clark Connect Design System" file calls it
 * (bare camelCase, e.g. colorPrimaryBg, borderRadiusLG, controlHeightSM) — copy the name straight
 * out of the Figma inspector, no translation needed. No "cc-" prefix and no kebab-casing: this is a
 * deliberate departure from ClarkConnect's other CSS (which is kebab-case) so the token layer reads
 * as a 1:1 mirror of the design-system export. One deliberate exception: the Spacing scale uses
 * "spacing" (Figma's group name), not "padding"/"margin" (Figma's two value-identical leaf-name
 * families) — neither leaf name fits both the padding and margin/gap uses this scale has here.
 * Organization: sectioned and ordered to match Figma's own grouping (Colors/Base, Colors/Brand/*,
 * Typography, Border Radius, Size, Spacing) — same section order Figma's variables panel uses.
 * Figma's Components/* tree (790 tokens, ~90% of it Ant Design's own per-component seed-value
 * duplication) is deliberately NOT mirrored here; every token below comes from Colors, Typography,
 * Border Radius, Size, or Spacing.
 * Aliasing: exactly like Figma itself, every Colors/Brand/* semantic token points at its Colors/Base
 * ramp step via var() (e.g. colorPrimary: var(--clarkGreen6)) rather than repeating the hex — the
 * ramp swatch is the one place a color value is a literal. A "ClarkConnect addition" whose value
 * happens to equal a ramp step does the same; one that doesn't is commented "No ramp match."
 * A handful of tokens have no Figma source at all (brand-lockup colors, shadows, gradients, icon
 * sizes) — each is called out inline as "custom" and grouped in its own trailing block per family,
 * so the Figma-sourced sections stay a clean, honest mirror.
 * Stability: token names are the contract — hex values may shift with brand
 * refreshes, but a MFE that styles to var(--colorPrimary) keeps tracking the brand.
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');
/* Poppins is only for the Clark-logo/vendor brand lockup text, styled in cc-chrome.css —
   everything else stays on DM Sans above. */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap');

:root {
    /* ============================================================
       Colors / Base — Figma's 14 raw ramps, 1 (lightest) to 10 (darkest).
       Figma's own swatch name is a bare "1".."10" (not a valid CSS ident alone), so the ramp name
       is prefixed. Escape hatch for a one-off shade the semantic tokens below don't cover; prefer a
       semantic color token when one already exists — these are not meant to replace it.
       ============================================================ */
    --clarkGreen1: #DFEEEC;
    --clarkGreen2: #B0D6D0;
    --clarkGreen3: #80BCB1;
    --clarkGreen4: #53A294;
    --clarkGreen5: #388F7F;
    --clarkGreen6: #206152;
    --clarkGreen7: #1C5245;
    --clarkGreen8: #15372C;
    --clarkGreen9: #112C23;
    --clarkGreen10: #0F271F;

    --blue1: #E6F2FA;
    --blue2: #C2DFF3;
    --blue3: #91C5EA;
    --blue4: #5EAAE1;
    --blue5: #2E90D8;
    --blue6: #0078CF;
    --blue7: #0066B0;
    --blue8: #005593;
    --blue9: #004476;
    --blue10: #00365D;

    --gray1: #FFFFFF;
    --gray2: #F2F2F2;
    --gray3: #EBEBEB;
    --gray4: #E6E6E6;
    --gray5: #D9D9D9;
    --gray6: #BFBFBF;
    --gray7: #8C8C8C;
    --gray8: #595959;
    --gray9: #434343;
    --gray10: #262626;

    --green1: #F6FFED;
    --green2: #D9F7BE;
    --green3: #B7EB8F;
    --green4: #95DE64;
    --green5: #52C41A;
    --green6: #389E0D;
    --green7: #237804;
    --green8: #135200;
    --green9: #092B00;
    --green10: #061D00;

    --gold1: #FFFBE6;
    --gold2: #FFF1B8;
    --gold3: #FFE58F;
    --gold4: #FFD666;
    --gold5: #FFC53D;
    --gold6: #FAAD14;
    --gold7: #D48806;
    --gold8: #AD6800;
    --gold9: #874D00;
    --gold10: #613400;

    --red1: #FFF1F0;
    --red2: #FFCCC7;
    --red3: #FFA39E;
    --red4: #FF7875;
    --red5: #FF4D4F;
    --red6: #EA0B16;
    --red7: #B2101D;
    --red8: #890615;
    --red9: #61000F;
    --red10: #3D000B;

    --purple1: #F9F0FF;
    --purple2: #EFDBFF;
    --purple3: #D3ADF7;
    --purple4: #B37FEB;
    --purple5: #9254DE;
    --purple6: #722ED1;
    --purple7: #531DAB;
    --purple8: #391085;
    --purple9: #22075E;
    --purple10: #120338;

    --cyan1: #E6FFFB;
    --cyan2: #B5F5EC;
    --cyan3: #87E8DE;
    --cyan4: #5CDBD3;
    --cyan5: #36CFC9;
    --cyan6: #13C2C2;
    --cyan7: #08979C;
    --cyan8: #006D75;
    --cyan9: #00474F;
    --cyan10: #002329;

    --magenta1: #FFF0F6;
    --magenta2: #FFD6E7;
    --magenta3: #FFADD2;
    --magenta4: #FF85C0;
    --magenta5: #F759AB;
    --magenta6: #EB2F96;
    --magenta7: #C41D7F;
    --magenta8: #9E1068;
    --magenta9: #780650;
    --magenta10: #520339;

    --orange1: #FFF7E6;
    --orange2: #FFE7BA;
    --orange3: #FFD591;
    --orange4: #FFC069;
    --orange5: #FFA940;
    --orange6: #FA8C16;
    --orange7: #D46B08;
    --orange8: #AD4E00;
    --orange9: #873800;
    --orange10: #612500;

    --yellow1: #FEFFE6;
    --yellow2: #FFFFB8;
    --yellow3: #FFFB8F;
    --yellow4: #FFF566;
    --yellow5: #FFEC3D;
    --yellow6: #FADB14;
    --yellow7: #D4B106;
    --yellow8: #AD8B00;
    --yellow9: #876800;
    --yellow10: #614700;

    --volcano1: #FFF2E8;
    --volcano2: #FFD8BF;
    --volcano3: #FFBB96;
    --volcano4: #FF9C6E;
    --volcano5: #FF7A45;
    --volcano6: #FA541C;
    --volcano7: #D4380D;
    --volcano8: #AD2102;
    --volcano9: #871400;
    --volcano10: #610B00;

    --geekblue1: #F0F5FF;
    --geekblue2: #D6E4FF;
    --geekblue3: #ADC6FF;
    --geekblue4: #85A5FF;
    --geekblue5: #597EF7;
    --geekblue6: #2F54EB;
    --geekblue7: #1D39C4;
    --geekblue8: #10239E;
    --geekblue9: #061178;
    --geekblue10: #030852;

    --lime1: #FCFFE6;
    --lime2: #F4FFB8;
    --lime3: #EAFF8F;
    --lime4: #D3F261;
    --lime5: #BAE637;
    --lime6: #A0D911;
    --lime7: #7CB305;
    --lime8: #5B8C00;
    --lime9: #3F6600;
    --lime10: #254000;

    /* ============================================================
       Colors / Brand / Primary — full 11-token family, Figma's own display order.
       colorPrimary points at colorPrimaryBase, not the ramp directly, exactly like Figma's own
       alias chain (colorPrimary -> colorPrimaryBase -> Base ramp) — same pattern below for every
       family that has a "Base" token.
       ============================================================ */
    --colorPrimary: var(--colorPrimaryBase);
    --colorPrimaryBg: var(--clarkGreen1);
    --colorPrimaryBgHover: var(--clarkGreen2);
    --colorPrimaryBorder: var(--clarkGreen3);
    --colorPrimaryBorderHover: var(--clarkGreen4);
    --colorPrimaryBorderActive: var(--clarkGreen5);
    --colorPrimaryBase: var(--clarkGreen6);
    --colorPrimaryHover: var(--clarkGreen7);
    --colorPrimaryActive: var(--clarkGreen8);
    --colorPrimaryText: var(--clarkGreen9);
    --colorPrimaryTextHover: var(--clarkGreen10);

    /* ============================================================
       Colors / Brand / Text and Background — full 16-token family, Figma's own display order.
       ============================================================ */
    --colorBgContainer: #F5F8F8;
    /* No base-ramp match — a bespoke value, not a ramp step. */
    --colorFill: var(--gray1);
    --colorFillSecondary: var(--gray2);
    --colorFillTertiary: var(--gray3);
    --colorBorderSecondary: var(--gray4);
    --colorBorder: var(--gray5);
    --colorTextDisabled: var(--gray6);
    --colorTextPlaceholder: var(--gray7);
    --colorTextDescription: var(--gray8);
    --colorText: var(--gray10);
    --colorTextLight: var(--gray1);
    --colorIcon: var(--gray7);
    --colorIconHover: var(--gray8);
    /* gray10 (#262626) at 50% opacity — Figma's own colorBgMask is opaque; the alpha is our overlay
       composition, so this stays a literal rather than a var() (CSS relative-color syntax needed
       to derive it from gray10 isn't broadly supported enough for this contract yet). */
    --colorBgMask: rgba(38, 38, 38, 0.5);
    /* Tooltip/panel background — was miscited to the (now out-of-scope) Components/Form/colorText path. */
    --colorBgSpotlight: var(--gray9);
    --colorFillDisabled: var(--gray3);

    /* ============================================================
       Colors / Brand / Success — full 11-token family, Figma's own display order.
       ============================================================ */
    --colorSuccess: var(--colorSuccessBase);
    --colorSuccessBg: var(--green1);
    --colorSuccessBgHover: var(--green2);
    --colorSuccessBorder: var(--green3);
    --colorSuccessBorderHover: var(--green4);
    --colorSuccessBorderActive: var(--green5);
    --colorSuccessBase: var(--green6);
    --colorSuccessHover: var(--green7);
    --colorSuccessActive: var(--green8);
    --colorSuccessText: var(--green9);
    --colorSuccessTextHover: var(--green10);

    /* ============================================================
       Colors / Brand / Warning — full 11-token family, Figma's own display order.
       ============================================================ */
    --colorWarning: var(--colorWarningBase);
    --colorWarningBg: var(--gold1);
    --colorWarningBgHover: var(--gold2);
    --colorWarningBorder: var(--gold3);
    --colorWarningBorderHover: var(--gold4);
    --colorWarningBorderActive: var(--gold5);
    --colorWarningBase: var(--gold6);
    --colorWarningHover: var(--gold7);
    --colorWarningActive: var(--gold8);
    --colorWarningText: var(--gold9);
    --colorWarningTextHover: var(--gold10);

    /* ============================================================
       Colors / Brand / Danger — full 11-token family, Figma's own display order.
       ============================================================ */
    --colorDanger: var(--colorDangerBase);
    --colorDangerBg: var(--red1);
    --colorDangerBgHover: var(--red2);
    --colorDangerBorder: var(--red3);
    --colorDangerBorderHover: var(--red4);
    --colorDangerBorderActive: var(--red5);
    --colorDangerBase: var(--red6);
    --colorDangerHover: var(--red7);
    --colorDangerActive: var(--red8);
    --colorDangerText: var(--red9);
    --colorDangerTextHover: var(--red10);

    /* ============================================================
       Colors / Brand / Info — full 11-token family, Figma's own display order.
       ============================================================ */
    --colorInfo: var(--colorInfoBase);
    --colorInfoBg: var(--blue1);
    --colorInfoBgHover: var(--blue2);
    --colorInfoBorder: var(--blue3);
    --colorInfoBorderHover: var(--blue4);
    --colorInfoBorderActive: var(--blue5);
    --colorInfoBase: var(--blue6);
    --colorInfoHover: var(--blue7);
    --colorInfoActive: var(--blue8);
    --colorInfoText: var(--blue9);
    --colorInfoTextHover: var(--blue10);

    /* ============================================================
       Colors / Brand / Link — full 3-token family (Figma has no Bg/Border/Text variants for Link).
       ============================================================ */
    --colorLink: var(--blue6);
    --colorLinkHover: var(--blue7);
    --colorLinkActive: var(--blue8);

    /* ============================================================
       Colors / Brand / Control — full 7-token family, Figma's own display order. Narrow AntD
       internal use (control fills/outlines); no current cc-base.css consumer, kept for parity.
       ============================================================ */
    --controlItemBgHover: var(--gray2);
    --controlItemBgEdit: var(--gold1);
    --controlItemBgActive: var(--clarkGreen1);
    --controlItemBgActiveHover: var(--clarkGreen2);
    --controlItemBgActiveDisabled: var(--gray5);
    --controlTmpOutline: var(--gray2);
    --controlOutline: var(--clarkGreen1);

    /* ============================================================
       ClarkConnect color additions — no Figma source (see cc-token-rename-map for provenance)
       ============================================================ */
    --colorBrand: var(--clarkGreen6);
    --colorBrandDark: #0C364C;
    --colorBrandDeep: #0D4A58;
    --brandGradientStop1: #18756A;
    --brandGradientStop2: var(--colorBrandDeep);
    --brandGradientStop3: #0A2A45;
    --brandGradientStop4: var(--colorBgDark);
    --brandGradient: linear-gradient(27.5359deg, var(--brandGradientStop1) 1.265%, var(--brandGradientStop2) 27.054%, var(--brandGradientStop3) 52.792%, var(--brandGradientStop4) 92.026%);

    /* Sourced from the (out-of-scope) Components/Alert+Tag colorReview family, Purple 6/1/3. */
    --colorReview: var(--purple6);
    --colorReviewBg: var(--purple1);
    --colorReviewBorder: var(--purple3);

    --colorBgShell: #f4f7f8;
    --colorBgDark: #060E28;
    --colorBgOffwhite: #FAFAFA;
    --colorBgPage: #F5F5F5;
    --colorTextLabel: #1C1C1C;
    /* Form-label ink — the Components/Form/colorText source is now out of scope, but the value is gray9. */
    --colorTextForm: var(--gray9);
    --colorTextOnDarkMuted: rgba(255, 255, 255, 0.75);
    /* The Host page-header brand-teal text; no ramp match. */
    --colorTextHeader: #007161;
    --colorBorderHover: var(--gray7);
    /* The Components/Button+Input colorBorder source is now out of scope, but the value is gray7. */
    --colorBorderButton: var(--gray7);
    --colorBorderInput: var(--gray7);
    /* No ramp match. */
    --colorBorderStrong: #B7B7B7;
    /* No ramp match. */
    --colorBorderTable: #e9ede9;
    /* No ramp match. */
    --colorBorderFooter: #CDD4D5;
    /* White-on-dark washes at low opacity; no ramp match (alpha, not a ramp step). */
    --colorOverlayHover: rgba(255, 255, 255, 0.08);
    --colorOverlayActive: rgba(255, 255, 255, 0.16);
    /* Same value as colorBrandDeep, coincidentally; no ramp match. */
    --colorAvatarBg: #0C364C;
    /* Neutral dark wash on LIGHT surfaces (e.g. chart hover guide); the overlays above are white
       washes for dark chrome, not this — no ramp match (alpha, not a ramp step). */
    --colorOverlayGuide: rgba(0, 0, 0, 0.15);
    /* Current vs comparison series; brand green is chrome and two tints of one hue do not separate
       as series — no ramp match. */
    --colorChart1: #2563EB;
    --colorChart2: #5B2D8E;
    --colorWhite: var(--gray1);
    /* No ramp match — the ramp bottoms out at gray10 (#262626), not pure black. */
    --colorBlack: #000000;

    /* ============================================================
       Typography
       ============================================================ */
    --fontFamily: 'DM Sans', -apple-system, system-ui, sans-serif;
    --fontFamilyCode: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    /* Figma models these as the strings "Regular"/"SemiBold"; CSS keeps the equivalent numeric weight. */
    --fontWeightRegular: 400;
    --fontWeightStrong: 600;
    --fontSize: 14px;
    --fontSizeLG: 16px;
    --fontSizeSM: 12px;
    --fontSizeXL: var(--fontSizeHeading4);
    --fontSizeHeading1: 24px;
    --fontSizeHeading2: 20px;
    --fontSizeHeading3: 16px;
    --fontSizeHeading4: 16px;
    --fontSizeHeading5: 16px;
    --fontSizeIcon: var(--fontSizeSM);
    --lineHeight: 22px;
    --lineHeightLG: 24px;
    --lineHeightSM: 20px;
    --lineHeightXL: 28px;
    --lineHeightHeading1: 32px;
    --lineHeightHeading2: 28px;
    --lineHeightHeading3: 24px;
    --lineHeightHeading4: 24px;
    --lineHeightHeading5: var(--lineHeightLG);

    /* ClarkConnect typography additions — no Figma source */
    --fontFamilyDisplay: var(--fontFamily);
    /* DM Sans Light is used for display sub-lines. */
    --fontWeightLight: 300;
    --fontWeightMedium: 500;
    --fontWeightBold: 700;
    /* Every Figma text layer pins the opsz-14 cut; the variable font otherwise auto-sizes opsz. */
    --fontVariationSettings: "opsz" 14;

    /* ============================================================
       Border Radius
       ============================================================ */
    --borderRadius: 6px;
    --borderRadiusLG: 8px;
    --borderRadiusSM: 4px;
    --borderRadiusXS: 2px;
    --borderRadiusRound: 999px;

    /* ============================================================
       Size
       ============================================================ */
    --controlHeight: 32px;
    --controlHeightLG: 40px;
    --controlHeightSM: 24px;
    --controlHeightXS: 16px;
    --lineWidth: 1px;
    --lineWidthBold: 2px;
    /* Reference values only: CSS custom properties cannot be read inside an @media condition, so
       these do not make a plain @media query token-driven — use them from JS/Blazor resize logic
       (e.g. getComputedStyle) where a screen-width constant is needed. */
    --screenXS: 480px;
    --screenSM: 576px;
    --screenMD: 768px;
    --screenLG: 992px;
    --screenXL: 1200px;
    --screenXXL: 1600px;
    --controlInteractiveSize: 16px;

    /* ClarkConnect size additions — no Figma source (every Icon instance is drawn at a fixed size) */
    --controlIconSize: 16px;
    --controlIconSizeSM: 14px;
    --controlIconSizeLG: 24px;
    --controlIconSizeXL: 48px;

    /* ============================================================
       Spacing
       Figma's Spacing/Margin, Spacing/Padding, and Size/size* families are three value-identical
       copies of the same scale (marginXS === paddingXS === sizeXS, etc., 4/8/12/16/20/24/32/48px)
       — none of their names fit both the padding and margin/gap uses this scale actually has in
       cc-base.css, so "spacing" (Figma's group name, not a leaf token name) is used as the one
       canonical, more generic name instead of picking a side.
       ============================================================ */
    --spacingXXS: 4px;
    --spacingXS: 8px;
    --spacingSM: 12px;
    --spacingMD: 16px;
    --spacingLG: 24px;
    --spacingXL: 32px;
    --spacingXXL: 48px;

    /* ============================================================
       ClarkConnect shadow additions — no Figma variable export for effects/shadows
       ============================================================ */
    --shadowElevation: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
    /* The same three layers as a filter chain, for panels whose arrow must share the shadow; drop-shadow()
       has no spread, blurs halved as Figma exports it. */
    --shadowElevationFilter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.12)) drop-shadow(0 6px 8px rgba(0, 0, 0, 0.08)) drop-shadow(0 9px 14px rgba(0, 0, 0, 0.05));
    --shadowSwitchHandle: 0 2px 4px 0 rgba(0, 35, 11, 0.2);
    --shadowCard: 0 1px 2px 0 rgba(26, 37, 64, 0.06), 0 2px 8px 0 rgba(26, 37, 64, 0.08);
    --shadowFocusPrimary: 0 0 0 2px var(--colorPrimaryBg);
    --shadowFocusDanger: 0 0 0 2px var(--colorDangerBg);
    --shadowFocusWarning: 0 0 0 2px var(--colorWarningBg);
}
