*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-color: var(--scrollbar-color);
  scrollbar-width: thin;
}

:root {
  --input-border: hsl(257, 13%, 27%);
  --input-focus-h: 255;
  --input-focus-s: 35%;
  --input-focus-l: 20%;
  --invalid-input-border: rgb(161, 5, 5);
  --scrollbar-color: rgb(169, 169, 169);
  --icon-color: rgba(172, 189, 189, 1);
}

html {
  /* Fix for the jumping layout issue when scrollbar appears */
  margin-left: calc(100vw - 100%);
  margin-right: 0;
}

body {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-color: #36454f;
}

@font-face {
  font-family: Roboto;
  src: url(fonts/Roboto/Roboto-Medium.ttf);
}

main {
  width: clamp(22rem, 80%, 52rem);
  padding: clamp(1rem, 5%, 2rem);
  margin: 1.5rem;
  font-family: Roboto, Verdana, Geneva, Tahoma, sans-serif;
  font-size: clamp(1rem, 3vw, 1.25rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #fff;
  border-radius: 0.75rem;
  box-shadow: 0px 0px 30px 10px rgba(0, 0, 0, 0.25);
}

main p:first-child {
  margin-top: 0;
}

p {
  line-height: 1.5em;
  margin-bottom: 0;
  margin-top: 2em;
  text-align: center;
}

section.wrapper {
  border: 1px solid lightgray;
  width: fit-content;
  padding: clamp(0.5rem, 2vh, 1rem);
  border-radius: 5px;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

section.wrapper:last-child {
  margin-bottom: 0;
}

.section-header__wrapper {
  display: grid;
  grid-template-columns: 1fr auto;
  width: 100%;
}

input {
  font-family: Roboto, Verdana, Geneva, Tahoma, sans-serif;
  font-size: clamp(1rem, 3vw, 1.25rem);
  border: 2px solid var(--input-border);
  border-radius: 5px;
  padding: 0.25rem;
  transition: 180ms box-shadow ease-in-out;
  cursor: pointer;
}

input:focus {
  border: 2px solid;
  border-color: hsl(
    var(--input-focus-h),
    var(--input-focus-s),
    var(--input-focus-l)
  );
  box-shadow: 0 0 0 1px
    hsla(
      var(--input-focus-h),
      var(--input-focus-s),
      calc(var(--input-focus-l) + 30%),
      0.8
    );
  outline: 3px solid transparent;
}

#verify-number input {
  width: 5.25em;
  text-align: center;
}

.generate-list-input {
  width: 5.25em;
  margin: 0.25rem 0;
  text-align: center;
}

.js-result {
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',
    'Lucida Sans', Arial, sans-serif;
  font-size: 1.25rem;
  text-align: justify;
  background-color: rgba(172, 189, 189, 0.15);
  border-radius: 15px;
  padding: 0.5rem 1.25rem;
  margin-top: 1.25rem;
  width: fit-content;
  max-width: 100%;
}

::-webkit-scrollbar {
  width: 5px;
  background: rgb(169, 169, 169);
  border-radius: 1ex;
  box-shadow: 0px 1px 2px rgba(211, 211, 211, 0.75);
  -webkit-border-radius: 1ex;
  -webkit-box-shadow: 0px 1px 2px rgba(211, 211, 211, 0.75);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-color);
}
/* Remove input arrows for Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* Remove input arrows for Firefox */
input[type='number'] {
  -moz-appearance: textfield;
}

.listResult {
  word-spacing: 0.5em;
  max-height: 50vh;
  overflow-y: auto;
  overflow-x: hidden;
  text-overflow: ellipsis;
  padding: 0.5em 1em;
  max-width: 98%;
}

.msg {
  border: 1px dotted var(--input-border);
  padding: 0.5em;
  border-radius: 6px;
}

.success {
  background: rgb(144, 238, 144, 0.7);
}

.error {
  background: rgb(240, 128, 128, 0.9);
}

.largeNumbersMsg {
  margin-top: 1em;
  text-align: center;
  color: rgb(91, 5, 5);
}

.btn-wrapper {
  display: flex;
  justify-content: right;
}

.btn-wrapper button {
  padding: 0.5em;
  margin: 0.5em;
  box-sizing: border-box;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  border: 1px solid #000;
  border-radius: 5px;
  box-shadow: 0px 1px 2px rgba(135, 5, 5, 0.75);
}

.btn-wrapper button:hover {
  cursor: pointer;
  box-shadow: 0px 1px 2px rgba(218, 203, 208, 0.75);
}

.icons-wrapper {
  display: flex;
  align-items: center;
  height: 1.5rem;
  margin-left: 0.75rem;
}

.icon {
  width: 1rem;
  height: 1rem;
  margin: auto 0.1em;
  color: var(--icon-color);
  transition: width 250ms;
  transition: height 250ms;
  transition: transform 500ms ease-in-out;
}

.icon-spacer {
  width: 1.2rem;
  height: 1.2rem;
  display: flex;
  justify-content: center;
}

.icon:hover {
  cursor: pointer;
  width: 1.25rem;
  height: 1.25rem;
}

.collapse {
  transform: rotate(-0deg);
}

.expand {
  transform: rotate(180deg);
}
