@import url("https://fonts.googleapis.com/css?family=Roboto:400,700");

/* Reset básico para asegurar pantalla completa */
html,
body {
  margin: 0;
  padding: 0;
  height: 100svh;
  overflow: hidden;
  font-family: "Roboto", sans-serif;
  background-image: url("images/whatsapp-back.webp");
  background-color: #333333;
  display: flex;
  justify-content: center;
  align-items: center;
}

h1 {
  text-align: center;
  color: #196774;
  font-weight: 700;
  font-size: 1.4rem;
  margin-top: 20px;
}

/* Contenedor principal estilo App */
.container {
  width: 100svw;
  max-width: 450px;
  height: 95svh;
  background: #f0f2f5;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 40px 55px rgba(0, 0, 0, 0.685);

  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.description {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 15px;
  text-align: center;
}

/* Wrapper flexible para el textarea */
.textarea-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 2px solid #e1e4e8;
  border-radius: 8px;
  margin-bottom: 15px;
  background-color: white;
  transition: border-color 0.3s;
  overflow: hidden;
}

.textarea-wrapper:focus-within {
  border-color: #4de491;
}

#inputText {
  width: 100%;
  flex: 1;
  border: none;
  padding: 15px;
  font-size: 1.1rem;
  color: #1c1e21;
  resize: none;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}

#charCounter {
  text-align: right;
  font-size: 0.75rem;
  color: #999;
  padding: 5px 10px;
  background-color: white;
}

/* Grid de botones centrado */
.button-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
  align-items: center;
}

.btn-group {
  display: flex;
  background: white;
  padding: 4px;
  border-radius: 8px;
  gap: 2px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.convert-button {
  border: none;
  background: white;
  color: #196774;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9rem;
  transition: 0.2s;
}

.convert-button:hover {
  background: #196774;
  color: white;
}

/* Botones de acción principal */
.actions-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.copy-button,
.share-button,
.delete-button {
  border: none;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: white;
  transition: transform 0.1s;
}

.copy-button:active,
.share-button:active,
.delete-button:active {
  transform: scale(0.98);
}

.copy-button {
  background-color: #196774;
}

.delete-button {
  background-color: #87a792;
}

.share-button {
  background-color: #25d366; /* Color WhatsApp */
}

.clear-button {
  width: 100%;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.8rem;
  margin-top: auto; /* Empuja al final del contenedor */
  padding: 10px 0;
}

.footer {
  /* width: 100%; */
  padding: 20px;
  /* background-color: #196774; */
  display: flex;
  font-size: 0.9rem;
  text-align: center;
  color: #196774;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  margin-top: 20px;
}

.footer a {
  color: #196774;
  text-decoration: none;
}

.escritorio {
  display: block;
}

.movil {
  display: none;
}

/* Indicador de atajo tenue */
.shortcut-hint {
  display: block;
  font-size: 0.6rem;
  font-weight: normal;
  color: #999;
  margin-top: 2px;
}

/* Estilo del Popup de Copiado */
.modal {
    position: fixed;
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    background-color: #117536; 
    color: white;
    padding: 15px 30px;
    border-radius: 50px; 
    font-size: 1.1rem;
    font-weight: bold;
    z-index: 9999; 
    transition: opacity 0.5s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    text-align: center;
    min-width: 200px;
}

/* MOBILE */

@media (max-width: 480px) {
  .container {
    width: 100svw;
    height: 100svh;
    border-radius: 0;
    padding: 15px;
  }
}

@media screen and (max-width: 768px) {

  .shortcut-hint {
    display: none;
  }
  .escritorio {
    display: none;
  }

  .movil {
    display: block;
  }
}
