/**
 * Cookie consent — brand overrides.
 *
 * Hand-written and committed, loaded after static/css/cookieconsent.css. It is
 * NOT authored in static/css/sass/: that tree compiles to bulma.css through an
 * external Sass step with no task in this repo, so a rule added there would not
 * reach the browser until someone recompiled by hand. Same arrangement as
 * static/css/tocbot.css, which is a plain committed stylesheet for the same
 * reason.
 *
 * The values below are the Bulma variables from static/css/bulma.sass — gold
 * $primary, $radius: 0, $button-border-width: 2px, Proxima Nova — restated as
 * literals because there is no Sass here to read them from. If the brand colour
 * ever changes in bulma.sass it has to change here too; that is the cost of
 * having no build step, and it is cheaper than adding one for six declarations.
 *
 * The overrides sit on `:root` because that is where the library declares its
 * own defaults. Matching that selector after the import is enough to win on the
 * cascade; targeting its `#cc-main` wrapper would need an ID selector.
 */

:root {
	--cc-font-family: "Proxima Nova", BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", "Helvetica", "Arial", sans-serif;

	--cc-bg: #fff;
	--cc-primary-color: #4a4a4a;   /* Bulma $grey-dark, the body text colour */
	--cc-secondary-color: #7a7a7a; /* Bulma $grey */
	--cc-link-color: #363636;      /* Bulma $grey-darker, matching $link */

	--cc-btn-primary-bg: #ab8f5b;
	--cc-btn-primary-border-color: #ab8f5b;
	--cc-btn-primary-color: #fff;
	--cc-btn-primary-hover-bg: #96794a;
	--cc-btn-primary-hover-border-color: #96794a;
	--cc-btn-primary-hover-color: #fff;

	/**
	 * `equalWeightButtons: true` in cookie-consent.js gives Accept and Reject
	 * the SAME primary styling, which is the point: reject must not read as the
	 * lesser option. So these secondary values land on "Manage preferences" and
	 * "Save preferences" — still a full-size, full-weight, 2px-bordered button
	 * rather than a de-emphasised link, because it is how granular choice and
	 * withdrawal are reached.
	 */
	--cc-btn-secondary-bg: #fff;
	--cc-btn-secondary-border-color: #ab8f5b;
	--cc-btn-secondary-color: #56565a;
	--cc-btn-secondary-hover-bg: #f5f2ec;
	--cc-btn-secondary-hover-border-color: #96794a;
	--cc-btn-secondary-hover-color: #363636;

	/* $radius: 0 — nothing else on this site has rounded corners. */
	--cc-btn-border-radius: 0;
	--cc-modal-border-radius: 0;
	--cc-pm-toggle-border-radius: 20px; /* except the switch, which reads as a switch */

	--cc-toggle-on-bg: #ab8f5b;
	--cc-toggle-off-bg: #b5b5b5;      /* Bulma $grey-light */
	--cc-toggle-readonly-bg: #d8d7d6; /* Bulma $grey-lighter */

	--cc-separator-border-color: #d8d7d6;
	--cc-cookie-category-block-bg: #fafafa;
	--cc-cookie-category-block-hover-bg: #f5f2ec;
	--cc-cookie-category-block-border: #d8d7d6;
	--cc-cookie-category-expanded-block-bg: #fff;

	--cc-overlay-bg: rgba(54, 54, 54, 0.7);

	/**
	 * The site header is not fixed and nothing else claims a stacking context
	 * this high, so 99 is clear of everything while staying below a browser's
	 * own UI.
	 */
	--cc-z-index: 99;
}

/* $button-border-width: 2px — the library ships 1px. */
#cc-main .cm__btn,
#cc-main .pm__btn {
	border-width: 2px;
}

/**
 * The config carrier. It holds the banner's settings in a data attribute and
 * must never take up space or be read out.
 */
.cookie-consent {
	display: none;
}

/**
 * The footer control that reopens preferences. It is a <button> so it is
 * reachable by keyboard and announced as an action, but it has to sit in a row
 * of links without looking like the odd one out.
 */
.js-cookie-settings {
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	font: inherit;
	padding: 0;
	text-align: inherit;
}

.js-cookie-settings:hover {
	color: #ab8f5b;
}
