@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");
:root {
  --blue: #bae1ff;
  --red: #ffb3ba;
  --orange: #ffdfba;
  --yellow: #ffffba;
  --green: #baffc9;
  --grey: #333333;
  --white: #edefee;
}

* {
  padding: 0;
  margin: 0;
}
body {
  font-family: Montserrat;
  background: var(--white);
}
main {
  min-height: 85dvh;
  max-height: auto;
  /*border: 2px solid red;*/
  grid-template-areas:
    "navSidebar"
    "nav"
    "comments"
    "resultsTorn"
    "emptyPage";
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr 5fr auto auto;
  justify-items: center;
}

/*estilo para la navBar sidebar*/
.navSidebar {
  grid-area: navSidebar;
  background: linear-gradient(to right, var(--blue) 50%, var(--red) 90%);
  display: none;
  grid-template-areas: "burguer text bulb";
  grid-template-rows: auto;
  align-items: center;
  grid-template-columns: 1fr 1fr 1fr;
  width: 100dvw;
  height: 8dvh;
  /*padding: 10px;*/
}
/*estilo para el bulb*/
.bulb {
  grid-area: bulb;
  border: 1px solid var(--grey);
  border-radius: 14px;
  background: linear-gradient(to right, var(--yellow) 40%, var(--blue) 60%);
  position: absolute;
  right: 10px;
  width: 65px;
  height: 29px;
  display: flex;
  align-items: center;
}
.bulb i {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid grey;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  cursor: pointer;
  background-color: var(--blue);
  color: var(--yellow);
  font-size: 1rem;
}
.nav {
  grid-area: nav;
  font-weight: 500;
  display: flex;
  width: 100dvw;
  justify-content: space-around;
  align-items: center;
  padding: 10px 10px 0 10px;
  background: linear-gradient(to right, var(--blue) 50%, var(--red) 90%);
}

.settings {
  display: grid;
  grid-template-areas:
    "titleSett"
    "screens"
    "settButtons";
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 1fr;
  height: 100%;
  gap: 10px;
  padding: 20px;
}

label {
  font-weight: bold;
  color: var(--grey);
}

.settButtons {
  text-align: center;
  grid-area: settButtons;
}
.titleSett {
  grid-area: titleSett;
  text-align: center;
  color: var(--blue);
  font-weight: bold;
  /*border: 12px solid forestgreen;*/
}
.screens,
.opts {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  gap: 10px;
  /*border: 2px solid red;*/
  grid-area: screens;
  margin: 0 50px 0 50px;
}
.opts {
  /*border: 2px solid blue;*/
  grid-area: opts;
}
.comments {
  grid-area: comments;
  margin-top: 20px;
  left: 10%;
  position: fixed;
  z-index: 90;
  justify-self: center;
  transform: translateY(-1000px);
  width: 80%;
  height: auto;
  border-radius: 8px;
  background: linear-gradient(162deg, var(--yellow) 40%, var(--orange) 70%);
  border: 2px solid var(--blue);
}

#messages {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  padding: 20px;
}
.textArea {
  width: 80%;
  display: grid;
  gap: 20px;
}
/*estilo de las alertas*/
.alertNotif {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: repeat(3, 30px);
  font-weight: bold;
  /*border: 2px solid red;*/
  /*justify-items: center;*/
  gap: 20px;
  justify-self: end;
  align-self: end;
  /*padding-top: 20px;*/
}
#buttonSection {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Fondo del modal */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

/* Contenido del modal */
.modal-content {
  background-color: #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  border: 1px solid #888;
  width: 70vw;
  text-align: center;
}

/*icon para cerrar los modales*/
.close-modal {
  position: absolute;
  top: 5px;
  right: 5px;
  color: white;
  cursor: pointer;
  background-color: var(--red);
  border-radius: 5px;
  width: 21px;
  text-align: center;
  box-shadow: 1px 1px 2px #333;
  font-weight: bold;
}

.toggle {
  cursor: pointer;
  isolation: isolate;
  position: relative;
  margin-left: 10px;
  height: 25px;
  width: 50px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow:
    -8px -4px 8px 0px #ffffff,
    8px 4px 12px 0px #d1d9e6,
    4px 4px 4px 0px #d1d9e6 inset,
    -4px -4px 4px 0px #ffffff inset;
}
.toggle-state,
.toggle-hide {
  display: none;
}
.indicator,
.indicatorHide {
  height: 100%;
  width: 200%;
  background: var(--red);
  border-radius: 15px;
  transform: translate3d(-75%, 0, 0);
  transition: transform 0.4s cubic-bezier(0.85, 0.05, 0.18, 1.35);
  box-shadow:
    -8px -4px 8px 0px #ffffff,
    8px 4px 12px 0px #d1d9e6;
}
.toggle-state:checked ~ .indicator,
.toggle-hide:checked ~ .indicatorHide {
  transform: translate3d(25%, 0, 0);
}
.buttSidebar {
  /*border: 2px solid red;*/
  grid-area: burguer;
  padding-left: 10px;
}

