html{
  scroll-behavior: smooth;
}

body{
  margin: 0;
  padding: 0;  
  font-family: Arial, sans-serif;
}

.main-section {
  padding: 2em;
  background-color: #f7f7f7;
}

header{
  width: 100%;
  text-align: center;
  background: linear-gradient(90deg, #DF5025, #F2BA37);
  height: 2.75em;
  display: flex;
  justify-content: center;
  align-items: center;
}

header svg{
  width: 8em;
  vertical-align: middle;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
}
th, td {
  padding: 0.5em;
  text-align: left;
  display: table-cell;
  width: calc(100% / 7);  
  border-block: 1px solid rgba(0,0,0,0.1);
}

td {
  white-space: nowrap;
}
th {  
  text-transform: uppercase;
  background-color: #EDEDED;
  &:first-child{
    padding-left: 2.5em;
  }
}
tr:nth-child(even) {
  background-color: #f9f9f9;
}
tr:not(.details-row):hover {
  background-color: #D9D9D9;
}

td[data-label="Fecha de Factura"]{
  & > div {
    display: flex;
    align-items: center;
    gap: 0.25em;
    & svg{
      width: 1.5em;
    }   
  }
}


.last-column {
  text-align: right;
}

th.last-column{
  padding-right: 3.2em;
}

td.last-column{
  padding-right: 1.5em;
}

.details-row {
  display: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  & td {
    position: relative;
  }
}

.btn-download{
  /* position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0.75rem;
  display: flex;
  align-items: center; */
  border: none;
  border-radius: 100%;
  padding: 0.25em 0.35em;
  background-color: transparent;
  color: #FF8C20;
  cursor: pointer;
  transition: color 0.2s;
  /* box-shadow: 0px 0px 5px rgba(0,0,0,0.5); */
  &:hover{
    color: #272727;
  }
  & svg{
    width: 2em;
    height: 2em;
    aspect-ratio: 1;
  }
}

.btn-pagar, .btn-resolve, .btn-aceptar, .btn-cancelar{
  display: inline-block;
  border: none;
  border-radius: 0.3em;
  background-color: #FF8C20;
  color: #fff;
  padding: 0.25em 0.75em;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.2s;
  width: 6em;
  &:hover{
    background-color: #272727;
  }
}
.btn-resolve{
  background-color: #FF6A52;
}
.btn-aceptar, .btn-cancelar, .btn-resolve{
  padding: 0.5em 0.75em;  
}

.btn-aceptar, .btn-cancelar{
  border-radius: 25px;
}

.btn-cancelar{
  background-color: #D9D9D9;
  color: #272727;
  &:hover{
    color: #f7f7f7;
  }
}

.details-row.show {
  display: table-row;
  max-height: 500px; /* Ajusta según la altura máxima que esperes para el contenido */
  transition: max-height 0.3s ease;
}

.toggle-details {
  cursor: pointer;
}

.subscription-container{
  margin-top: 2em;
  border-radius: 5px;
}

.subscription-header{  
  background-color: #D9D9D9;
  padding: 0.5em 1.5em;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;

}

.header-center{
  color: #FF6A52;
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 0.5em;
  font-weight: 600;
  min-width: 30%;
  & svg{
    transform: translateY(1px);
    stroke-width: 3px;
    width: 1em;
  }
}

.client-section, .payment-methods-section{ 
  text-align: center;
  border: 1px solid #272727;
  border-radius: 5px;
  padding: 1em;
  line-height: 1.25em;
  & strong{
    font-size: 1.1em;
  }
  & span{
    font-size: 0.8em;
  }
}

.methods{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5em;
  /* & > span > svg {
    height: 2em;
  } */
}

h3.subscription-name, .subscription-header > .header-right > h3{
  margin-block: 0.25em 0.5em;
  & ~ h4{
    margin: 0;
    font-weight: normal;
    margin-bottom: 0.5em;
    & ~ h3{
      margin-bottom: 0.5em;
    }
  }
}

h4{
  font-weight: normal;
  margin-bottom: 3em;
}

.resume-section, .resolve-section{ 
  margin-top: 2em;
  display: flex;
  flex-direction: column;
  gap:0.75em;
  background-color: #F2BA37;
  border-radius: 5px;
  font-size: 0.9em;
  & > *{
    margin: 0;
  }
}

.resume-section{
  interpolate-size: allow-keywords;
  overflow: hidden;
  height: auto;
  transition: height 0.3s;
  & .resolve-section:last-child{    
    padding-bottom: 1.5em;
  }
  &.hide{
    height: 3.5em;
  }
}

.resolve-section{
  margin: 0;
  gap: 0.5em;
  padding: 0.5em 1.5em;
  & p strong{
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.9em;
  }
}

.urge-section{
  display: flex;
  justify-content: space-between;
  padding-top: 0.5em;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,0.3);
  padding-right: 1.25em;  
  cursor: pointer;
  & > svg{
    width: 2em;
    height: 2em;
    transform: translateY(-2px);
    stroke-width: 2.5px;
    &.hide{
      display:none;
    }
  }
}

