@import url(https://fonts.bunny.net/css?family=inter:100,200,300,400,500,600|instrument-sans:400,500,600,700,800);

:root {
    /* Colors */
    --blue: #0099ff;
    --green: #1a5f3f;
    --yellow: #f4d738;
    --orange: #f77f00;
    --pink: #ff898c;
    --red: #ff0006;
    --purple: #a388ee;

    --light-blue: #87ceeb75;
    --light-green: #1a5f3f75;
    --light-yellow: #f4d73875;
    --light-orange: #f8d6b375;
    --light-pink: #ff898c85;
    --light-purple: #a388ee75;
    --light-gray: #f0f0f0;

    /* Theme colors */
    --background: var(--green);
    --text: #fff;
    --text-disabled: #5a5a5a;
    --button-text: #000;
    --border: #000000;
    --button-bg: var(--orange);
    --secondary-bg: var(--light-gray);
    --button-shadow: #000000;
    --code-bg: #f5f5f5;
    --accent-color: var(--light-green);
    --font-family: 'Inter', "Helvetica Neue", Arial, sans-serif;
    --font-family-heading: 'Instrument Sans', "Helvetica Neue", Arial, sans-serif;
    --font-size: 1rem;

    /* Transitions */
    --transition: 0.2s ease-in-out;

    /* Icons */
    --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

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

:popover-open {
  width: 400px;
  position: absolute;
  inset: unset;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
}

::backdrop {
  backdrop-filter: blur(1px);
}

html,
body {
    height: 100%;
    line-height: 1.4;
    font-family: var(--font-family);
    font-size: var(--font-size);
    background-color: var(--background);
    color: var(--text);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 500;
    font-family: var(--font-family-heading);
    font-feature-settings: "liga" 0;
}

p {
    text-align: left;
}

ul,
ol {
    text-align: left;
}

li {
    display: list-item;
    line-height: 1.5;
}

mark {
    padding: .25rem;
}

table {
  width: 100%;
}

table,
td,
th {
    border-collapse: collapse;
}

td,
th {
    padding: .5rem .75rem;
    border: 1px solid var(--light-gray);
}

th {
    background-color: #eee;
}

/* Buttons */
button,
.button {
  margin-right: 0.75rem;
  padding: .5rem .75rem;
}

button,
.button,
figure audio,
figure video,
figure img {
    display: inline-block;
    font-family: var(--font-family);
    font-size: var(--font-size);
    text-align: center;
    text-decoration: none;
    color: var(--button-text);
    background-color: var(--button-bg);
    border: 2px solid var(--border);
    border-radius: 5px;
    box-shadow: 4px 4px 0 var(--button-shadow);
    cursor: pointer;
    transition: all 0.2s ease;
}

a.button {
    background-color: var(--button-bg);
}

a.button:hover {
    color: inherit;
}

figure audio,
figure video,
figure img {
    padding: 0;
    cursor: default;
}

figure figcaption {
    padding-left: 0.25rem;
}

::-webkit-media-controls-panel {
    background-color: var(--background);
}

button:hover,
.button:hover {
    box-shadow: 6px 6px 0 var(--button-shadow);
}

[role=secondary] {
  background-color: var(--light-green) !important;
}

[role=important] {
  background-color: var(--light-pink) !important;
}

/* Groups */
[role=group] {
  display: inline-flex;
  position: relative;
  /* width: 100%; */
  margin-bottom: var(--pico-spacing);
  border-radius: var(--pico-border-radius);
  box-shadow: var(--pico-group-box-shadow, 0 0 0 rgba(0, 0, 0, 0));
  vertical-align: middle;
  transition: box-shadow var(--transition);
}

[role=group] > *,
[role=group] input:not([type=checkbox], [type=radio]),
[role=group] select {
  position: relative;
  flex: 1 1 auto;
  margin-bottom: 0;
}
[role=group] > *:not(:first-child),
[role=group] input:not([type=checkbox], [type=radio]):not(:first-child),
[role=group] select:not(:first-child) {
  margin-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 0;
  box-shadow: 4px 4px 0 var(--button-shadow);
}
[role=group] > *:not(:last-child),
[role=group] input:not([type=checkbox], [type=radio]):not(:last-child),
[role=group] select:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: 0;
}
/* [role=group] > *:focus, */
/* [role=group] input:not([type=checkbox], [type=radio]):focus, */
/* [role=group] select:focus { */
  /* z-index: 2; */
/* } */
[role=group] button:not(:first-child),
[role=group] [type=submit]:not(:first-child),
[role=group] [type=reset]:not(:first-child),
[role=group] [type=button]:not(:first-child),
[role=group] [role=button]:not(:first-child),
[role=group] input:not([type=checkbox], [type=radio]):not(:first-child),
[role=group] select:not(:first-child) {
  margin-left: calc(var(--pico-border-width) * -1);
}
[role=group] button,
[role=group] [type=submit],
[role=group] [type=reset],
[role=group] [type=button],
[role=group] [role=button] {
  width: auto;
}
@supports selector(:has(*)) {
  [role=group]:has(button:focus, [type=submit]:focus, [type=button]:focus, [role=button]:focus) {
    --pico-group-box-shadow: var(--pico-group-box-shadow-focus-with-button);
  }
  [role=group]:has(button:focus, [type=submit]:focus, [type=button]:focus, [role=button]:focus) input:not([type=checkbox], [type=radio]),
  [role=group]:has(button:focus, [type=submit]:focus, [type=button]:focus, [role=button]:focus) select {
    border-color: transparent;
  }
  [role=group]:has(input:not([type=submit], [type=button]):focus, select:focus) {
    --pico-group-box-shadow: var(--pico-group-box-shadow-focus-with-input);
  }
  [role=group]:has(input:not([type=submit], [type=button]):focus, select:focus) button,
  [role=group]:has(input:not([type=submit], [type=button]):focus, select:focus) [type=submit],
  [role=group]:has(input:not([type=submit], [type=button]):focus, select:focus) [type=button],
  [role=group]:has(input:not([type=submit], [type=button]):focus, select:focus) [role=button] {
    --pico-button-box-shadow: 0 0 0 var(--pico-border-width) var(--pico-primary-border);
    --pico-button-hover-box-shadow: 0 0 0 var(--pico-border-width) var(--pico-primary-hover-border);
  }
  [role=group] button:focus,
  [role=group] [type=submit]:focus,
  [role=group] [type=reset]:focus,
  [role=group] [type=button]:focus,
  [role=group] [role=button]:focus {
    box-shadow: none;
  }
}

/* Forms */
.box,
input,
textarea,
select {
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid var(--border);
    border-radius: 5px;
    box-shadow: 4px 4px 0 var(--button-shadow);
    font-family: var(--font-family);
    font-size: var(--font-size);
    color: #111;
    background-color: #fff;
}

.box {
  padding: 0.75rem;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
}

label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

label .help {
    font-size: 0.8rem;
    margin: 0;
}

/* Checkboxes and Radio Buttons */
input[type="radio"],
input[type="checkbox"] {
    display: inline-block;
    width: auto;
    margin-right: 0.5rem;
    box-shadow: 3px 3px 0 var(--button-shadow);
    background-color: var(--button-bg);
    border-collapse: collapse;
}

select[multiple] {
    height: auto;
}

/* Fieldsets */
fieldset {
  border: 2px solid var(--border);
}

/* Details */
details {
  display: block;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border: 2px solid var(--border);
  border-radius: 5px;
  box-shadow: 4px 4px 0 var(--button-shadow);
}
details summary {
  line-height: 1rem;
  list-style-type: none;
  font-size: var(--font-size);
  cursor: pointer;
  transition: color var(--transition);
}
/* details summary:not([role]) { */
  /* color: var(--pico-accordion-close-summary-color); */
/* } */
details summary::-webkit-details-marker {
  display: none;
}
details summary::marker {
  display: none;
}
details summary::-moz-list-bullet {
  list-style-type: none;
}
details summary::after {
  display: block;
  width: 1rem;
  height: 1rem;
  margin-inline-start: calc(1rem * 0.5);
  float: right;
  transform: rotate(-90deg);
  background-image: var(--icon-chevron);
  background-position: right center;
  background-size: 1rem auto;
  background-repeat: no-repeat;
  content: "";
  transition: transform var(--transition);
}
details summary:focus {
  outline: none;
}
details[open] > summary {
  margin-bottom: 1rem;
}
details[open] > summary::after {
  transform: rotate(0);
}

/* Code Container */
pre {
    background-color: var(--light-gray);
    border: 2px solid var(--border);
    border-radius: 5px;
    box-shadow: 4px 4px 0 var(--button-shadow);
    padding: .5rem .75rem;
    font-family: monospace;
    font-size: calc(var(--font-size) * .75);
    margin-bottom: 1rem;
}

/* Text Links */
a {
    color: var(--blue);
    text-decoration: underline;
}

a:hover {
    color: var(--red);
}

a:hover::after {
    color: var(--text);
}

a:disabled,
a[disabled] {
    color: var(--text-disabled);
}

/* Henhouse Specific */
#logo {
  float: left;
  width: 100px;
  margin-right: 1rem;
}

details, details > * {
  color: #111;
  background-color: #fff;
}

header nav {
  text-align: right;
}

.success {
  background-color: var(--light-green);
}

.error {
  background-color: var(--light-pink);
}

#usage {
  position: relative;
  padding: 0;
}

#usage span {
  display: inline-block;
  padding: .5rem .75rem;
  width: 100%;
  text-align: center;
}

#usage::before {
  content: "";
  display: block;
  position: absolute;
  padding-top: 1rem;
  background-color: var(--light-yellow);
  color: transparent;
}

#usage.p10::before { content: "x"; padding-left: 10%; }
#usage.p20::before { content: "x"; padding-left: 20%; }
#usage.p30::before { content: "x"; padding-left: 30%; }
#usage.p40::before { content: "x"; padding-left: 40%; }
#usage.p50::before { content: "x"; padding-left: 50%; }
#usage.p60::before { content: "x"; padding-left: 60%; }
#usage.p70::before { content: "x"; padding-left: 70%; }
#usage.p80::before { content: "x"; padding-left: 80%; }
#usage.p90::before { content: "x"; padding-left: 90%; }
#usage.p100::before { content: "x"; padding-left: 100%; }
