/*  Fonts  */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,500;1,300;1,500&display=swap');


/* variabili comuni */
:root {
  --transDur: 0.3s;
  --luna-blue: #009bde;
}


/* colori versione light*/
:root[data-theme="light"] {
  --background: #fff;
  --sfondo: #e6e5e5d7;
  --primary-text: #040806;
  --selectorFocus: #040806;
  --folderHighlighted: #e3e2e2;
  --switch-circle-bg: #040806;
  --switch-circle-pos: -2.5em;
  --switch-circle-pos-mobile: -3.6em;
  --logo-luna: url('index/Luna.svg');
  --logo-hicare: url('index/hicare_small.svg');
}

/* colori versione dark*/
:root[data-theme="dark"] {
  --background: #343131;
  --sfondo: #232121;
  --primary-text: #f3f1f2;
  --selectorFocus: #f3f1f2;
  --folderHighlighted: #2a2828;
  --switch-circle-bg: #f3f1f2;
  --switch-circle-pos: -0.2em;
  --switch-circle-pos-mobile: -0.1em;
  --logo-luna: url('index/Luna\(white\).svg');
  --logo-hicare: url('index/hicare_small_white.svg');
}


/* ----- GENERAL ----- */

body {
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  background: var(--sfondo);
  height: auto;
  width: auto;
  overflow-y: auto;
}

img {
  position: relative;
  max-width: 15em;
  max-height: 15em;
  margin: auto;
}

.luna {
  content: var(--logo-luna);
  position: relative;
  width: 60%;
  padding-bottom: 1em;
  display: block;
  margin: auto;
}

.hicare {
  content: var(--logo-hicare);
  max-width: 10em;
  margin-top: 2em;
}

/* ----- TEXT ----- */
h2 {
  position: relative;
  font-family: "Poppins", "Arial", "Helvetica", sans-serif;
  font-weight: 700;
  font-style: normal;
  text-align: center;
  color: var(--primary-text);
  font-size: 18px;
  margin: auto;
  caret-color: transparent;
}

h3 {
  position: relative;
  margin: auto;
  color: var(--primary-text);
  font-family: "Poppins", "Arial", "Helvetica", sans-serif;
  font-weight: 500;
  font-style: normal;
  text-align: center;
  font-size: 14px;
  caret-color: transparent;
}

h4 {
  color: var(--primary-text);
  font-family: "Poppins", "Arial", "Helvetica", sans-serif;
  font-weight: 300;
  font-style: normal;
  text-align: center;
  font-size: 11px;
  margin: 5px;
  caret-color: transparent;
}


/* ----- bottone di switch tema chiaro/scuro ----- */

.ThemeBox {
  position: relative;
  display: flex;
  columns: 3;
  flex-wrap: nowrap;
  flex-direction: row;
  align-items: center;
  vertical-align: middle;
  caret-color: transparent;
  justify-content: center;
  padding: 1.2em;
}

#theme-switcher {
  background-color: var(--background);
  border-radius: 50px;
  border: 1px solid var(--folderHighlighted);
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 0;
  cursor: pointer;
  padding: 0;
  position: relative;
  height: 2.5em;
  width: 5em;
}

#theme-switcher::before {
  content: '';
  position: absolute;
  width: 2.3em;
  height: 2.3em;
  background-color: var(--switch-circle-bg);
  border-radius: 50%;
  z-index: 1;
  right: 0;
  transform: translateX(var(--switch-circle-pos));
}

#theme-switcher svg {
  z-index: 2;
}

#icon-moon {
  opacity: 0.1;
}



/* ----- MAIN ----- */
.loginArea {
  display: flex;
  flex-direction: column;
  columns: 1;
  justify-content: center;
  margin: auto;
  width: auto;
  height: auto;
  text-align: center;
}

form {
  position: relative;
  margin: auto;
  height: max-content;
  width: max-content;
  display: flex;
  flex-direction: column;
  columns: 1;
  justify-content: space-evenly;
  padding: 20px 20px 0 20px;
  background-color: var(--background);
  border: 1px solid var(--folderHighlighted);
  border-radius: 20px;
  inset: 0;
  vertical-align: middle;
}

input {
  position: relative;
  background-color: var(--background) !important;
  color: var(--primary-text) !important;
  border-radius: 20px;
  font-family: "Poppins", "Arial", "Helvetica", sans-serif;
  font-weight: 300;
  font-style: normal;
  font-size: 14pt;
  text-indent: 0.5em;
  line-height: 1.40;
  margin: auto;
  border: 1px solid var(--luna-blue);
  caret-color: var(--luna-blue);
}

#username:focus,
#password:focus {
  box-sizing: border-box;
  border: 1px solid var(--selectorFocus) !important;
  outline: var(--selectorFocus);
  color: var(--primary-text) !important;
}

input:-webkit-autofill,
input:-webkit-autofill::first-line {
  -webkit-box-shadow: 0 0 0 50px var(--background) inset;
  -webkit-text-fill-color: var(--primary-text);
}


