/*
v2.6
https://github.com/Niumination/
*/

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 100;
  src: local('Roboto Mono Thin'), local('RobotoMono-Thin'),
    url('../font/RobotoMono-Thin.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 300;
  src: local('Roboto Mono Light'), local('RobotoMono-Light'),
    url('../font/RobotoMono-Light.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 400;
  src: local('Roboto Mono Regular'), local('RobotoMono-Regular'),
    url('../font/RobotoMono-Regular.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 700;
  src: local('Roboto Mono Bold'), local('RobotoMono-Bold'),
    url('../font/RobotoMono-Bold.ttf') format('truetype');
  font-display: swap;
}


* {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;

  list-style: none;
  text-decoration: none;

  -webkit-font-smoothing: subpixel-antialiased;
  -moz-font-smoothing: subpixel-antialiased;
  -o-font-smoothing: subpixel-antialiased;

  text-rendering: optimizeLegibility;
}

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

:root {
  --font: 'Roboto Mono', system-ui, Helvetica, Arial;
  --font-alt: "Segoe UI", sans-serif, Arial;
  --font-time: 'Roboto Mono', Helvetica, Arial;

  /* Bookmarks colors */
  --bm-bg: #fdfdfd;

  --first-bm: #D8ACAC;
  --second-bm: #05C715;
  --third-bm: #E69A00;
  --fourth-bm: #C295FE;
  --fifth-bm: #CAAFB7;
  --sixth-bm: #00D7E6;

  /* general */
  --bg: #E6E6E6;
  --modal-bg: var(--bm-bg);
  --modal-a: #0404FB;
  --modal-a-visited: #4E00B3;
  --bg-reloj: rgba(134, 134, 134, 0.349);

  --orange: #9aa0a6; /* muted accent */

  /* subtle hover background */
  --hover-bg: rgba(0, 0, 0, 0.06);

  --white: #ffffff;
  --grey: #b3b3b3;
  --dark-grey: #1C1C1C;
  --black: #000000;

  /* no cambian independientes del tema */
  --fix-white: var(--white);
  --fix-black: var(--black);

  /* tried some other wallpaper from here https://old.reddit.com/r/Cinemagraphs they look great, I recommend this one https://i.imgur.com/1t9KQjg.gifv */
  --wallpaper: url("../img/Chemical-Convection-by-teundenouden.jpeg");

  --border-radius: 10px;
}

.dark-mode {
  /* Bookmarks colors */
  --bm-bg: #1C1C1C;
  /* #121212 */

  --first-bm: #381A1A;
  --second-bm: #024c08;
  --third-bm: #6e4a00;
  --fourth-bm: #3c018a;
  --fifth-bm: #6F4954;
  --sixth-bm: #00484D;

  /* general */
  --bg: #0a0a0a;
  --modal-bg: var(--bm-bg);
  --modal-a: #47D1D1;
  --modal-a-visited: #D1ADFF;
  --bg-reloj: rgba(23, 23, 23, 0.349);

  --orange: #8F1100;

  /* subtle hover background for dark */
  --hover-bg: rgba(255, 255, 255, 0.08);

  --white: #000000;
  --grey: #b3b3b3;
  --dark-grey: #C1C1C1;
  --black: #ffffff;

  .image {
    -webkit-box-shadow: inset 0 0 60vw var(--fix-black);
    box-shadow: inset 0 0 60vw var(--fix-black);
  }
}

.fade {
  -webkit-transition: all .6s ease-out;
  -o-transition: all .6s ease-out;
  transition: all .6s ease-out;
}

body {
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12' viewBox='0 0 20 12'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='charlie-brown' fill='%23585858' fill-opacity='0.05'%3E%3Cpath d='M9.8 12L0 2.2V.8l10 10 10-10v1.4L10.2 12h-.4zm-4 0L0 6.2V4.8L7.2 12H5.8zm8.4 0L20 6.2V4.8L12.8 12h1.4zM9.8 0l.2.2.2-.2h-.4zm-4 0L10 4.2 14.2 0h-1.4L10 2.8 7.2 0H5.8z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  font-family: var(--font);
  color: var(--black);
}

button,
a,
input,
label{
  &:focus-visible {
    outline: 2px var(--modal-a) solid;
  }
}

.sombra {
  -webkit-box-shadow:
    0 1px 2px rgba(0,0,0,0.06),
    0 4px 16px rgba(0,0,0,0.06);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.06),
    0 4px 16px rgba(0,0,0,0.06);
}

.sombra-sm {
  -webkit-box-shadow:
    0 1px 2px rgba(0,0,0,0.05);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.05);
}

