:root {
  font-family: sans-serif;
}
body {
  margin: 0;
}
/*
cabezaera estilos
*/
header {
  position: sticky;
  top: 0;
  z-index: 999;
  width: 100%;
  min-height: 4rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  background-color: #262626;
  color: #f2f2f2;
  & h2 {
    font-size: clamp(1rem, 5vw, 2rem);
    padding: 0.5rem 0;
    margin: 0;
    text-transform: uppercase;
    text-align: center;
  }
  & nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    gap: 1rem;
    & a, details {
      font-size: clamp(1rem, 5vw, 1.2rem);
      display: inline-block;
      width: 100%;
      padding: 0.5rem 0;
    }
    & li {
      width: 6rem;
      text-align: center;
      list-style: none;
    }
    & a {
      text-decoration: none;
      color: #f2f2f2;
      &:hover {
        text-decoration: underline;
      }
    }
    & details {
      position: relative;
      & div {
        position: absolute;
        top: 2.5rem;
        padding: 1rem;
        border-radius: 10px;
        border: 2px solid #f2f2f2;
        background-color: #262626;
      }
    }
  }
}

/*
BOTONES
*/

.btn {
  max-width: 5.4rem;
  width: 100%;
  padding: 0.8rem 0rem;
  border: 0;
  border-radius: 5px;
  font-size: clamp(0.8rem, 5vw, 1rem);
  cursor: pointer;
  transition: filter 0.5s ease;
  &:hover {
    filter: brightness(80%);
  }
}

/*ESTILOS DEPENDIENDO DE SU FUNCION*/
.success {
  background-color: green;
  color: white;
}
.danger {
  background-color: darkred;
  color: white;
}
.info {
  background-color: darkturquoise;
  color: white;
}
.alert {
  background-color: gold;
  color: black;
}

/*
FORMULARIO GENERAL
*/

.group-btn {
  max-width: 30rem;
  margin: 1rem 0rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.orden-datos-vendedor, .table-prod-data {
  padding: 0.5rem;
  max-width: 26rem;
  width: 100%;
  & .group-data {
    & section {
      width: 100%;
      display: flex;
      flex-direction: column;
      justify-content: start;
      & h2 {
        text-align: center;
        font-size: clamp(0.8rem, 5vw, 1.2rem);
      }
    }
  }
}
.table-prod-data {
  max-width: 40rem;
  & article {
    width: 100%;
  }
}
.main-input {
  font-size: clamp(0.8rem, 5vw, 1rem);
  display: flex;
  flex-direction: column;
  margin: 0.2rem 0;
  /* width: 100%; */
}

.input {
  margin: 0.3rem 0;
  padding: 0.8rem;
}
.group-input {
  display: flex;
  align-items: stretch;
  & .input {
    width: 100%;
  }
  & .btn-group {
    padding: 0 1rem;
    margin: 0.3rem 0;
    border: 1px solid rgba(118, 118, 118, 0.3);
    background-color: rgb(30, 119, 235);
    cursor: pointer;
    border-left: 0;
    &:disabled {
      background-color: #00000010;
      cursor: default;
    }
  }
}

.dividir {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/*
DISEÑO MAIN DE INDEX.HTML
*/

.main-sistema form {
  max-width: 100%;
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  align-items: start;
  flex-wrap: wrap;
  gap: 2rem;
}

@media only screen and (max-width: 664px) {
  .table-prod-data {
    box-sizing: border-box;
    max-width: 26rem;
    & h2 {
      text-align: center;
    }
  }
  .main-input {
    width: 100%;
  }
  .dividir {
    gap: 0;
  }
}

/*SECCION DE TABLAS*/

.section-table, .main-boleta {
  width: 100%;
  max-height: 19rem;
  overflow: auto; 
}
/* , .table-prod-data, .table-client-data */
.table-products, .table-clients {
  max-width: 40rem;
  width: 100%;
  border: 1px solid black;
  border-collapse: collapse;
  margin: 0 auto;
  font-size: clamp(0.8rem, 2vw, 1rem);
  & thead {
    background-color: #262626;
    color: #f2f2f2;
  }
  & th, td {
    border-bottom: 1px solid #ddd;
    text-align: center;
  }
  & th, td {
    padding: 10px;
    text-align: left;
  }
}

/*
DISEÑO GESTION DE PRODUCTOS
*/

.section-table-products, .section-table-clients, .section-table {
  width: 100%;
  max-height: 31rem;
  & tr, td {
    cursor: pointer;
  }
  & tr:hover {
    background-color: #26262650;

  }
}
/*
Estilo para borrar o cancelar una lista de producto
*/
#removeProdVenta:disabled {
  pointer-events: none;
  opacity: 0.5;
}
#productos-factura.isRemove tr {
  cursor: pointer;
  transition: all 0.5s ease;
}
#productos-factura.isRemove tr:hover {
  background-color: rgb(168, 7, 7);
  color: white;
}

