* {
    padding: 0;
    margin: 0;
    box-sizing: border-box; 
    user-select: none; 
    -webkit-user-select: none; 
    -moz-user-select: none;
    -ms-user-select: none; 
} 

body {
    --bg-color: #fff;
    --sidebar-color: color-mix(in srgb, #000 25%, #fff);
    --dark-color: #222;
    --fb-color: #003366;
    --wood: #8B5E3C;
    height: 100dvh;
    width: 100dvw;
    display: grid;
    place-items: center;
    background-image: url(../../IMAGES/Troncos.webp);
    background-size: cover;
    font-family: Montserrat;
}

nav { 
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.home-link__container  a {
    color: var(--bg-color);
}

.material-symbols-outlined {
    font-size: 2.5rem;
    font-weight: bolder;
    margin: 10px 15px;
    transition: filter .3s;
}

.material-symbols-outlined:hover {
    filter: drop-shadow(0 0 5px #fff);
}

.container {
    background-color: var(--sidebar-color);
    border-radius: 75px;
    box-shadow: 0 5px 15px rgb(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    width: clamp(50%, 820px, 100%);
    height: 600px;
}

.container p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.3px;
    margin: 20px 0;
}

.container a {
    color: #333;
    font-size: 13px;
    text-decoration: none;
    margin: 15px 0 10px;
}

.container button, form > input[type="submit"] {
    background-color: var(--fb-color);
    color: #fff;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
}

form > input[type="submit"] {
    transition: box-shadow .3s;
    outline: none;
}

form > input[type="submit"]:hover {
    box-shadow: 7px 7px 0px rgb(100, 166, 231),
                -7px -7px 0px #335a94;
}

.container button.hidden {
    background-color: transparent;
    border-color: var(--bg-color);
    font-family: Montserrat;
    transition: border-color .3s, color .3s, background-color .3s;
}

.container button.hidden:hover {
    border-color: transparent;
    outline: var(--wood) 5px solid;
    color: var(--wood);
    background-color: var(--bg-color);
}

.container form {
    background-color: var(--sidebar-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    height: 100%;
}

form > div {
    width: 100%;
}

.container input {
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 13px;
    font-family: inherit;
    border-radius: 8px;
    width: 100%;
    outline: none;
}

div input:focus {
    outline: var(--wood) 1px solid;
}

.sign-up, .log-in, .toogle-container {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    transition: all .5s ease-in-out;
}

form > h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.no-margin {
    margin: 0;
}

.log-in {
    left: 0;
    z-index: 2;
}

.log-in .error {
    text-align: center;
    color: #e24;
    font-size: 1rem;
}

.log-in a {
    font-size: .9rem;
}

.log-in a:hover {
    text-decoration: underline;
}

.container.active .log-in{
    transform: translateX(100%);
}

.log-in form, .sign-up form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sign-up {
    left: 0;
    z-index: 1;
    opacity: 0;
}

.errorlist {
    list-style: none;
}

.errorlist li {
    color: #e24;
    font-size: .9rem;
}

.container.active .sign-up{
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: move .5s;
}

.toogle-container {
    position: absolute;
    left: 50%;
    overflow: hidden;
    border-radius: 75px;
    z-index: 10;
}

.container.active .toogle-container {
    transform: translateX(-100%);
}

.toogle {
    display: flex;
    flex-direction: row;
    background-color: var(--fb-color);
    height: 100%;
    color: #fff;
    position: relative;
    left: -100%;
    width: 200%;
    transform: translate(0);
    transition: all .5s ease-in-out;
}

.container.active .toogle {
    transform: translateX(50%);
}

.toogle-panel {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 30px;
    text-align: center;
    transform: translateX(0);
    transition: all .5s ease-in-out;
}

.toogle-panel h3 {
    font-size: 1.6rem;
}

.toogle-left {
    transform: translateX(-200%);
}

.container.active .toogle-left {
    transform: translateX(0);
}

.toogle-right {
    right: 0;
    transform: translateX(0);
}

.container.active .toogle-right {
    transform: translateX(200%);
}

.button-container{
    display: none;
}


.closed {
    display: none;
}

.messages-container {
  position: fixed;
  top: 10%;
  right: 20px;
  max-width: 350px;
  z-index: 1050; 
  opacity: 95%;
}

.message-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f44336; 
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.15);
  font-size: 14px;
  animation: slideIn 0.4s ease-out;
  transition: opacity .3s ease, transform .3s ease;
}

.message-success {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #080; 
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.15);
  font-size: 14px;
  animation: slideIn 0.4s ease-out;
  transition: opacity .3s ease, transform .3s ease;
}

.message-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #FCB426; 
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.15);
  font-size: 14px;
  animation: slideIn 0.4s ease-out;
  transition: opacity .3s ease, transform .3s ease;
}

.message-close-button {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  margin-left: 10px;
  display: flex;
  align-items: center;
}

.message-error.closed, .message-success.closed,.message-warning.closed {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}


@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes move {
    0%, 49.99% {
        opacity: 0;
        z-index: 1;
    }
    50%, 100% {
        opacity: 1;
        z-index: 5;
    }
}

@media (max-width: 768px) {
    .container {
        height: 710px;
        border-radius: 50px;
    }
    .toogle-container {
        display: none;
    }

    .log-in, .sign-up {
        width: 100%;
    }

    .button-container {
        display: flex;
        flex-direction: row;
        font-size: 1rem;
        place-content: center;
        margin-top: 10px;
    }

    .button-container > .signUp-button, .button-container > .logIn-button {
        border: none;
        margin: 0;
        outline: none;
        padding: 0;
        background-color: transparent;
        font-size: inherit;
        text-transform: none;
        font-family: inherit;
        color: #335a94;
        margin-left: 2px;
    }

    .sign-up {
        top: -100%;
    }

    .container.active .sign-up {
        transform: translateY(100%);
    }

    .container.active .log-in {
        transform: translateY(-100%);
    }
}

@media (max-height: 800px) and (max-width: 768px) {
    nav {
        top: 5dvh;
    }
}