/*! biscuitman.js 0.5.5 */
.biscuitman {
  --ui: 0, 0, 0;
  --tx: #444;
  --bg: #fff;
  --c: #105d89;
  background: var(--bg);
  box-sizing: border-box;
  z-index: 3;
  width: 100%;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  display: none;
  position: fixed;
  bottom: 0;
  box-shadow: 0 -2px 10px #00000029;
}

.bm-show .biscuitman {
  display: block;
}

.biscuitman * {
  box-sizing: border-box;
  color: var(--tx);
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4em;
}

.biscuitman:has([open]) {
  transform: translateY(100%);
}

.biscuitman article {
  padding: 0;
  position: relative;
}

@media (min-width: 770px) {
  .biscuitman article {
    padding-right: calc(max(300px, 30vw) + 20px);
  }

  .biscuitman article nav {
    width: 30vw;
    min-width: 300px;
    position: absolute;
    bottom: 50%;
    right: 0;
    transform: translateY(50%);
  }
}

.biscuitman article p {
  color: var(--tx);
  margin: 10px 0;
  font-size: 13px;
}

@media (min-width: 575px) {
  .biscuitman article p {
    font-size: 14px;
  }
}

.biscuitman button {
  background: var(--bg);
  border: 2px solid var(--c);
  color: var(--c);
  cursor: pointer;
  border-radius: 3px;
  margin-top: 10px;
  padding: .8em;
  font-size: 13px;
  line-height: 1em;
}

.biscuitman button[data-id="accept"] {
  background: var(--c);
  color: var(--bg) !important;
}

.biscuitman button[data-id="close"] {
  color: rgba(var(--ui), .5);
  opacity: .6;
  -webkit-user-select: none;
  user-select: none;
  z-index: 2;
  background: none;
  border: none;
  outline: none;
  padding: 10px;
  font-size: 24px;
  line-height: 1em;
  position: absolute;
  top: 0;
  right: 10px;
}

.biscuitman button[disabled] {
  display: none;
}

.biscuitman button:hover {
  opacity: .8;
}

@media (min-width: 576px) {
  .biscuitman nav {
    flex-direction: row-reverse;
    gap: 10px;
    width: 100%;
    display: flex;
  }

  .biscuitman nav button {
    flex-grow: 1;
    margin-bottom: 0;
  }
}

@media (max-width: 575px) {
  .biscuitman nav {
    flex-direction: column;
    flex-grow: 1;
    display: flex;
  }
}

.biscuitman dialog {
  background: var(--bg);
  border: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
}

@media (min-width: 576px) {
  .biscuitman dialog {
    border-radius: 10px;
    width: 90vw;
    max-width: 860px;
    max-height: 80vh;
    margin: auto;
    box-shadow: 0 0 8px #0000004d;
  }
}

@media (min-width: 576px) and (min-height: 1134px) {
  .biscuitman dialog {
    max-height: 950px;
  }
}

.biscuitman dialog nav {
  justify-self: flex-end;
  position: relative;
}

.biscuitman .bm-dialog {
  flex-direction: column;
  height: 100%;
  padding: 20px;
  display: flex;
}

.biscuitman .bm-dialog b {
  padding-bottom: 8px;
  position: relative;
}

.biscuitman .bm-dialog > b:after {
  content: "";
  background: linear-gradient(180deg, var(--bg) 20%, #fff0);
  pointer-events: none;
  z-index: 1;
  width: 100%;
  height: 25px;
  margin-bottom: -24px;
  position: absolute;
  bottom: 0;
  left: 0;
}

.biscuitman .bm-dialog nav:after {
  content: "";
  background: linear-gradient(0deg, var(--bg) 20%, #fff0);
  pointer-events: none;
  width: 100%;
  height: 25px;
  position: absolute;
  top: -24px;
  left: 0;
}

.biscuitman .bm-sections {
  scrollbar-color: rgba(var(--ui), .2) var(--bg);
  flex-shrink: 1;
  height: 100%;
  padding: 15px 0;
  position: relative;
  overflow-y: scroll;
}

@media (min-width: 576px) {
  .biscuitman .bm-sections {
    margin-right: -18px;
    padding-right: 4px;
  }
}

.biscuitman .bm-sections > p {
  padding-right: 30px;
  font-size: 13px;
  line-height: 18px;
}

@media (min-width: 576px) {
  .biscuitman .bm-sections > p {
    font-size: 14px;
  }
}

.biscuitman .bm-sections > p span {
  font-size: inherit;
  padding-bottom: 5px;
  display: inline-block;
}

.biscuitman .bm-sections > p [data-id="more"] ~ span {
  display: none;
}

.biscuitman a {
  font-size: inherit;
  color: var(--c);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.biscuitman a:hover {
  text-decoration: underline;
}

.biscuitman section {
  margin-bottom: 10px;
  position: relative;
}

.biscuitman section:first-of-type {
  margin-top: 10px;
}

.biscuitman details {
  border: 1px solid rgba(var(--ui), .2);
  border-radius: 5px;
  padding: 10px;
  list-style: none;
  box-shadow: 0 2px 4px #0000001a;
}

.biscuitman details[open] summary b:after {
  margin: -3px 0 0 -2px;
  transform: rotate(45deg)scale(.3);
}

.biscuitman summary {
  cursor: pointer;
  flex-direction: column;
  width: 100%;
  padding: 5px 80px 10px 10px;
  list-style: none;
  display: flex;
  position: relative;
}

.biscuitman summary b {
  margin-bottom: 3px;
}

.biscuitman summary b:after {
  content: "";
  border: 5px solid rgba(var(--ui), .4);
  border-top-color: #0000;
  border-left-color: #0000;
  border-radius: 2px;
  width: 1em;
  height: 1em;
  margin: -2px 0 0 -4px;
  display: block;
  transform: rotate(-45deg)scale(.3);
}

.biscuitman summary p {
  color: var(--tx);
  font-size: 14px;
}

.biscuitman summary > * {
  display: inline-flex;
}

.biscuitman summary::marker {
  display: none;
}

.biscuitman summary::-webkit-details-marker {
  display: none;
}

.biscuitman dl {
  background: rgba(var(--ui), .08);
  margin: 10px;
  padding: 10px;
  display: flex;
}

.biscuitman dl dt, .biscuitman dl dd {
  color: var(--tx);
  font-size: 12px;
}

.biscuitman dl dt {
  min-width: 120px;
  padding-right: 30px;
  font-weight: bold;
}

.biscuitman label {
  --height: 0px;
  --width: 2.3em;
  --gap: 2px;
  height: var(--height);
  width: var(--width);
  background-color: rgba(var(--ui), .3);
  border-radius: var(--height);
  margin-top: -2px;
  display: block;
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  font-size: 20px !important;
}

.biscuitman label:before {
  content: "";
  background: var(--bg);
  height: calc(var(--height)  - calc(var(--gap) * 2));
  width: calc(var(--height)  - calc(var(--gap) * 2));
  height: var(--height);
  width: var(--height);
  left: var(--gap);
  transform-origin: center;
  border-radius: 100%;
  display: block;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%)scale(.8);
}

.biscuitman label.checked {
  background-color: var(--c);
}

.biscuitman label.checked:before {
  left: auto;
  right: 0;
}

.biscuitman label:has(:focus-visible) {
  outline: auto highlight;
}

.biscuitman label.disabled.checked {
  opacity: .5;
}

.biscuitman label input {
  opacity: 0 !important;
}

.bm-dialog-polyfill .biscuitman dialog {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
}
