/* = BUTTONS */

/*
 * Button colours come from the block a button sits in - editors only choose solid or outlined.
 * Each background below sets the --b-* colours, and the nearest coloured block wins.
 * solid    --b-solid-bg / -bg-hover (flood) / -text / -text-hover / -inner (inner glow on rollover) / -glow
 * outlined --b-line / -hover (ring) / -text / -text-hover / -arrow / -arrow-hover / -glow
 */

/* dark backgrounds - the page, dark / light / dusty blue blocks, and anything with an image or video behind it */
body, .dark-blue-background, .light-blue-background, .dusty-blue-background, .side-block-image, .header-block, .carousel-item.cover{--b-solid-bg: var(--po-colour-neon-green); --b-solid-bg-hover: var(--po-colour-pale-neon); --b-solid-text: var(--po-colour-dark-blue); --b-solid-text-hover: var(--po-colour-dark-blue); --b-solid-inner: transparent; --b-solid-glow: var(--po-colour-neon-green); --b-line: var(--po-colour-white); --b-line-hover: var(--po-colour-pale-neon); --b-line-text: var(--po-colour-white); --b-line-text-hover: var(--po-colour-white); --b-line-arrow: var(--po-colour-neon-green); --b-line-arrow-hover: var(--po-colour-neon-green); --b-line-glow: var(--po-colour-neon-green)}

/* image and video backgrounds - as dark, but solid buttons are white with dark blue text (rollover unchanged) */
.side-block-image, .header-block, .carousel-item.cover{--b-solid-bg: var(--po-colour-white)}

/* neon green backgrounds */
.neon-green-background{--b-solid-bg: var(--po-colour-dark-blue); --b-solid-bg-hover: var(--po-colour-light-blue); --b-solid-text: var(--po-colour-white); --b-solid-text-hover: var(--po-colour-white); --b-solid-inner: var(--po-colour-dark-blue); --b-solid-glow: var(--po-colour-dark-blue); --b-line: var(--po-colour-dark-blue); --b-line-hover: var(--po-colour-white); --b-line-text: var(--po-colour-dark-blue); --b-line-text-hover: var(--po-colour-dark-blue); --b-line-arrow: var(--po-colour-light-blue); --b-line-arrow-hover: var(--po-colour-white); --b-line-glow: var(--po-colour-white)}

/* white backgrounds */
.white-background{--b-solid-bg: var(--po-colour-dark-blue); --b-solid-bg-hover: var(--po-colour-neon-green); --b-solid-text: var(--po-colour-white); --b-solid-text-hover: var(--po-colour-dark-blue); --b-solid-inner: transparent; --b-solid-glow: var(--po-colour-neon-green); --b-line: var(--po-colour-dark-blue); --b-line-hover: var(--po-colour-neon-green); --b-line-text: var(--po-colour-dark-blue); --b-line-text-hover: var(--po-colour-dark-blue); --b-line-arrow: var(--po-colour-neon-green); --b-line-arrow-hover: var(--po-colour-light-blue); --b-line-glow: var(--po-colour-neon-green)}

a.button{padding: 14px 40px; text-transform: uppercase; font-weight: 700; border-radius: 100px; border: 2px solid var(--btn-border, var(--po-colour-white)); background-color: var(--btn-bg, transparent); color: var(--btn-text, var(--po-colour-white)) !important; font-size: 14px}

a.button:hover{color: var(--btn-text-hover, var(--btn-text, var(--po-colour-white))) !important}

a.button-solid{--btn-bg: var(--b-solid-bg); --btn-border: var(--b-solid-bg); --btn-text: var(--b-solid-text); --btn-text-hover: var(--b-solid-text-hover); --btn-accent: var(--b-solid-bg-hover); --btn-glow-colour: var(--b-solid-glow)}

a.button-outlined{--btn-border: var(--b-line); --btn-text: var(--b-line-text); --btn-text-hover: var(--b-line-text-hover); --btn-accent: var(--b-line-hover); --btn-glow-colour: var(--b-line-glow)}

.owl-nav button{--btn-glow-colour: var(--b-line-glow)}

/* glow - colour from the block (--btn-glow-colour), neon green by default */
.header-quote-button a, a.button-solid, a.button-outlined, .owl-nav button{--flood: 0; position: relative; box-shadow: 0 0 calc(var(--flood) * 20px) color-mix(in srgb, var(--btn-glow-colour, var(--po-colour-neon-green)) calc(var(--flood) * 75%), transparent)}

