@import url(variables.css);


html {
  font-size: 62.5%;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--bg-gradient);
  color: white;
  padding: 2rem;
  gap: 2rem;
}

/*MOBILE FIRST*/
.container {
  background: gba(255, 255, 255, 0.1);
  padding: 2.5rem;
  border-radius: var(--radius);
  width: 100%;
  max-width: 40rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  width: 100;
}

label {
  font-weight: 600;
  font-size: 1.4rem;
}

input,
select, .currency-wrapper {
  padding: 1.2rem;
  border: 0.2rem solid #e0e0e0;
  border-radius: 0.8rem;
  font-size: 1.4rem;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}


select, option {
    color: black;
}

button {
  width: 100%;
  padding: 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.8rem;
  font-size: 1.6rem;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
}

#result-display {
  margin-top: 2.5rem;
  padding: 1.5rem;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  background: rgba(46, 204, 113, 0.1); 
  border-radius: 0.8rem;
  min-height: 5rem; 
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

#result-display:empty {
  display: none;
}

.currency-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: white;
  border: 0.2rem solid #e0e0e0;
  border-radius: 0.8rem;
  padding: 0.5rem 1rem;
  width: 100%;
}

.currency-wrapper img {
  width: 2.5rem;
  height: auto;
  flex-shrink: 0;
}

.currency-wrapper select {
  border: none;
  padding: 0.7rem;
}

.swap-container {
  display: flex;
  justify-content: center;
  margin: -10px 0;
  z-index: 10;
}

#swap-btn {
  width: 45px;
  height: 45px;
  border-radius: 0.8rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  transition: transform 0.4s ease;
}

#swap-btn:active {
  transform: scale(0.9) rotate(180deg);
}

/*DESKTOP*/
@media (min-width: 769px) {
  .container {
    max-width: 60rem;

  }

  .currency-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .currency-group .field {
    flex: 1;
    margin-bottom: 0;
  }

  .swap-container {
    margin: 2rem 0 0 0; 
  }

  #swap-btn {
    transform: rotate(90deg); /* No desktop, as setas ficam horizontais */
  }
}