/* Diseño para la seccion de el pago total */
.table-total {
  max-width: 10rem;
  width: 100%;
  display: flex;
  justify-content: stretch;
  border: 2px solid #262626;
}
.table-total .box-title {
  background-color: #262626;
  color: white;
  max-width: 4rem;
  width: 100%;
  text-align: center;
  & h3 {
    margin: 0.6rem 0;
  }
}
.table-total .box-precio {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ESTILOS PARA MOSTRAR LAS BOLETAS */
.main-boleta {
  max-width: 90rem;
  width: 100%;
  margin: 0 auto;
  min-height: 80vh;
  /* background-color: red; */
  & .table-products, .table-clients {
    margin-top: 3rem;
    min-height: 5rem;
    
    background-color: #e4e4e4;
    & tr:nth-child(even) {
      background-color: #c4c4c4;
    }
    & table {
      margin-top: 0;
      font-size: 0.8rem;
    }
    & .table-content {
      vertical-align: top;
    }
  }
}

/* SECCION DE GRAFICOS */
.main-grafico {
  max-width: 75rem;
  width: 100%;
  margin: 0 auto;
  min-height: 80vh;
  margin-top: 1rem;
}

.grid-grafic {
  display: grid;
  grid-template-columns: 40% 1fr;
  grid-template-rows: 10rem 11rem 14rem 5rem;
  gap: 2rem;
  grid-template-areas: 
  "total productos"
  "fecha productos"
  "fecha prodComprado"
  "contentreset prodComprado"
  ;
  & article {
    padding: 1.5rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
    border-radius: 10px;
    & h3 {
      margin: 0;
      font-size: clamp(1rem, 2vw, 1.2rem);
    }
    & canvas {
      width: 100% !important; 
    }
  }
}
.btn-boleta {
  cursor: pointer;
  padding: 0.5rem;
  background-color: rgb(53, 170, 216);
  font-size: 1.6rem;
  border: 0;
  border-radius: 5px;
  transition: all 0.6s ease;
  &:hover {
    filter: brightness(70%);
  }
}
@media only screen and (max-width: 1100px) {
  .grid-grafic {
    box-sizing: border-box;
    padding: 1rem;
    grid-template-columns: 1fr;
    grid-template-rows: max-content;
    grid-template-areas: 
    "total total"
    "fecha fecha"
    "productos productos"
    "prodComprado prodComprado"
    "contentreset contentreset"
    ;
    
  }
}
.ventaTotales {
  grid-area: total;
  & span {
    font-size: clamp(1.4rem, 5vw, 4rem);
  }
}
.ventasFechas {
  grid-area: fecha;
  & #optionVentaFecha {
    padding: 0.5rem;
    margin: 0.5rem;
  }
}
.stockProductos {
  grid-area: productos;
  justify-content: start !important;
}
.contentresetAll {
  grid-area: contentreset;
  flex-direction: row !important;
  gap: 1rem;
  flex-wrap: wrap;
  & button {
    cursor: pointer;
    padding: 0.5rem;
    border: 0;
    border-radius: 5px;
    background-color: rgb(155, 4, 4);
    color: white;
    transition: all 0.5s ease;
    &:hover {
      background-color: #262626;
    }
  }
}

.productosComprados {
  grid-area: prodComprado;
  
}