.container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 15px;
  padding: 15px 0;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  justify-items: center;
  height: 100dvh;
  -webkit-animation: fadein 1s;
  animation: fadein 1s;
}

/*  Wallpaper */
.image {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  width: 100%;
  background: var(--wallpaper);
  background-size: cover;
  background-position-x: center;
  background-position-y: bottom;
  background-repeat: no-repeat;
  outline: 1px solid var(--orange);
  gap: 20px;
}

.container-botones-imagen {
  display: -ms-flexbox;
  display: -webkit-box;
  display: flex;
  justify-content: space-between;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  width: 100%;
}

.container-checkbox-tema {
  margin: 10px 0 0 10px;
}

label {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  width: 50px;
  height: 20px;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 0 6px;
  background: var(--white);
  border-radius: 50px;
  cursor: pointer;
  position: relative;
  -webkit-transition: 0.3s;
  -o-transition: 0.3s;
  transition: 0.3s;
}

.ball {
  position: absolute;
  display: block;
  width: 12px;
  height: 12px;
  top: 4px;
  left: 5px;
  background: var(--black);
  border-radius: 50%;
  -webkit-transition: 0.8s;
  -o-transition: 0.8s;
  transition: 0.8s;
}

.container-checkbox-tema input {
  position: absolute;
  padding: 0 6px;
  width: 50px;
  height: 20px;
  border-radius: 50px;
  overflow: hidden;
}

.container-checkbox-tema input:checked+label .ball {
  -webkit-transform: translateX(28px);
  -ms-transform: translateX(28px);
  transform: translateX(28px);
  background: var(--black);
}

.container-checkbox-tema input:checked+label {
  background: var(--white);
}

.boton-open-modal {
  border-radius: 50%;
  cursor: pointer;
  color: var(--black);
  padding: 2px;
  margin: 10px 10px 0 0;
  height: -webkit-fit-content;
  height: -moz-fit-content;
  height: fit-content;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  background-color: var(--white);

  &:hover {
    background-color: var(--orange);
  }
}

.skull {
  padding: 10% 0 0 0;
  height: 19px;
  width: 19px;
}

/* Tiempo */
.tiempo-fondo {
  background-color: var(--bg-reloj);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 16px;
}

.tiempo {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  font-family: var(--font-time);
  text-transform: uppercase;

  .reloj {
    display: inherit;
    font-size: clamp(3rem, 10vw, 4rem);

    .hora {
      font-weight: 700;
    }

    .am-pm {
      font-weight: 100;
    }
  }

  .fecha {
    font-weight: 300;
    font-size: clamp(1rem, 5vw, 2rem);
  }
}

.mention-wallpaper {
  -ms-flex-item-align: end;
  align-self: flex-end;
  -ms-grid-column-align: left;
  justify-self: left;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 4px;
  background-color: var(--orange);
  font-size: smaller;
  white-space: normal;
  padding: 8px;
  border-radius: var(--border-radius) 0 0 0;
  opacity: 0.5;
  font-weight: 400;
  -webkit-transition: opacity .3s ease-in-out;
  -o-transition: opacity .3s ease-in-out;
  transition: opacity .3s ease-in-out;

  a {
    color: var(--black);
    font-weight: 700;
    border-bottom: 2px transparent solid;

    &:hover {
      border-bottom: 2px var(--black) solid;
    }
  }

  &:hover {
    opacity: 1;
    -webkit-transition: opacity .3s ease-in-out;
    -o-transition: opacity .3s ease-in-out;
    transition: opacity .3s ease-in-out;
  }
}


/*  MARK: searchbar */
.searchbar-section {
  display: flex;
  width: clamp(65%, 70%, 80%);
}

