/**
 * Millco Base CSS.
 * 
 */

/*=============================
Reset from
https://andy-bell.co.uk/a-more-modern-css-reset/
=============================*/

/* Box sizing rules */

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

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  font-variant-ligatures: common-ligatures;
  scroll-behavior: smooth;
}

/* Remove default margin in favour of better control in authored CSS */
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[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core body defaults */
body {
  min-height: 100vh;
}

/* Set shorter line heights on headings and interactive elements and remove common ligatures*/
h1,
h2,
h3,
h4,
button,
input,
label {
  line-height: 1.1;
  font-variant-ligatures: no-common-ligatures;
  /* text-box: trim-both cap alphabetic; */
  margin: 0;
}

/* Balance text wrapping on headings */
:is(h1, h2, h3, h4, .text-balance) {
    text-wrap: balance;
}
  
/* Make images easier to work with */
img,
picture {
  height: auto;
  max-width: 100%;
  display: block;
}

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

input[type="checkbox"],
input[type="radio"] {
  cursor: pointer;
  accent-color: var(--brand-purple-50);
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

/*=============================
  Link
=============================*/
a {
  color: var(--blue);
  transition: var(--transition);
}

a:hover {
  cursor: pointer;
  color: var(--theme);
  transition: var(--transition);
}


/*=============================
  Img
=============================*/
figure {
    margin: 0;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: var(--layout-gutter);
	width:fit-content;
}

figure img,
svg {
  vertical-align: bottom;
  /* get rid of space for descender */
}

figcaption {
  background-color: var(--black);
  color: var(--neutral-white);
  color: var(--neutral-white, #FFF);
  leading-trim: both;
  text-edge: cap;
  font-family: var(--Typography-family-body, "Plus Jakarta Sans");
  font-size: var(--Typography-size-xs, 14px);
  font-style: normal;
  font-weight: var(--Typography-weight-Medium, 500);
  line-height: var(--Typography-line-height-xsl, 18px); /* 128.571% */
  padding: 18px;
}

/*=============================
  Contented
=============================*/

.contented {
	display: flex;
	flex-direction: column;
	gap: var(--gap-small);
	font-variant-ligatures: common-ligatures;
}

.contented p{
	max-width: 68ch;
}

.contented ul,
.contented ol{
	margin-block: 0;
	padding-inline-start: 1.25rem;
}

.contented li{
	max-width: 64ch;
	margin-bottom: 1rem;
}

.contented li:last-child{
	margin-bottom: 0;
}

/*=============================
  Components
=============================*/

.alert {
  display: inline-block;
  margin: auto;
  padding: 0.5rem;
  padding-left: 28px;
  border: 2px solid hsl(349, 100%, 95%);
  background-color: hsl(349, 100%, 63%);
  color: white;
  border-radius: 0.5rem;
  position: relative;
  ;
}

.alert::before {
  content: '!';
  color: hsl(349, 100%, 63%);
  background-color: white;
  width: 16px;
  height: 16px;
  position: absolute;
  top: 11px;
  left: 6px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}



/*=============================
  Divider
=============================*/
hr {
  border: 0;
  height: 2px;
  background: var(--accent);
  margin: 1rem 0;
}

/*=============================
  Padding and margins
=============================*/

.p-0 {
  padding: 0 !important;
}

.p-1 {
  padding: 1rem;
}

.pl-1 {
  padding-left: 1rem;
}

.pt-0 {
  padding-top: 0 !important;
}

.pr-1 {
  padding-right: 1rem;
}

.pt-1 {
  padding-top: 1rem;
}

.pb-1 {
  padding-bottom: 1rem;
}

.p-2 {
  padding: 2rem;
}

.pl-2 {
  padding-left: 2rem;
}

.pr-2 {
  padding-right: 2rem;
}

.pt-2 {
  padding-top: 2rem;
}

.pb-2 {
  padding-bottom: 2rem;
}

.p-4 {
  padding: 4rem;
}

.pl-4 {
  padding-left: 4rem;
}

.pr-4 {
  padding-right: 4rem;
}

.pt-4 {
  padding-top: 4rem;
}

.pb-4 {
  padding-bottom: 4rem;
}

.m-auto {
  margin-left: auto;
  margin-right: auto;
}

.m-0 {
  margin: 0rem;
}

.ml-0 {
  margin-left: 0rem;
}

.mr-0 {
  margin-right: 0rem;
}

.mt-0 {
  margin-top: 0rem;
}

.mb-0 {
  margin-bottom: 0rem;
}

.m-1 {
  margin: 1rem;
}

.ml-1 {
  margin-left: 1rem;
}

.mr-1 {
  margin-right: 1rem;
}

.mt-1 {
  margin-top: 1rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

.m-2 {
  margin: 2rem;
}

.ml-2 {
  margin-left: 2rem;
}

.mr-2 {
  margin-right: 2rem;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.m-4 {
  margin: 4rem;
}

.ml-4 {
  margin-left: 4rem;
}

.mr-4 {
  margin-right: 4rem;
}

.mt-4 {
  margin-top: 4rem;
}

.mb-4 {
  margin-bottom: 4rem;
}

.mt-auto {
  margin: auto;
}

@media screen and (min-width: 768px) {
  .p-lg-0 {
    padding: 0;
  }
}

.pt-gap{
  padding-top: var(--gap);
}

.w_100{
  width: 100%;
}

/*=============================
  Accessibility
=============================*/
.sr_only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border-width: 0;
  color: black !important;
  background-color: white !important;
}


/*=============================
  Tables
=============================*/

.table_wrapper {
  max-width: 100%;
  overflow-x: auto;
}

.table_wrapper>table {
  min-width: 360px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem 0;
}

/* Zebra striping */
/* tr:nth-of-type(even) {
  background: var(--pale);
  color: var(--dark)
} */

td,
th {
  padding: 12px;
  border: 1px solid #fff;
  text-align: left;
  background: var(--neutral-grey-5, #EBF1FA);
  font-size: var(--typography-size-sm, 18px);
  line-height: var(--typography-line-height-sm, 24px); /* 133.333% */
}

th {
  background: var(--brand-pink-30);
  color: var(--neutral-black, #000);
  font-weight: var(--typography-weight-medium, 700);
}


.gapped{
	display: flex;
	flex-direction: column;
	gap: var(--gap)
}

/*=============================
  External links
  https://css-irl.info/styling-external-links-with-attribute-selectors/
=============================*/

/* a[href^='http'] {
  padding-right: 1em;
}

a[href^='http']::after {
  position: absolute;
  content: '';
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-left: 0.25em;
  background-size: 100%;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M19 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h6v2H5v12h12v-6zM13 3v2h4.586l-7.793 7.793l1.414 1.414L19 6.414V11h2V3z'/%3E%3C/svg%3E");
  transform: translateY(0.25em);
}


.bg_white a[href^='http']::after {
	background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='0D0D0D' d='M19 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h6v2H5v12h12v-6zM13 3v2h4.586l-7.793 7.793l1.414 1.414L19 6.414V11h2V3z'/%3E%3C/svg%3E");
	transform: translateY(0.25em);
  }



a.no_external_link{
  padding-right: revert;
}

a.no_external_link::after {
  display: none;
} */

audio::-webkit-media-controls-panel{
	background-color: var(--violet);
}
/* audio::-webkit-media-controls-mute-button
audio::-webkit-media-controls-play-button
audio::-webkit-media-controls-timeline-container
audio::-webkit-media-controls-current-time-display
audio::-webkit-media-controls-time-remaining-display
audio::-webkit-media-controls-timeline
audio::-webkit-media-controls-volume-slider-container
audio::-webkit-media-controls-volume-slider
audio::-webkit-media-controls-seek-back-button
audio::-webkit-media-controls-seek-forward-button
audio::-webkit-media-controls-fullscreen-button
audio::-webkit-media-controls-rewind-button
audio::-webkit-media-controls-return-to-realtime-button
audio::-webkit-media-controls-toggle-closed-captions-button */


/*=============================
  Details animation from
  https://nerdy.dev/open-and-close-transitions-for-the-details-element
=============================*/


details {
	/* inline-size: 50ch;
   */
   inline-size: 100%;
	@media (prefers-reduced-motion: no-preference) {
	  interpolate-size: allow-keywords;
	}
  
	&::details-content {
	  opacity: 0;
	  block-size: 0;
	  overflow-y: clip;
	  transition: content-visibility 0.68s allow-discrete, opacity 0.68s, block-size 0.68s;
	}
  
	&[open]::details-content {
	  opacity: 1;
	  block-size: auto;
	}
  }


/* oooh can we use view transitions yet? */
@view-transition {
	navigation: auto;
}

/* skip link */
a.skip_main {
	left: -999px;
	position: absolute;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
	z-index: -999;
}

a.skip_main:focus,
a.skip_main:active {
	color: #fff;
	background-color: #000;
	left: auto;
	top: auto;
	width: 30%;
	height: auto;
	overflow: auto;
	margin: 10px 35%;
	padding: 5px;
	border-radius: 15px;
	border: 4px solid var(--accent);
	text-align: center;
	font-size: 1.2em;
	z-index: 1219;
}

