/* ===================================================
   Footer Language Selector Styles
   Responsive design para seleção de idiomas
   ==================================================== */

.footer-language-selector {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.footer-language-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.language-buttons-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 15px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.lang-btn {
  background: transparent;
  border: 1px solid #FFD700;
  color: #FFD700;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-btn:hover {
  background: #FFD700;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.lang-btn:active,
.lang-btn.active {
  background: #FFD700;
  color: #000;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.lang-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
}

.btn-all-languages {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.5);
}

.btn-all-languages:hover {
  background: #FFD700;
  border-color: #FFD700;
}

/* Modal de Idiomas */
.language-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.language-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.language-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  cursor: pointer;
}

.language-modal-content {
  position: relative;
  background: linear-gradient(135deg, #0d1f33 0%, #0a1929 100%);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 15px;
  padding: 40px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.1);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 28px;
  cursor: pointer;
  transition: color 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #FFD700;
}

.language-modal-content h2 {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 25px;
  text-align: center;
}

.language-search {
  width: 100%;
  padding: 12px 16px;
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  margin-bottom: 25px;
  transition: all 0.3s ease;
}

.language-search::placeholder {
  color: rgba(255, 215, 0, 0.5);
}

.language-search:focus {
  outline: none;
  background: rgba(20, 20, 20, 0.8);
  border-color: #FFD700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.language-grid .lang-btn {
  font-size: 13px;
  padding: 10px 8px;
}

/* Responsividade */
@media (max-width: 768px) {
  .language-buttons-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .lang-btn {
    padding: 6px 8px;
    font-size: 11px;
  }

  .language-modal-content {
    padding: 30px 20px;
  }

  .language-modal-content h2 {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .language-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .language-buttons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .btn-all-languages {
    grid-column: 1 / -1;
  }

  .language-modal-content {
    padding: 20px 15px;
    max-width: 95vw;
  }

  .language-modal-content h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .language-search {
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 20px;
  }

  .language-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .language-grid .lang-btn {
    font-size: 11px;
    padding: 8px 6px;
  }
}

/* Estilo para botão ativo */
.lang-btn[data-active="true"] {
  background: #FFD700;
  color: #000;
  border-color: #FFD700;
}

/* Scrollbar customizada no modal */
.language-modal-content::-webkit-scrollbar {
  width: 8px;
}

.language-modal-content::-webkit-scrollbar-track {
  background: rgba(255, 215, 0, 0.1);
}

.language-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.3);
  border-radius: 4px;
}

.language-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 215, 0, 0.5);
}
