/*-----------------------------------------------------------------------------
 * Hand-maintained colors - sagentic.dev
 *
 * colors.css is GENERATED by the dashboard's Color System and is overwritten
 * every time the palette is saved. Anything that is not one of the five
 * generated families lives here so it survives regeneration.
 *
 * Loaded immediately after colors.css (see includes/css.php), so it can also
 * add to a generated family without being clobbered.
 *
 * Rule of thumb: if the dashboard's color picker can produce it, it belongs in
 * colors.css. If it is a SEMANTIC color (accessibility, hyperlink, status)
 * or a utility shape the generator does not emit (borders), it belongs here.
 *---------------------------------------------------------------------------*/

/* Variables
 *---------------------------------------------------------------------------*/
:root {
	/* Accessibility blue - the ACCESSIBILITY REQUIRED indicator. Not a brand
	   color: it is the recognized accessibility hue, so it must not drift
	   when the palette is regenerated. Dark-mode lightens it in dark-mode.css
	   (#1a7fb3 is only 2.79:1 on a dark card). */
	--accessibility-blue: #006da3;
	--accessibility-blue-hover: #005580;
	--accessibility-blue-light: #1a7fb3;
	--accessibility-blue-light-hover: #3491c7;

	/* Hyperlink blue - the FUNCTION color for "this leaves sagentic.dev".
	   ALIASED to the generated link color rather than hard-coded: colors.css
	   sets --hyperlinks/--hover for bare <a>, and these drive the
	   .text-hyperlink / .btn-outline-hyperlink utilities. Pointing one at the
	   other means the dashboard has ONE link blue, and regenerating the
	   palette moves both together. (They used to be #0066FF and #0d6efd -
	   1.07:1 apart, i.e. indistinguishable, but two names to keep straight.)

	   The light steps can't be derived in CSS, so they're the same hue 216 at
	   70% / 80% lightness. Update them if --hyperlinks ever changes hue. */
	--hyperlink: var(--hyperlinks);
	--hyperlink-hover: var(--hover);
	--hyperlink-light: #66a3ff;			/* 4.87:1 on the dark card */
	--hyperlink-light-hover: #99c2ff;	/* 6.79:1 */

	/* Status / accent colors still referenced by the dashboard's markup. */
	--blue: #012b5d;
	--blue-hover: #001f45;
	--blue-light: #1b3f71;
	--blue-light-hover: #355385;

	--red: #c51230;
	--red-hover: #a30e28;
	--red-light: #d9324a;
	--red-light-hover: #ed5264;

	--yellow: #fcb040;
	--yellow-hover: #e09424;
	--yellow-light: #ffc45a;
	--yellow-light-hover: #ffd874;

	--silver: #afb7ba;
	--silver-hover: #939b9e;
	--silver-light: #c3cbce;
	--silver-light-hover: #d7dfe2;

	/* Legacy - still referenced by rules in custom.css. Kept at their previous
	   values so this refactor changes nothing visually. */
	--gold-light: #b29d4c;
	--gold-light-hover: #c6b160;
}

/*-----------------------------------------------------------------------------
 * Accessibility Blue
 *---------------------------------------------------------------------------*/
html .heading-accessibility-blue,
html .lnk-accessibility-blue,
html .text-color-accessibility-blue,
html .text-accessibility-blue {
	color: var(--accessibility-blue) !important;
}

html .text-color-hover-accessibility-blue:hover,
html .text-hover-accessibility-blue:hover {
	color: var(--accessibility-blue) !important;
}

html .heading-accessibility-blue-light,
html .lnk-accessibility-blue-light,
html .text-color-accessibility-blue-light,
html .text-accessibility-blue-light {
	color: var(--accessibility-blue-light) !important;
}

html .text-color-hover-accessibility-blue-light:hover,
html .text-hover-accessibility-blue-light:hover {
	color: var(--accessibility-blue-light-hover) !important;
}

html .bg-accessibility-blue,
html .background-color-accessibility-blue {
	background-color: var(--accessibility-blue) !important;
}

html .bg-accessibility-blue-light,
html .background-color-accessibility-blue-light {
	background-color: var(--accessibility-blue-light) !important;
}

html .btn-accessibility-blue {
	background-color: var(--accessibility-blue);
	border-color: var(--accessibility-blue);
	color: #FFF;
}

html .btn-accessibility-blue:hover,
html .btn-accessibility-blue.hover {
	background-color: var(--accessibility-blue-hover);
	border-color: var(--accessibility-blue-hover);
	color: #FFF;
}

