:root {
	--cream-light: #f6f6f6;
	--cream-dark: #dcd7cd;
	--cream: #ebe8e2;
	--remindwise-grey: #333a42;
	--grey-light: #373f48;
	--greyed-out: #cac7c1;
	--grey: #333a42;
	--grey-dark: #252b32;
	--orange: #c35600;
	--orange-dark: #b85100;
	--red: #d73d28;
	--red-dark: #d43923;
	--white: #ffffff;
}

@font-face {
	font-family: 'Outfit';
	src: url('./outfit.woff2') format('woff2');
	font-weight: 300 700;
	font-display: swap;
}

/* Box sizing rules */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
	margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[class],
ol[class] {
	list-style: none;
	padding: 0;
	margin: 0;
}

/* Set core root defaults */
html {
	font-size: 62.5%;
}

html:focus-within {
	scroll-behavior: smooth;
}

/* Set core body defaults */
body {
	min-height: 100vh;
	text-rendering: optimizeSpeed;
	line-height: 2.1rem;
	font-size: 1.4rem;
	font-family: 'Outfit', sans-serif;
	font-weight: 500;
	color: var(--grey);
}

/* A elements that don't have a class get default styles */
a:not([class]) {
	text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
	max-width: 100%;
	display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
	font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: 'Outfit', sans-serif;
	font-weight: 600;
	margin-bottom: 1.2rem;
}

h1,
.heading-1 {
	font-size: 3.4rem;
	line-height: 3.8rem;
}

h2,
.heading-2 {
	font-size: 2.4rem;
	line-height: 2.8rem;
}

h3,
.heading-3 {
	font-size: 2rem;
	line-height: 2.4rem;
}

h4,
.heading-4 {
	font-size: 1.6rem;
	line-height: 2rem;
}

h5,
.heading-5 {
	font-size: 1.4rem;
	line-height: 1.8rem;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
	html:focus-within {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

.body {
	padding: 2.4rem 1.6rem;
}

table {
	border-collapse: collapse;
	width: 100%;
}

th {
	display: none;
}

tbody tr {
	display: block;
	position: relative;
	width: 100%;
	margin-top: 2rem;
}

td {
	display: block;
	background-color: var(--cream-light);
	padding: 1rem 2rem 1rem 17rem;
	border-top: 1px solid var(--white);
	position: relative;
	min-height: 4.2rem;
}

td:not(.cell-no-data)::before {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 15rem;
	padding: 1rem 2rem;
	content: attr(data-heading);
	background-color: var(--cream);
	font-weight: 500;
}

td:first-child {
	border-top-left-radius: 0.6rem;
	border-top-right-radius: 0.6rem;
}

td:first-child::before {
	border-top-left-radius: 0.6rem;
}

td:last-child {
	border-bottom-left-radius: 0.6rem;
	border-bottom-right-radius: 0.6rem;
}

td:last-child::before {
	border-bottom-left-radius: 0.6rem;
}

tr:hover .cell-no-data {
	background-color: var(--cream-light);
}

td svg {
	width: 1.6rem;
	height: 1.6rem;
}

.name {
	display: flex;
}

.table-icon {
	width: 1.8rem;
	height: 1.8rem;
	vertical-align: middle;
	margin-left: 2.5rem;
}

.cell-no-data {
	color: var(--grey-light);
	padding-left: 3rem;
}
.table-link::before {
	display: block;
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
}

.table-link img {
	width: 1.5rem;
	height: 1.5rem;
	margin: 0 auto;
}

th:has(.alert) {
	display: flex;
}

.alert {
	background-color: var(--orange);
	border-radius: 50%;
	font-size: 1.2rem;
	color: var(--cream-light);
	width: 1.8rem;
	height: 1.8rem;
	display: flex;
	justify-content: center;
	align-items: center;
	margin-left: 0.6rem;
}

.error {
	color: var(--red);
	font-weight: 400;
	margin-top: 1rem;
}

@media screen and (min-width: 1024px) {
	.body {
		padding-left: 4.2rem;
		padding-right: 4.2rem;
	}

	table {
		display: table;
	}

	tbody tr,
	tr {
		display: table-row;
	}

	th {
		display: table-cell;
		background-color: var(--cream);
		padding: 1rem 2rem;
		text-align: left;
		font-weight: 500;
	}

	th:first-child {
		padding-left: 6.3rem; /* cell padding + icon width & margin */
		border-top-left-radius: 0.6rem;
	}

	th:last-child {
		border-top-right-radius: 0.6rem;
		text-align: center;
	}

	tbody tr {
		margin-top: 0;
	}

	tr:hover td {
		background-color: var(--cream);
	}

	td {
		display: table-cell;
		padding-left: 2rem;
		position: static;
	}

	td::before {
		content: '';
		display: none;
	}

	td:first-child,
	td:first-child::before {
		border-top-left-radius: 0;
		border-top-right-radius: 0;
	}

	td:last-child,
	td:last-child::before {
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
	}

	.table-icon {
		margin-left: 0;
		margin-right: 2.5rem;
		order: -1;
	}

	.view {
		text-align: center;
	}
}