#btlogin {
  position: relative;
  display: inline;
  margin: 1.5em auto 1.5em auto;
  font-family: "Poppins", "Helvetica", "Arial", sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 15px;
  width: max-content !important;
  height: max-content !important;
  background-color: var(--background);
  border-radius: 50px;
  border: 1px solid var(--luna-blue);
  text-align: center;
  vertical-align: middle;
  color: var(--primary-text);
}

#btlogin:hover {
  background-color: var(--luna-blue);
  color: var(--background);
}

#logout {
  display: flex;
  flex-wrap: wrap;
  row-gap: 2em;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* ----- MEDIA QUERY ----- */

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
  h2 {
    font-size: 20px;
  }

  h3 {
    padding: 0.5em;
    font-size: 19px;
  }

  h4 {
    font-size: 15px;
  }

  .luna {
    margin: 1em auto;
  }

  #btlogin {
    margin: 1em auto;
    font-size: 20px;
    font-weight: 500;
  }

  #theme-switcher {
    padding: 0;
    gap: 0.7em;
    height: 3.5em;
    width: 7em;
  }

  #theme-switcher::before {
    width: 3.3em;
    height: 3.3em;
    right: 0;
    transform: translateX(var(--switch-circle-pos-mobile));
  }

  .loginArea {
    margin: auto;
    padding: 0;
  }

  form {
    margin: 1em auto;
    padding: 0 1em;
  }

  input {
    font-size: 18px;
    text-indent: 0.5em;
    line-height: 1.70;
  }

  svg {
    height: 2.4em;
    width: 2.4em;
  }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) and (max-width: 769px) {
  h2 {
    font-size: 20px;
    margin: auto;
  }

  h3 {
    padding: 0.8em;
    font-size: 19px;
  }

  h4 {
    font-size: 15px;
  }

  #theme-switcher {
    padding: 0;
    gap: 0.7em;
    height: 3.5em;
    width: 7em;
  }

  svg {
    height: 2.4em;
    width: 2.4em;
  }

  form {
    margin: 1em auto;
    padding: 0.8em;
  }

  #theme-switcher::before {
    width: 3.3em;
    height: 3.3em;
    right: 0;
    transform: translateX(var(--switch-circle-pos-mobile));
  }

  input {
    font-size: 18px;
    text-indent: 0.5em;
    line-height: 1.70;
  }

  .luna {
    width: 60%;
    padding-bottom: 1em;
  }

  #btlogin {
    margin: 1em auto;
    font-size: 20px;
    font-weight: 500;
  }
}

/* Medium devices (landscape tablets, 769px and up) */
@media only screen and (min-width: 769px) and (max-width: 992px) {
  h2 {
    font-size: 19px;
    margin: auto;
  }

  h3 {
    padding: auto 0.8em;
    font-size: 18px;
    margin: 0.8em;
  }

  h4 {
    font-size: 14px;
  }

  input {
    font-size: 16px;
    text-indent: 0.5em;
    line-height: 1.70;
  }

  .ThemeBox {
    padding: 0.5em;
  }

  #theme-switcher {
    padding: 0;
    gap: 0.7em;
    height: 3.5em;
    width: 7em;
  }

  form {
    margin: 1em auto;
    padding: 0.8em;
  }

  svg {
    height: 2.4em;
    width: 2.4em;
  }

  #theme-switcher::before {
    width: 3.3em;
    height: 3.3em;
    right: 0;
    transform: translateX(var(--switch-circle-pos-mobile));
  }

  #btlogin {
    margin: 1em auto;
    font-size: 20px;
    font-weight: 500;
  }

  .luna {
    margin: 1em auto;
  }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) and (max-width: 1200px) {
  h2 {
    font-size: 18px;
  }

  h3 {
    padding: 1em;
    font-size: 16px;
  }

  h4 {
    font-size: 12px;
    margin: 5px;
  }

  input {
    font-size: 15px;
    text-indent: 0.5em;
    line-height: 1.50;
    width: 80%;
  }

  .loginArea {
    height: 100%;
  }


  #btlogin {
    margin: 1.5em auto 1.5em auto;
    font-size: 16px;
  }

  form {
    margin: 1em auto;
    padding: 0.8em;
  }

  .luna {
    margin: 1em auto;
  }
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
  h2 {
    font-size: 18px;
  }

  h3 {
    padding: 1em;
    font-size: 16px;
  }

  h4 {
    font-size: 12px;
  }

  input {
    font-size: 15px;
    text-indent: 0.5em;
    line-height: 1.50;
  }

  .loginArea {
    margin: auto;
    padding: 0;
    height: 100%;
  }

  form {
    margin: 1em auto;
    padding: 0.8em;
  }

  #btlogin {
    margin: 1.5em auto;
    font-size: 15px;
  }

  .luna {
    margin: 1em auto;
  }
}