html .btn-outline-accessibility-blue {
	color: var(--accessibility-blue);
	border-color: var(--accessibility-blue);
	background-color: transparent;
	border-width: 2px;
	padding: 0.483rem 0.933rem;
}

html .btn-outline-accessibility-blue:hover,
html .btn-outline-accessibility-blue.hover {
	background-color: var(--accessibility-blue);
	border-color: var(--accessibility-blue);
	color: #FFF;
}

/*-----------------------------------------------------------------------------
 * Hyperlink (the "leaves this site" function color)
 *---------------------------------------------------------------------------*/
html .heading-hyperlink,
html .lnk-hyperlink,
html .text-color-hyperlink,
html .text-hyperlink {
	color: var(--hyperlink) !important;
}

html .text-color-hover-hyperlink:hover,
html .text-hover-hyperlink:hover {
	color: var(--hyperlink-hover) !important;
}

html .heading-hyperlink-light,
html .lnk-hyperlink-light,
html .text-color-hyperlink-light,
html .text-hyperlink-light {
	color: var(--hyperlink-light) !important;
}

html .bg-hyperlink,
html .background-color-hyperlink {
	background-color: var(--hyperlink) !important;
}

html .border-hyperlink {
	border-color: var(--hyperlink) !important;
}

html .btn-hyperlink {
	background-color: var(--hyperlink);
	border-color: var(--hyperlink);
	color: #FFF;
}

html .btn-hyperlink:hover,
html .btn-hyperlink.hover {
	background-color: var(--hyperlink-hover);
	border-color: var(--hyperlink-hover);
	color: #FFF;
}

html .btn-outline-hyperlink {
	color: var(--hyperlink);
	border-color: var(--hyperlink);
	background-color: transparent;
	border-width: 2px;
	padding: 0.483rem 0.933rem;
}

html .btn-outline-hyperlink:hover,
html .btn-outline-hyperlink.hover {
	background-color: var(--hyperlink);
	border-color: var(--hyperlink);
	color: #FFF;
}

html .btn-outline-hyperlink:focus,
html .btn-outline-hyperlink.focus {
	box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.5);
}

html .btn-outline-hyperlink.disabled,
html .btn-outline-hyperlink:disabled {
	color: var(--hyperlink);
	background-color: transparent;
	border-color: var(--hyperlink);
	opacity: 0.65;
}

/*-----------------------------------------------------------------------------
 * Blue
 *---------------------------------------------------------------------------*/
html .heading-blue,
html .lnk-blue,
html .text-color-blue,
html .text-blue {
	color: var(--blue) !important;
}

html .heading-blue-light,
html .lnk-blue-light,
html .text-color-blue-light,
html .text-blue-light {
	color: var(--blue-light) !important;
}

html .bg-blue,
html .background-color-blue {
	background-color: var(--blue) !important;
}

html .bg-blue-light,
html .background-color-blue-light {
	background-color: var(--blue-light) !important;
}

html .btn-blue {
	background-color: var(--blue);
	border-color: var(--blue);
	color: #FFF;
}

html .btn-blue:hover,
html .btn-blue.hover {
	background-color: var(--blue-hover);
	border-color: var(--blue-hover);
	color: #FFF;
}

.badge-blue {
	background: var(--blue-hover);
	color: #FFF;
}

.alert-blue {
	color: #FFF;
	background-color: var(--blue);
	border-color: var(--blue);
}

.alert-blue .alert-link {
	color: #FFF;
	text-decoration: underline;
}

/*-----------------------------------------------------------------------------
 * Red
 *---------------------------------------------------------------------------*/
html .heading-red,
html .lnk-red,
html .text-color-red,
html .text-red {
	color: var(--red) !important;
}

html .heading-red-light,
html .lnk-red-light,
html .text-color-red-light,
html .text-red-light {
	color: var(--red-light) !important;
}

html .bg-red,
html .background-color-red {
	background-color: var(--red) !important;
}

html .bg-red-light,
html .background-color-red-light {
	background-color: var(--red-light) !important;
}

html .btn-red {
	background-color: var(--red);
	border-color: var(--red);
	color: #FFF;
}

html .btn-red:hover,
html .btn-red.hover {
	background-color: var(--red-hover);
	border-color: var(--red-hover);
	color: #FFF;
}

html .btn-outline-red {
	color: var(--red);
	border-color: var(--red);
	background-color: transparent;
	border-width: 2px;
	padding: 0.483rem 0.933rem;
}

html .btn-outline-red:hover,
html .btn-outline-red.hover {
	background-color: var(--red);
	border-color: var(--red);
	color: #FFF;
}