.bm-add-form {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  width: clamp(65%, 70%, 80%);
}

#bm-add {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 1fr;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  padding: 10px;
  background: var(--bm-bg);
  border-radius: var(--border-radius);
}

#bm-add label {
  -ms-grid-column-span: 2;
  grid-column: span 2;
  font-size: 0.9rem;
  color: var(--dark-grey);
}

#bm-add input,
#bm-add select {
  width: 100%;
  background: var(--white);
  color: var(--black);
  border-radius: var(--border-radius);
  padding: 8px 10px;
}

#bm-submit {
  -ms-grid-column-span: 2;
  grid-column: span 2;
  padding: 8px 12px;
  background: var(--black);
  color: var(--white);
  border-radius: var(--border-radius);
  cursor: pointer;

  &:hover {
    background: var(--orange);
    color: var(--black);
  }
}

.custom-search-select {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 8px;
}

.search-select-btn {
  background: var(--bm-bg);
  border: none;
  border-radius: var(--border-radius);
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  min-width: 40px;
  min-height: 40px;
  transition: box-shadow .2s;

  &:hover {
    outline: 1px solid var(--orange);
  }

  svg {
    width: 1.4rem;
    height: 1.4rem;
    color: var(--black);
  }
}

.search-select-list {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  z-index: 10;
  background: var(--bm-bg);
  border-radius: var(--border-radius);
  min-width: 320px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  outline: 1px solid var(--orange);

  &.active {
    display: block;
  }
}

.search-select-option {
  display: flex;
  gap: 10px;
  margin: 4px 0;
  padding: 12px 16px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--black);
  background: none;
  border: none;
  width: 100%;
  border-radius: var(--border-radius);

  svg {
    width: 1.4rem;
    height: 1.4rem;
  }

  &.active {
    background: var(--black);
    color: var(--white);
  }

  &:hover {
    background: var(--orange);
    color: var(--black);
  }
}

.search-command {
  opacity: .7;
}

.search-name {
  font-weight: bolder;
  opacity: .8;
}

/* SEARCHBAR */
.searchbox {
  flex: 1 1 auto;
  height: 100%;
  margin-left: -2px;
  min-width: 0;

  background-color: var(--bm-bg);
  border-radius: var(--border-radius);
  padding: .5em .7em;
  outline: 2px transparent solid;
  color: var(--black);

  &:focus {
    outline: 1px var(--orange) solid;
  }

  &:hover {
    outline: 1px solid var(--orange);
  }
}

/*  MARK: Bookmarks */
.bm-container {
  position: relative;
  width: clamp(65%, 70%, 80%);
  min-height: 300px;
  height: 100%;
}