.titleSidebar {
  /*border: 2px solid red;*/
  grid-area: text;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sidebar {
  display: flex;
  z-index: 999;
  transform: translateX(-1000px);
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  position: fixed;
  top: 15%;
  width: 60vw;
  max-width: 375px;
  height: 70vh;
  background: rgba(250, 250, 250, 0.9); /* Blanco con 50% de transparencia */
  border: 2px solid var(--red);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
}

textarea {
  border: 3px solid var(--green);
  border-radius: 7px;
  padding: 4px;
  width: 100%;
  height: 150px;
}

i {
  color: var(--green);
  -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: var(--grey);
}

.resultsTorn ul {
  width: 100%;
  padding: 0;
  margin: 0;
}

/*estilo de todos los botones*/
.burguerSidebar,
.settingButton,
.moveDownButton,
.hideButton,
.moveUpButton,
.copyNextDay {
  background: linear-gradient(150deg, var(--blue) 30%, var(--red) 60%);
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 3px 2px 3px dodgerblue;
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
}
.afegSett,
.defecto {
  background: linear-gradient(150deg, var(--blue) 30%, var(--red) 60%);
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 3px 2px 3px dodgerblue;
  width: 100px;
  height: 40px;
  max-height: 40px;
}

.nextDay,
.prevDay {
  all: unset;
  font-size: 1.5rem;
}

button:active {
  box-shadow: inset 2px 2px 3px 2px #332;
  transform: scale(0.9);
  transition: 0.3s ease;
}

.moveUpButton {
  position: fixed;
  z-index: 9999;
  right: 10px;
  bottom: 10px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 1s ease;
}
.moveUpButton:hover {
  opacity: 1;
}
.afegir {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-wrap: nowrap;
  width: 120px;
  max-width: 150px;
  font-weight: bold;
  gap: 10px;
  height: auto;
  padding: 3px;
  border-radius: 5px;
  background: var(--green);
}
.spinner-border {
  display: none;
}
.suprimir {
  min-width: 91px;
  max-width: 100px;
  padding: 10px;
  max-width: 100px;
  border-radius: 5px;
  background: var(--red);
}
.editar {
  min-width: 91px;
  max-width: 100px;
  padding: 10px;
  max-width: 100px;
  border-radius: 5px;
  background: var(--orange);
}

input {
  border: 2px solid var(--blue);
  border-radius: 5px;
}

input::placeholder {
  text-align: center;
}

input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(to right, steelblue 50%, var(--blue) 80%);
  color: white;
  font-weight: 600;
  text-align: center;
  border: 2px solid var(--blue);
  border-radius: 7px;
  font-size: 1.1rem;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

select {
  border: 2px solid var(--orange);
  border-radius: 6px;
}

/*Sector para el head botones y title*/

.resultsTorn {
  grid-area: resultsTorn;
  /*border: 2px solid red;*/
  width: 90dvw;
  display: grid;
  grid-template-areas:
    "head"
    "results";
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
}

.head {
  display: flex;
  margin-top: 20px;
  justify-content: space-between;
  align-items: center;
  height: 5vh;
  grid-area: head;
  border-bottom: 3px solid var(--yellow);
}

.resultats {
  grid-area: results;
}

.title {
  font-size: 2rem;
  color: steelblue;
  font-weight: bold;
}

.title,
.date,
.divButtons {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 20px;
}

p {
  display: block;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  overflow: hidden;
  box-sizing: border-box;
  border: 4px solid var(--green);
  padding: 10px;
  margin: 10px;
  background: #fff;
  border-radius: 8px;
}

a {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.emptyPage {
  grid-area: emptyPage;
  position: absolute;
  z-index: -3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  /*border: 2px solid red;*/
  align-items: center;
}

.footer {
  border-top: 2px solid;
  border-image-source: linear-gradient(
    to right,
    var(--yellow) 35%,
    var(--blue) 70%
  );
  border-image-slice: 1;
  /*position: relative;*/
  width: 100dvw;
  height: 15dvh;
  display: grid;
  padding: 0 0 0 20px;
  grid-template-areas: "image description";
  grid-template-rows: auto;
  grid-template-columns: 1fr 13fr;
  background: #fff;
}

.footerImage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  grid-area: image;
}

.footerDescription {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: Montserrat;
  grid-area: description;
  font-size: 3pt;
  padding-left: 10px;
}

.footerDescription h2,
.footerDescription h4,
.footerDescription h6 {
  margin: 0;
}

/*mecanismo para movil*/
@media (max-width: 950px) {
  .navSidebar {
    display: grid;
  }
  .nav {
    display: none;
  }
  .resultsTorn {
    margin-top: 20px;
  }
  .head {
    stroke: 1px;
    flex-direction: column;
    height: 20vh;
    gap: 0;
    padding: 0;
    margin: 0;
  }
  .divButtons {
    padding-bottom: 10px;
  }
  .comments {
    border: 2px solid mediumvioletred;
    padding: 10px;
    height: auto;
  }
  #messages {
    /*border: 2px solid mediumvioletred;*/
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    justify-content: space-evenly;
    align-items: center;
    padding: 0px;
    margin: 0;
  }
  #texto {
    height: auto;
    width: 100%;
  }

  .afegir {
    display: flex;
    max-width: 150px;
    padding: 5px;
    gap: 10px;
  }
  input {
    font-size: 0.5rem;
  }
  .settings {
    grid-template-areas:
      "titleSett"
      "screens"
      "opts"
      "settButtons";
    margin: 0;
    padding: 0;
    font-size: 1rem;
    /*border: 2px solid red;*/
  }
}