.badge-red {
	background: var(--red-hover);
	color: #FFF;
}

.alert-red {
	color: #FFF;
	background-color: var(--red);
	border-color: var(--red);
}

.alert-red .alert-link {
	color: #FFF;
	text-decoration: underline;
}

/*-----------------------------------------------------------------------------
 * Yellow
 *---------------------------------------------------------------------------*/
html .heading-yellow,
html .lnk-yellow,
html .text-color-yellow,
html .text-yellow {
	color: var(--yellow) !important;
}

html .heading-yellow-light,
html .lnk-yellow-light,
html .text-color-yellow-light,
html .text-yellow-light {
	color: var(--yellow-light) !important;
}

/* Yellow is a LIGHT surface - the dark text pairing lives with it so a
   bg-yellow panel never has to be told twice. */
html .bg-yellow,
html .background-color-yellow {
	background-color: var(--yellow) !important;
}

html .bg-yellow-light,
html .background-color-yellow-light {
	background-color: var(--yellow-light) !important;
}

.badge-yellow {
	background: var(--yellow-hover);
	color: #212529;
}

.alert-yellow {
	color: #212529;
	background-color: var(--yellow);
	border-color: var(--yellow);
}

.alert-yellow .alert-link {
	color: #212529;
	text-decoration: underline;
}

/*-----------------------------------------------------------------------------
 * Silver
 *---------------------------------------------------------------------------*/
html .heading-silver,
html .lnk-silver,
html .text-color-silver,
html .text-silver {
	color: var(--silver) !important;
}

html .heading-silver-light,
html .lnk-silver-light,
html .text-color-silver-light,
html .text-silver-light {
	color: var(--silver-light) !important;
}

html .bg-silver,
html .background-color-silver {
	background-color: var(--silver) !important;
}

/*-----------------------------------------------------------------------------
 * Light-step buttons: dark text
 *
 * The generator sets `color: #FFF` on EVERY button, including the -light steps.
 * White on #ad99e5 is 2.48:1 and on #c58ed9 is 2.55:1 - unreadable. These are
 * light surfaces and take dark text; the same pairing Bootstrap uses for
 * .btn-warning and .btn-info. Selectors match the generator's own shape so the
 * later file (this one) wins on the color alone.
 *---------------------------------------------------------------------------*/
html .btn-medium-purple-light,
html .btn-medium-purple-light:hover,
html .btn-medium-purple-light.hover,
html .btn-amethyst-light,
html .btn-amethyst-light:hover,
html .btn-amethyst-light.hover,
html .btn-electric-violet-light,
html .btn-electric-violet-light:hover,
html .btn-electric-violet-light.hover,
html .btn-purple-mountains-majesty,
html .btn-purple-mountains-majesty:hover,
html .btn-purple-mountains-majesty.hover,
html .btn-purple-mountains-majesty-light,
html .btn-purple-mountains-majesty-light:hover,
html .btn-purple-mountains-majesty-light.hover {
	color: #212529;			/* 6.22:1, 6.06:1, 3.87:1, 4.68:1, 7.70:1 respectively */
}

/* ...and the outline versions, which flip to a light fill on hover */
html .btn-outline-medium-purple-light:hover,
html .btn-outline-medium-purple-light.hover,
html .btn-outline-amethyst-light:hover,
html .btn-outline-amethyst-light.hover,
html .btn-outline-electric-violet-light:hover,
html .btn-outline-electric-violet-light.hover,
html .btn-outline-purple-mountains-majesty:hover,
html .btn-outline-purple-mountains-majesty.hover,
html .btn-outline-purple-mountains-majesty-light:hover,
html .btn-outline-purple-mountains-majesty-light.hover {
	color: #212529;
}

/*-----------------------------------------------------------------------------
 * Yellow / Silver buttons
 *
 * Offered in the dashboard_elements button-color pulldown, so they have to
 * exist. Both are light surfaces - dark text, like Bootstrap's .btn-warning.
 *---------------------------------------------------------------------------*/
html .btn-yellow {
	background-color: var(--yellow);
	border-color: var(--yellow);
	color: #212529;			/* 8.39:1 */
}

html .btn-yellow:hover,
html .btn-yellow.hover {
	background-color: var(--yellow-hover);
	border-color: var(--yellow-hover);
	color: #212529;			/* 6.19:1 */
}

html .btn-outline-yellow {
	color: var(--yellow);
	border-color: var(--yellow);
	background-color: transparent;
	border-width: 2px;
	padding: 0.483rem 0.933rem;
}