.bm-container-tabs {
  position: absolute;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.bm-container-tabs-titles,
.bm-container-tabs-content {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: minmax(30px, 1fr) minmax(30px, 1fr) minmax(30px, 1fr) minmax(30px, 1fr) minmax(30px, 1fr);
  grid-template-columns: repeat(5, minmax(30px, 1fr));
  -webkit-column-gap: 10px;
  -moz-column-gap: 10px;
  column-gap: 10px;
}

.bm-tab-title {
  font-size: clamp(0.95rem, 0.9vw, 1.2rem);
  background-color: var(--bm-bg);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  padding: 8px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  cursor: pointer;
  white-space: normal;

  &:nth-child(1) {
    border-bottom: 2px var(--first-bm) solid;
  }

  &:nth-child(2) {
    border-bottom: 2px var(--second-bm) solid;
  }

  &:nth-child(3) {
    border-bottom: 2px var(--third-bm) solid;
  }

  &:nth-child(4) {
    border-bottom: 2px var(--fourth-bm) solid;
  }

  &:nth-child(5) {
    border-bottom: 2px var(--fifth-bm) solid;
  }
}

.bm-container-tabs-content {
  overflow: hidden;
}

.bm-tab {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  overflow: hidden;
  background-color: var(--bm-bg);
  scrollbar-width: thin; /* Firefox */

  &::-webkit-scrollbar {
    background-color: var(--bm-bg);
    width: 1px;
  }

  &::-webkit-scrollbar-thumb {
    background: var(--grey);
  }
}

.bm-content {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: scroll;

  a {
    color: var(--dark-grey);
    padding: 8px;

    &:hover {
      color: var(--black);
    }
  }

  &[data-tab*="1"] a:hover,
  &[data-tab*="2"] a:hover,
  &[data-tab*="3"] a:hover,
  &[data-tab*="4"] a:hover,
  &[data-tab*="5"] a:hover {
    background-color: var(--hover-bg);
  }
}

/* MARK: media */
@media screen and (max-width: 945px) {
  .bm-container-tabs-titles {
    -webkit-column-gap: 0;
    -moz-column-gap: 0;
    column-gap: 0;
  }

  .bm-container-tabs-content {
    -ms-grid-columns: 1fr;
    grid-template-columns: 1fr;
    -webkit-column-gap: 0;
    -moz-column-gap: 0;
    column-gap: 0;
  }

  .bm-tab-title {
    border-radius: 0;
    font-size: smaller;

    &:first-child {
      border-radius: var(--border-radius) 0 0 0;
    }

    &:last-child {
      border-radius: 0 var(--border-radius) 0 0;
    }

    &.active {
      &:nth-child(1) {
        background-color: var(--first-bm);
      }

      &:nth-child(2) {
        background-color: var(--second-bm);
      }

      &:nth-child(3) {
        background-color: var(--third-bm);
      }

      &:nth-child(4) {
        background-color: var(--fourth-bm);
      }

      &:nth-child(5) {
        background-color: var(--fifth-bm);
      }
    }
  }

  .bm-content {
    display: none;
  }

  .bm-content.active {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
  }
}

/* MARK: MODAL */
.modal {
  display: none;
  position: fixed;
  padding: 100px 0 100px 0;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  font-family: var(--font-alt);
}

.modal-content {
  position: relative;
  background-color: var(--modal-bg);
  margin: auto;
  width: clamp(50%, 80%, 95%);
  word-wrap: break-word;
  -webkit-animation: animatetop 0.4s;
  animation: animatetop 0.4s;
  overflow: hidden;
  border-radius: var(--border-radius);
  outline: 1px solid var(--orange);
}

.close {
  color: var(--black);
  float: right;
  font-size: 2rem;
  background: transparent;

  &:hover {
    color: var(--orange);
    cursor: pointer;
  }
}

.modal-body {
  padding: 24px;
  line-height: 2;

  a {
    font-weight: 700;
    color: var(--modal-a);

    &:hover {
      border-bottom: 2px var(--black) solid;
    }

    &:visited {
      color: var(--modal-a-visited);
    }
  }

  li {
    list-style-type: disc;
  }
}

.modal-footer {
  background-color: var(--bg);

  a {
    padding: 10px 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    color: var(--black);

  }

  .repo-github {
    fill: var(--black);
    width: 36px;
    height: 36px;
  }

  &:hover { }
}

.footer-message a {
  margin: 10px 0;
  color: var(--black);
}

.underline {
  background-image: -o-linear-gradient(330deg, var(--orange) 0%, var(--orange) 100%);
  background-image: linear-gradient(120deg, var(--orange) 0%, var(--orange) 100%);
  border-radius: 10px 10px 0 0;
  background-repeat: no-repeat;
  background-size: 100% 0.25em;
  background-position: 0 120%;
  -webkit-transition: background-size 0.2s ease-in-out;
  -o-transition: background-size 0.2s ease-in-out;
  transition: background-size 0.2s ease-in-out;

  &:hover {
    color: var(--black);
    background-size: 100% 89%;
    padding: 5px 2px 0 2px;
  }
}

noscript {
  color: var(--black);
}

/* MARK: Animaciones */
@keyframes fadein {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@-webkit-keyframes fadein {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes animatetop {
  from {
    top: -300px;
    opacity: 0
  }

  to {
    top: 0;
    opacity: 1
  }
}

@-webkit-keyframes animatetop {
  from {
    top: -300px;
    opacity: 0
  }

  to {
    top: 0;
    opacity: 1
  }
}