:root {
  /* Google Brand Colors */
  --google-blue: #4285f4;
  --google-red: #ea4335;
  --google-yellow: #fbbc05;
  --google-green: #34a853;

  /* Text Colors */
  --text-primary: #3c4043;
  --text-secondary: #5f6368;
  --text-tertiary: #9aa0a6;

  /* Background Colors */
  --bg-primary: #fff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f4;

  /* Border Colors */
  --border-primary: #e8eaed;
  --border-secondary: #dadce0;

  /* State Colors */
  --color-focus: #1a73e8;
  --color-success: var(--google-green);
  --color-warning: var(--google-yellow);
  --color-error: var(--google-error);

  /* Warning Colors */
  --warning-bg: #fff3cd;
  --warning-text: #856404;
  --warning-border: #ffeaa7;

  /* Buttons colors */
  --color-text: #1967d2;
  --text-hover: rgb(23, 78, 166);
  --buttons-hover: rgba(60, 64, 67, 0.047);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

input {
  border: none;
  outline: none;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: var(--bg-secondary);
  color: rgba(0, 0, 0, 0.87);
  line-height: 1.5;
}

textarea {
  resize: none;
  box-sizing: border-box;
}

.select-wrapper {
  position: relative;
  display: inline-block;
}

.select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.5rem;
}

.select-wrapper::after {
  content: "expand_more"; /* Material Icons */
  font-family: "Material Symbols Outlined";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--border-secondary);
}

.button-menu {
  display: flex;
  justify-content: center;
  align-items: center;

  background-color: transparent;
  cursor: pointer;

  border-radius: 50%;
  height: 24px;
  width: 24px;
  padding: 1.5rem;

  &:hover {
    background-color: var(--buttons-hover);
  }
}

.header-left {
  display: flex;
  align-items: center;
  row-gap: 1rem;
  font-size: 22px;
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-right span {
  cursor: pointer;
}

.google-logo {
  display: flex;
  align-items: center;
}

.logo-traductor {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  margin-left: 0.4rem;
  font-weight: 400;
}

.google-blue {
  color: var(--google-blue);
}

.google-red {
  color: var(--google-red);
}

.google-yellow {
  color: var(--google-yellow);
}

.google-green {
  color: var(--google-green);
}

/* Sections */
@media screen and (min-width: 1280px) {
  .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 48px;
    width: auto;
    transition: 0.6s all cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@media screen and (min-width: 720px) {
  .container {
    min-height: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Buttons */
.fill {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

button {
  background: none;
  outline: none;
  border: none;
  text-align: center;
}

.btn-container {
  display: flex;
  align-items: center;
  margin-top: 0.8rem;
  gap: 0.5rem;
}

.button {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-secondary);
  padding: 0.5rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 0.3rem;
  color: var(--color-text);
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  &:hover {
    color: var(--text-hover);
  }
}

.button span {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

.button:first-child {
  background-color: #4285f41f;
  &:hover {
    background-color: #4286f42d;
  }
}

.language-selection {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.source-language,
.target-language {
  display: flex;
  align-items: center;
  width: 100%;
  margin-left: 1rem;
}

#swapLanguages.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* .source-language > span,
.target-language > span {
  padding: 1rem 0.4rem;
  font-size: 0.875rem;
  cursor: pointer;
  width: auto;
  color: var(--text-secondary);
  font-weight: 500;
  &:not(.active):hover {
    color: #000;
  }
}

.active {
  position: relative;
  color: var(--color-text) !important;
  &:hover {
    border-color: var(--text-hover);
  }
}

.active > span {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-text);
  height: 2px;
  width: 100%;
  z-index: 100;
} */

/* Input and Output translation */
.translation-area {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 0.4rem;
}

.input-section {
  border: 1px solid var(--border-secondary);
  border-radius: 0.6rem;
  width: 100%;
}

.output-section {
  border-radius: 0.6rem;
  background-color: #f5f5f5;
}

select {
  border: none;
  outline: none;
}

select option {
  border: none;
  outline: none;
}

.input-section,
.output-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding: 1em;
}

.textarea-container {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  padding-right: 1.8em;
}

.loading {
  display: flex;
  align-items: start;
  justify-content: start;
}

.error {
  color: var(--google-red);
  position: absolute;
}

.output {
  overflow-wrap: anywhere;
}

#clearTextBtn {
  position: absolute;
  top: 5px;
  right: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  display: none;
  color: var(--text-secondary);
}

#inputText {
  width: 100%;
  border: none;
  outline: none;
  font-size: 24px;
  line-height: 32px;
  word-break: break-word;

  &::placeholder {
    color: var(--text-secondary);
  }
}

#outputText {
  display: block;
  width: 100%;
  border: none;
  outline: none;
  font-size: 24px;
  line-height: 32px;

  &:empty::before {
    content: "Traducción";
    color: var(--text-secondary);
  }
}

.autoTextarea {
  height: 4em;
}

.input-controls {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#maxChart {
  color: var(--text-secondary);
  font-size: 12px;
}

.icon-button {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-secondary);

  background-color: transparent;
  cursor: pointer;

  border-radius: 50%;
  height: 24px;
  width: 24px;
  padding: 1.3rem;

  &:hover {
    background-color: var(--buttons-hover);
  }
}

.micStart {
  background: rgb(66, 133, 244);
  color: white;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.2);
}

.input-controls-right {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

/* Footer */
footer {
  width: 100%;
  margin: 0 auto;
}

footer > div > button {
  cursor: pointer;
}

.footer-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  height: 35vh;
}

.container-elements-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.footer-container button {
  padding: 18px;
  border: 1px solid var(--border-secondary);
  border-radius: 50%;
  cursor: pointer;
}

.footer-container button span {
  font-size: 32px;
  color: var(--text-secondary);
}

.text-footer {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 0.5rem;
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: #323232;
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.warning {
  text-align: center;
  background-color: var(--warning-bg);
  color: var(--warning-text);
  padding: 0.4em;
  width: 100%;
  margin: 0 auto;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

@media screen and (width < 720px) {
  body {
    font-size: 12px;
    line-height: 1.2;
  }

  .footer-container {
    height: 25vh;
  }

  .btn-container {
    justify-content: center;
    gap: 0.3rem;
  }

  .translation-area {
    flex-direction: column;
  }

  .input-section {
    border: none;
    border-radius: 0;
    border-top: 1px solid var(--border-secondary);
    border-bottom: 1px solid var(--border-secondary);
  }

  .input-section,
  .output-section {
    padding: 1em;
  }

  .source-language,
  .target-language {
    justify-content: center;
  }

  #inputText,
  #outputText {
    font-size: 16px;
  }

  .footer-container button {
    padding: 12px;
  }

  .text-footer {
    font-size: 12px;
  }

  .none {
    display: none;
  }

  .warning {
    font-style: 12px;
    padding: 1em;
  }
}