/* outlined - the glow also shows inside the line */
a.button-outlined{box-shadow: 0 0 calc(var(--flood) * 20px) color-mix(in srgb, var(--btn-glow-colour, var(--po-colour-neon-green)) calc(var(--flood) * 75%), transparent), inset 0 0 calc(var(--flood) * 14px) color-mix(in srgb, var(--btn-glow-colour, var(--po-colour-neon-green)) calc(var(--flood) * 60%), transparent)}

/* header quote button */
.header-quote-button a, a.mobile-header-quite-button{display: inline-block; background-color: var(--po-colour-neon-green); color: var(--po-colour-dark-blue) !important; padding: 14px 40px !important; border-radius: 100px}

/* solid - flood fill in the rollover background colour */
.header-quote-button a, a.button-solid{isolation: isolate}

.header-quote-button a .quote-flood-clip, a.button-solid .quote-flood-clip{position: absolute; inset: 0; z-index: -1; border-radius: inherit; overflow: hidden; clip-path: inset(0 round 100px); pointer-events: none}

.header-quote-button a .quote-flood-dot, a.button-solid .quote-flood-dot{position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--btn-accent, var(--po-colour-pale-neon)); transform: scale(0)}

/* soft edge on the spreading circle - the glow grows with the circle, so the edge stays soft as it spreads */
.header-quote-button a .quote-flood-dot, a.button-solid .quote-flood-dot{box-shadow: 0 0 20px 2px var(--btn-accent, var(--po-colour-pale-neon))}

/* once the flood script has added its layer, that layer paints the background as well,
   so the background and the flood share one rounded edge and nothing shows round it */
a.button-solid:has(.quote-flood-clip){background-color: transparent; border-color: transparent}

a.button-solid .quote-flood-clip { inset: -2px; background-color: var(--btn-bg); overflow: visible; }

/* solid - inner glow on rollover, on its own layer above the fill so the fill can't cover it (colour from --b-solid-inner) */
a.button-solid::after{content: ''; position: absolute; inset: -2px; z-index: -1; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 calc(var(--flood) * 20px) color-mix(in srgb, var(--b-solid-inner, transparent) calc(var(--flood) * 60%), transparent)}

/* outlined - border ring in the rollover border colour */
a.button-outlined, .owl-nav button{--ring: 0px; --ring-x: 50%; --ring-y: 50%}

a.button-outlined::before, .owl-nav button::before{content: ''; position: absolute; inset: -2px; padding: 2px; border-radius: inherit; background: radial-gradient(circle at var(--ring-x) var(--ring-y), var(--btn-accent, var(--po-colour-pale-neon)) 0, var(--btn-accent, var(--po-colour-pale-neon)) calc(var(--ring) * .7), transparent var(--ring)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none}

a.button-outlined{border-color: transparent}

a.button-outlined::before{background: radial-gradient(circle at var(--ring-x) var(--ring-y), var(--btn-accent, var(--po-colour-pale-neon)) 0, var(--btn-accent, var(--po-colour-pale-neon)) calc(var(--ring) * .7), transparent var(--ring)), linear-gradient(var(--btn-border, var(--po-colour-white)) 0 0)}

/* arrow - its own colour per background, switching on rollover */
a.button-outlined:after{content: '\f061'; font-family: 'Font Awesome 7 Sharp'; font-weight: 400; margin-left: 10px; color: var(--b-line-arrow, var(--po-colour-neon-green)); transition: color var(--pot-animation-speed) ease}

a.button-outlined:hover:after{color: var(--b-line-arrow-hover, var(--btn-accent))}

/* reduced motion - the script skips the effect, so swap colour on hover instead */
@media (prefers-reduced-motion: reduce){
	a.button-solid:hover{background-color: var(--btn-accent); border-color: var(--btn-accent)}
	a.button-outlined:hover{--btn-border: var(--btn-accent) !important}
	.owl-nav button:hover{border-color: var(--btn-accent, var(--po-colour-neon-green)) !important}
}



a.underline-button{position: relative}

a.underline-button:after{position: absolute; content: ''; left: 0px; bottom: -8px; right: 100%; height: 3px; background-color: var(--po-colour-dusty-blue); opacity: 0.5}

a.underline-button:hover:after{right: 0px}