
/* MAIN - DARK MODE TOGGLE */
/* From Uiverse.io by JkHuger */ 
/* Default */
.theme {
  position: absolute;
  left: 5rem;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.theme__fill,
.theme__icon {
  transition: 0.3s;
}

.theme__fill {
  background-color: var(--bg);
  display: block;
  mix-blend-mode: difference;
  position: fixed;
  inset: 0;
  height: 100%;
  transform: translateX(-100%);
}

.theme__icon,
.theme__toggle {
  z-index: 1;
}

.theme__icon,
.theme__icon-part {
  position: absolute;
}

.theme__icon {
  display: block;
  top: 0.25rem;
  left: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
}

.theme__icon-part {
  border-radius: 50%;
  box-shadow: 0.4rem -0.4rem 0 0.5rem #082549 inset;
  top: calc(52.5% - 0.5rem);
  left: calc(52.5% - 0.5rem);
  width: 0.9rem;
  height: 0.9rem;
  transition: box-shadow var(--transDur) ease-in-out,
		opacity var(--transDur) ease-in-out,
		transform var(--transDur) ease-in-out;
  transform: scale(0.5);
}

.theme__icon-part ~ .theme__icon-part {
  background-color: #082549;
  border-radius: 0.05rem;
  top: 50%;
  left: calc(50% - 0.05rem);
  transform: rotate(0deg) translateY(0.5rem);
  transform-origin: 50% 0;
  width: 0.1rem;
  height: 0.15rem;
}

.theme__icon-part:nth-child(3) {
  transform: rotate(45deg) translateY(0.45rem);
}

.theme__icon-part:nth-child(4) {
  transform: rotate(90deg) translateY(0.45rem);
}

.theme__icon-part:nth-child(5) {
  transform: rotate(135deg) translateY(0.45rem);
}

.theme__icon-part:nth-child(6) {
  transform: rotate(180deg) translateY(0.45rem);
}

.theme__icon-part:nth-child(7) {
  transform: rotate(225deg) translateY(0.45rem);
}

.theme__icon-part:nth-child(8) {
  transform: rotate(270deg) translateY(0.5rem);
}

.theme__icon-part:nth-child(9) {
  transform: rotate(315deg) translateY(0.5rem);
}

.theme__label,
.theme__toggle,
.theme__toggle-wrap {
  position: relative;
}

.theme__toggle,
.theme__toggle:before {
  display: block;
}

.theme__toggle {
  background-color: #f7e0c5;
  border-radius: 25% / 50%;
  box-shadow: 0 0 0 0.125rem var(--primaryT);
  padding: 0.2rem;
  width: 4rem;
  height: 2rem;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color var(--transDur) ease-in-out,
		box-shadow 0.15s ease-in-out,
		transform var(--transDur) ease-in-out;
}

.theme__toggle:before {
  background-color: #f7e0c5;
  border-radius: 50%;
  content: "";
  width: 1.6rem;
  height: 1.6rem;
  transition: 0.3s;
}

.theme__toggle:focus {
  box-shadow: 0 0 0 0.125rem var(--primary);
  outline: transparent;
}

/* Checked */
.theme__toggle:checked {
  background-color: rgb(18, 48, 82);
}

.theme__toggle:checked:before,
.theme__toggle:checked ~ .theme__icon {
  transform: translateX(2rem);
}

.theme__toggle:checked:before {
  background-color: rgb(18, 48, 82);
}

.theme__toggle:checked ~ .theme__fill {
  transform: translateX(0);
}

.theme__toggle:checked ~ .theme__icon .theme__icon-part:nth-child(1) {
  box-shadow: 0.2rem -0.2rem 0 0.2rem hsl(0,0%,100%) inset;
  transform: scale(1);
  top: 0.3rem;
  left: 0.15rem;
}

.theme__toggle:checked ~ .theme__icon .theme__icon-part ~ .theme__icon-part {
  opacity: 0;
}

.theme__toggle:checked ~ .theme__icon .theme__icon-part:nth-child(2) {
  transform: rotate(45deg) translateY(0.8rem);
}

.theme__toggle:checked ~ .theme__icon .theme__icon-part:nth-child(3) {
  transform: rotate(90deg) translateY(0.8rem);
}

.theme__toggle:checked ~ .theme__icon .theme__icon-part:nth-child(4) {
  transform: rotate(135deg) translateY(0.8rem);
}

.theme__toggle:checked ~ .theme__icon .theme__icon-part:nth-child(5) {
  transform: rotate(180deg) translateY(0.8rem);
}

.theme__toggle:checked ~ .theme__icon .theme__icon-part:nth-child(6) {
  transform: rotate(225deg) translateY(0.8rem);
}

.theme__toggle:checked ~ .theme__icon .theme__icon-part:nth-child(7) {
  transform: rotate(270deg) translateY(0.8rem);
}

.theme__toggle:checked ~ .theme__icon .theme__icon-part:nth-child(8) {
  transform: rotate(315deg) translateY(0.8rem);
}

.theme__toggle:checked ~ .theme__icon .theme__icon-part:nth-child(9) {
  transform: rotate(360deg) translateY(0.8rem);
}

.theme__toggle-wrap {
  margin: 0 0.75rem;
}

@supports selector(:focus-visible) {
  .theme__toggle:focus {
    box-shadow: 0 0 0 0.125rem var(--primaryT);
  }

  .theme__toggle:focus-visible {
    box-shadow: 0 0 0 0.125rem var(--primary);
  }
}

/* CUSTOM BUTTON */

/* From Uiverse.io by cssbuttons-io */ 
.main-button {
    --color:#082549;
    text-align: center;
    /* font-size: 28px; */
    font-family: inherit;
    display: inline-block;
    width: 80%;
    /* height: em; */
    line-height: 4rem;
    margin: 1rem;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background-color: transparent;
    border: 0.1rem solid var(--color);
    transition: color 0.5s;
    z-index: 1;
    font-size: 1.4rem;
    border-radius: 0.1rem;
    font-weight: inherit;
    color: var(--color);
    box-shadow: 0.25rem 0.25rem 0.25rem #ccc;
}

.dark-mode .main-button{
    --color: #FFF3E5;
    box-shadow: none;
}

.main-button:before {
    content: "";
    position: absolute;
    z-index: -1;
    background: var(--color);
    height: 17.5rem;
    width: 30rem;
    border-radius: 70%;
}

.main-button:hover {
    color: #fff;
}

.dark-mode .main-button:hover{
    color: #082549;
}

.main-button:before {
    top: 100%;
    left: 100%;
    transition: all 0.7s;
}

.main-button:hover:before {
    top: -3.5rem;
    left: -3.5rem;
}

.main-button:active:before {
    background: #082549;
    transition: background 0s;
}

.dark-mode .main-button:active:before{
    background: #FFF3E5;
}


/* CUSTOM CHECKBOX */

/* From Uiverse.io by KhaledMatalkah */ 
.custom-checkbox {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 0.8rem;
  color: #333;
  transition: color 0.3s;
}

.dark-mode .custom-checkbox{
    color: #FFF3E5;
}

.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-checkbox .checkmark {
  width: 1.2rem;
  height: 1.2rem;
  border: 0.1rem solid #333;
  border-radius: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  transition: background-color 0.3s, border-color 0.3s, transform 0.3s;
  transform-style: preserve-3d;
}


.dark-mode .custom-checkbox .checkmark{
    border: 0.1rem solid #FFF3E5;
}

.custom-checkbox .checkmark::before {
  content: "\2713";
  font-size: 16px;
  color: transparent;
  transition: color 0.3s, transform 0.3s;
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark {
  background-color: #333;
  border-color: #333;
  transform: scale(1.1) rotateZ(360deg) rotateY(360deg);
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark::before {
  color: #fff;
}

.custom-checkbox:hover {
  color: #666;
}

.custom-checkbox:hover .checkmark {
  border-color: #666;
  background-color: #f0f0f0;
  transform: scale(1.05);
}

.custom-checkbox input[type="checkbox"]:focus + .checkmark {
  box-shadow: 0 0 0.15rem 0.1rem rgba(0, 0, 0, 0.2);
  outline: none;
}

.custom-checkbox .checkmark,
.custom-checkbox input[type="checkbox"]:checked + .checkmark {
  transition: background-color 1.3s, border-color 1.3s, color 1.3s, transform 0.3s;
}

/* CUSTOM SWITCH */

/* From Uiverse.io by gharsh11032000 */ 
/* The switch - the box around the slider */
.switch {
  font-size: 0.7rem;
  position: relative;
  display: inline-block;
  width: 3.5em;
  height: 2em;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  border: 0.1rem solid #082549;
  border-radius: 2.5rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dark-mode .slider{
    border: 0.1rem solid #FFF3E5;
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.4em;
  width: 1.4em;
  left: 0.2em;
  bottom: 0.2em;
  background-color: #082549;
  border-radius: inherit;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.dark-mode .slider:before{
    background-color:#FFF3E5;
}

.switch input:checked + .slider {
  box-shadow: 0 0 0.5rem #082549;
  border: 0.1rem solid #082549;
}

.dark-mode .switch input:checked + .slider{
  box-shadow: 0 0 0.5rem #FFF3E5;
  border: 0.1rem solid #FFF3E5;
}

.switch input:checked + .slider:before {
  transform: translateX(1.5em);
}