/* Button styling
 * All button styling now lives here.
 */

/* Base button */
.button {
    padding: 1rem 4rem;
    background: var(--brand-1);
    color: #fff;
    display: inline-block;
    border-radius: 5rem;
    transition: all .15s ease-in-out;
	font-weight: 600;
    font-size: 80%;
}
.button:hover,
.button.current {
    background: var(--brand-2);
    color: #fff;
    transition: background .15s ease-in-out;
}

/* Button variants */
.button.toast-primary {
    background: var(--brand-1);
    color: #fff;
}
.button.toast-primary:hover {
    background: var(--brand-2);
    color: #fff;
}
.button.toast-secondary {
    background: var(--brand-2);
    color: #fff;
}
.button.toast-secondary:hover {
    background: var(--brand-1);
    color: #fff;
}
.button.toast-tertiary {
    background: #fff;
    color: var(--brand-1);
    outline: .1rem solid var(--brand-1);
}
.button.toast-tertiary:hover {
    background: #fff;
    color: var(--brand-2);
    outline: .1rem solid var(--brand-2);
}
.button.toast-quaternary {
    background: var(--brand-3);
    color: var(--brand-2);
	outline: .1rem solid var(--brand-2);
}
.button.toast-quaternary:hover {
    background: var(--brand-2);
    color: var(--brand-3);
	outline: .1rem solid var(--brand-2);
}

/* Layout helpers */
.button.display-block { width: 100%; }
p > .button + .button { margin-left: 2rem; }
:is(h1, h2, h3, h4, h5, h6, ul, ol, blockquote, table) + :is(.button, .button-block) { margin-top: clamp(1.5rem, 4vw, 4rem); }

/* Button blocks */
.button-block { margin-top: auto; padding-top: 4rem; }
.button-block.bottom { position: absolute; bottom: 6rem; }

/* Buttons on coloured backgrounds */
:is(.bg1, .bg3, .bg4, .bg5, .bg6, .bg7, .bg8) .button,
.has-bg .button { background: var(--brand-2); }
:is(.bg2) .button { background: var(--brand-1); }
:is(.bg1, .bg2, .bg3, .bg4, .bg5, .bg6, .bg7, .bg8) .button:hover,
.has-bg .button:hover { background: rgba(0,0,0,.5); }

/* Footer Buttons */
.footer-treatment-bar {
	background: var(--brand-7);
	padding: 5rem 0;
}

.footer-treatment-links {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 2rem;
}

.footer-treatment-links .button {
	display: block;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
}

@media (max-width: 900px) {
	.footer-treatment-links {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.footer-treatment-links {
		grid-template-columns: 1fr;
	}
}