:root {
    --color-primary: #347080;
    --color-primary-opacity: rgba(25, 203, 157, 0.45);
}

body, form{
    margin: 0px;
    border: 0px;
    padding: 0px;
    box-sizing: border-box;
}

* {
    /* outline: 1px solid red; */
    font-family: sans-serif;
}

header {
    min-height: 10dvh;
    max-height: 48px;
    background-color: #fafafa;
    width: 100%;
    display: flex;
    justify-content:center;
    gap: 20%;
    align-items: center;
    flex-wrap: wrap;
    h1 {
        font-size: 1.1rem;
        font-weight: 400;
        color: var(--color-primary);
    }
}

main {
    min-height: 75dvh;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    form {
        min-width: 280px;
        width: 100%;
        max-width: 520px;
        margin: 0px 16px;
    }
    background:
        linear-gradient(90deg, rgba(4, 130, 121, 0.6), rgba(0, 159, 128, 0.6)),
        url('/assets/img/descargar-factura/bg.webp');
    background-position: center center;
    background-size: cover;
}

.instructivos {
    border-radius: 16px;
    background-color:  #fafafa;
    padding: 16px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    .links {
        width: 100%;
        display: flex;
        justify-content: space-evenly;
        align-items: center;
    }
    h3 {
        font-weight: 400;
        color: hsl(193, 40%, 32%);
        text-align: center;
        text-wrap: balance;
        font-size: 1.25rem;
    }
}

.input__container {
    display: grid;
    grid-template-columns: 100%;
    color: #fff;
    input {
        margin-top: 8px;
        font-size: 1rem;
        padding: 8px 16px;
        line-height: 1.5;
        border-radius: 8px;
        border: 1px solid hsl(0, 0%, 50%);
        outline: 0px;
    }

    input:focus {
        outline: 3px solid hsl(193, 40%, 72%);
    }
}
.input__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}
.input__top span {
    display: flex;
    font-weight: 100;
    align-items: center;
    text-align: end;
}

.input__top span:hover {
    text-decoration: underline;
}
.input__top span::after {
    content: url('/assets/img/descargar-factura/help.svg');
    display: inline-block;
    text-align: center;
    height: 1.5em;
    width: 1.5em;
    border-radius: 50%;
    margin-left: 2px;
    border: 4px solid transparent;
    cursor: pointer;
}
.input__top span:hover::after {
    background-color: yellowgreen;
    border: 4px solid yellowgreen;

}

.input__top label {
    font-weight: 500;
    font-size: 1.25rem;
}

.input__container.invalid {
    input {
        border-radius: 8px;
        border: 1px solid hsl(336, 100%, 40%);
        color:  hsl(336, 100%, 40%);
        outline: 0px;
    }

    input:focus {
        outline: 3px solid hsl(336, 90%, 80%);
    }
}

.input__container.valid {
    input {
        border-radius: 8px;
        border: 1px solid hsl(114, 100%, 30%);
        color:  hsl(114, 100%, 30%);
        outline: 0px;
    }

    input:focus {
        outline: 3px solid hsl(114, 90%, 90%);
    }
}

.input__info {
    font-size: 0.75rem;
    margin-top: 4px;
    display: flex;
    justify-content: space-between;

    .info__message, .info__limit {
        font-weight: lighter;
        color: hsl(0, 0%, 10%);
    }

    .info__limit {
        width: 6ch;
        text-align: right;
    }
}

.btn__submit {
    font-size: 1rem;
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
    margin-top: 24px;
    cursor: pointer;
    margin: auto;
    background: linear-gradient(#009F80, #048279);
    border: 2px solid #fff;
    padding: 10px 32px;
    line-height: 1.5;
    border-radius: 8px;
    font-weight: bolder;
    color: hsl(0, 0%, 100%);
    margin-top: 12px;
    border-radius: 24px;
    transition: all 3s ease-in-out;
}

.btn__submit:disabled {
    cursor:not-allowed;
    background-color: hsl(193, 30%, 90%);
    border: 2px solid hsl(193, 30%, 90%);
    color: hsl(193, 30%, 62%);

}

.facturas-previas {
    position: absolute;
    bottom: 0px;
    color: #fff;
    line-height: 1.5rem;
    text-wrap: balance;
    text-align: center;
    padding: 16px;
}

.facturas-previas a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.brands {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.brands img {
    transition: scale 0.3s ease-in-out;
}

.brands a:hover img {
    scale: 1.1;
}

footer {
    min-height: 15dvh;
    width: 100%;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    text-wrap: balance;
    align-items: center;
    background-color: #fafafa;
    color: var(--color-primary);
    line-height: 1.5rem;
}

/* The snackbar - position it at the bottom and in the middle of the screen */
#snackbar {
    visibility: hidden; /* Hidden by default. Visible on click */
    min-width: 250px; /* Set a default minimum width */
    margin-left: -125px; /* Divide value of min-width by 2 */
    background-color: #333; /* Black background color */
    color: #fff; /* White text color */
    text-align: center; /* Centered text */
    border-radius: 2px; /* Rounded borders */
    padding: 16px; /* Padding */
    position: fixed; /* Sit on top of the screen */
    z-index: 1; /* Add a z-index if needed */
    left: 50%; /* Center the snackbar */
    bottom: 30px; /* 30px from the bottom */
  }
  
  /* Show the snackbar when clicking on a button (class added with JavaScript) */
  #snackbar.show {
    visibility: visible; /* Show the snackbar */
    /* Add animation: Take 0.5 seconds to fade in and out the snackbar.
    However, delay the fade out process for 2.5 seconds */
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
  }

  .gsj__loader {
    display: none;
    visibility: hidden;
    box-sizing: border-box;
    border: 3px solid #fff; /* Light grey */
    border-top: 3px solid hsl(193, 40%, 72%); /* Blue */
    border-radius: 50%;
    width: 1em;
    height: 1em;
    animation: spin 1s linear infinite;
  }

  .gsj__loader.show {
    visibility: visible;
    display: block;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }






  /* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
  }

.modal.show {
    display: block;
}
  
  /* Modal Content/Box */
 .modal.show .modal-content {
    background-color: transparent;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%; /* Could be more or less, depending on screen size */
    animation: fadein 3s;
    overflow: auto;
  }
  
  /* The Close Button */
  .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
  }
  
  .close:hover,
  .close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
  }

    /* Animations to fade the snackbar in and out */
    @-webkit-keyframes fadein {
        from {bottom: 0; opacity: 0;}
        to {bottom: 30px; opacity: 1;}
      }
      
      @keyframes fadein {
        from {bottom: 0; opacity: 0;}
        to {bottom: 30px; opacity: 1;}
      }
      
      @-webkit-keyframes fadeout {
        from {bottom: 30px; opacity: 1;}
        to {bottom: 0; opacity: 0;}
      }
      
      @keyframes fadeout {
        from {bottom: 30px; opacity: 1;}
        to {bottom: 0; opacity: 0;}
      }