html .btn-outline-yellow:hover,
html .btn-outline-yellow.hover {
	background-color: var(--yellow);
	border-color: var(--yellow);
	color: #212529;
}

html .btn-silver {
	background-color: var(--silver);
	border-color: var(--silver);
	color: #212529;			/* 7.57:1 */
}

html .btn-silver:hover,
html .btn-silver.hover {
	background-color: var(--silver-hover);
	border-color: var(--silver-hover);
	color: #212529;			/* 5.45:1 */
}

html .btn-outline-silver {
	color: var(--silver);
	border-color: var(--silver);
	background-color: transparent;
	border-width: 2px;
	padding: 0.483rem 0.933rem;
}

html .btn-outline-silver:hover,
html .btn-outline-silver.hover {
	background-color: var(--silver);
	border-color: var(--silver);
	color: #212529;
}

/*-----------------------------------------------------------------------------
 * Border utilities
 *
 * The generator emits text / bg / btn / badge / alert, but not border-*. Stat
 * tiles need a tile outline that matches the icon inside it (README §5.3), so
 * the steps used for that live here.
 *---------------------------------------------------------------------------*/
html .border-medium-purple {
	border-color: var(--medium-purple) !important;
}

html .border-medium-purple-light {
	border-color: var(--medium-purple-light) !important;
}

html .border-amethyst {
	border-color: var(--amethyst) !important;
}

html .border-amethyst-light {
	border-color: var(--amethyst-light) !important;
}

html .border-cyber-grape {
	border-color: var(--cyber-grape) !important;
}

html .border-cyber-grape-light {
	border-color: var(--cyber-grape-light) !important;
}

html .border-cyber-grape-light-hover {
	border-color: var(--cyber-grape-light-hover) !important;
}

html .border-purple-mountains-majesty {
	border-color: var(--purple-mountains-majesty) !important;
}

html .border-red {
	border-color: var(--red) !important;
}

html .border-yellow {
	border-color: var(--yellow) !important;
}

/*-----------------------------------------------------------------------------
 * Hover-state text utilities
 *
 * Note the naming trap: `text-medium-purple-light-hover` is the palette STEP
 * named "-light-hover" applied at rest, while `text-hover-medium-purple-light`
 * is the :hover STATE. The generator emits the second form only for the base
 * and -dark / -light steps, so the extra steps used by the dashboard are here.
 *---------------------------------------------------------------------------*/
html .text-color-hover-medium-purple-light-hover:hover,
html .text-hover-medium-purple-light-hover:hover {
	color: var(--medium-purple-light-hover) !important;
}

html .text-color-hover-amethyst-light-hover:hover,
html .text-hover-amethyst-light-hover:hover {
	color: var(--amethyst-light-hover) !important;
}

/*-----------------------------------------------------------------------------
 * Step aliases the generator does not emit
 *
 * colors.css emits text/bg utilities for base, -dark and -light, but the
 * dashboard also uses the -hover and -light-hover steps as resting colors
 * (e.g. every page <h2> is text-medium-purple-light-hover).
 *---------------------------------------------------------------------------*/
html .heading-medium-purple-light-hover,
html .lnk-medium-purple-light-hover,
html .text-color-medium-purple-light-hover,
html .text-medium-purple-light-hover {
	color: var(--medium-purple-light-hover) !important;
}

html .heading-amethyst-light-hover,
html .lnk-amethyst-light-hover,
html .text-color-amethyst-light-hover,
html .text-amethyst-light-hover {
	color: var(--amethyst-light-hover) !important;
}

html .heading-cyber-grape-light-hover,
html .lnk-cyber-grape-light-hover,
html .text-color-cyber-grape-light-hover,
html .text-cyber-grape-light-hover {
	color: var(--cyber-grape-light-hover) !important;
}

html .heading-purple-mountains-majesty-light-hover,
html .lnk-purple-mountains-majesty-light-hover,
html .text-color-purple-mountains-majesty-light-hover,
html .text-purple-mountains-majesty-light-hover {
	color: var(--purple-mountains-majesty-light-hover) !important;
}

html .bg-medium-purple-light-hover,
html .background-color-medium-purple-light-hover {
	background-color: var(--medium-purple-light-hover) !important;
}

html .bg-amethyst-light-hover,
html .background-color-amethyst-light-hover {
	background-color: var(--amethyst-light-hover) !important;
}

html .bg-cyber-grape-light-hover,
html .background-color-cyber-grape-light-hover {
	background-color: var(--cyber-grape-light-hover) !important;
}