.urge{
  text-align: center;
  text-transform: uppercase;
  font-weight: bold;
  margin-top: 0.5em;
  font-size: 1.05em;
  letter-spacing: 0.25px;
  display: flex;
  align-items: center;
  margin-left: 1.5em;
  gap: 0.5em;
  & svg{
    color: #272727;
    width: 1.75em;
  }
  & span{
    color: #272727;
    user-select: none;
  }
}

.header-left{
  min-width: 40%;
}

.header-right{
  text-align: right;
}

.incidence{
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 1.75em;
  
  & a.link-button{
    background-color: #272727;
    padding: 0.25em 0.75em;
    display: inline-block;
    text-align: center;
    width: 5em;
    text-decoration: none;
    color: #f9f9f9;
    border-radius: 0.4em;
    transition: background-color 0.2s;
    &:hover{
      background-color: #888888;
    }
    &:visited{
      color: #f9f9f9;
    }
  }
  & p > a{
    color: #272727;
    &:visited{
      color: inherit;
    }
  }
}

.facturas-title{
  padding-left: 0.75em;
}

#modal.hide, #paymentModal.hide, #infoModal.hide, #transferModal.hide{
  display: none;
}

#modal, #paymentModal, #infoModal, #transferModal{
  position: fixed;
  height: 100vh;
  width: 100vw;
  inset: 0;
  display: grid;
  place-items: center;
  background-color: rgba(0,0,0,0.3);
  z-index: 10;
}

#paymentModal .modal-container{
  width: fit-content;
}

#paymentModal .modal-body{
  display: grid;
  place-items: center;
  padding-block: 3em; 
  & .modal-body-content{
    width: fit-content;
    display: flex;
    gap: 1.5em;
    flex-direction: column;
    & label{
      cursor: pointer;
      padding: 0.5em 0.75em;
      width: 12em;
      border-radius: 25px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1em;
      box-shadow: 2px 2px 8px 0px rgba(0,0,0,.2);
      transition: background-color 0.2s;
      &:hover{
        background-color: rgba(0,0,0,.05);
      }
      & input[type=radio]{
        margin: 0;
      }
      & .tarjeta-logo{
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: left;
      }
      &.tarjeta svg{
        width: 2em;
      }
      &.google-pay svg{
        width: 3.5em;
      }
      &.apple-pay svg{
        width: 3.5em;
      }
      &.bizum svg{
        width: 5em;
      }
      &.bizum {
        padding-block: 0.6em;
      }
      &.transfer{
        padding-block: 0.3em;
      }
    }
  }
}

.active{
  border: 2px solid #FF8C20;
}

.modal-container{
  width: 50%;
  min-width: 360px;
  height: fit-content;
  background-color: #f9f9f9;
  border-radius: 0.5em;
  overflow: hidden;  
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  & .modal-header{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #DF5025, #F2BA37);
    height: 2em;
    padding-left: 1.5em;
    padding-right: 0.5em;
    color: #f9f9f9;
    & >span:last-child{
      cursor: pointer;
    }
  }
  & .modal-body{
    padding: 1.5em;
    line-height: 1.5em;
  }
  & .modal-footer{    
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5em;
  }
}

#infoModal .modal-container .modal-footer, #transferModal .modal-container .modal-footer{
  flex-direction: row-reverse;
}

#infoModal .modal-container .modal-body, #transferModal .modal-container .modal-body{
  padding-bottom: 0;   
}

.info{
  width: 1.5em;
  height: 1.5em;
  border-radius: 15px;
  border: 2px solid lightgray;
  background-color: blue;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-left: 0.25em;
  transform: translateY(-1px);
  font-size: inherit;
}

.copy-btn{
  display: inline-block; 
  transform: translate(5px, 2px); 
  cursor: pointer;
}

#toast{  
  position: fixed;
  z-index: 100;
  width: fit-content;
  padding: 0.5em;
  border-radius: 25px;
  box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
  font-size: 0.8em;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
  background-color: #f7f7f7;
  & span{
    color: green
  }
  &.hide{
    opacity: 0;
  }
}

@media screen and (width <= 600px) {

  .main-section {
    padding: 0.75em;
    font-size: 9px;
  }
  th.last-column {
    padding-right: 3.2em;
  }
  .subscription-header{
    padding-inline: 1.5em;
    & > div:first-child{
      width: 40%;
    }
  }
  header{
    height: 2em;
    & svg{
      width: 5em;
    }
  }

  .methods{
    transform: scale(0.8);
  }

  .header-center{
    
    & span:first-child{
      width: min-content;
      min-width: 80%;
      text-wrap: wrap;
    }
  }

  .resume-section{
    margin-top: 1em;
  }

  #infoModal .modal-container .modal-body, #transferModal .modal-container .modal-body{
    font-size: 0.8em; 
    padding-bottom: 0;   
  }
  #infoModal .modal-container .modal-footer, #transferModal .modal-container .modal-footer{
    font-size: 0.8em; 
  }  
}

@media screen and (width <= 786px) {
  .not-show-on-mobile{
    display: block;
    margin: 0;
    padding: 0;
    width: 0px;
    overflow: hidden;
  }

  th, td{
    width: calc(100% / 5);
  }
}