/* Icono Material Design */
#cs-langIcon {
  width:20px;
  position:relative;
  top:20px;
  cursor:pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}

#cs-langIcon:hover {
  transform: scale(1.2);
  color: #0d47a1;
}

/* Overlay oscuro */
#cs-langOverlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  transition: opacity 0.3s ease;
  opacity: 0;
  align-items: flex-start;
  justify-content: center;
}

#cs-langOverlay.show {
  display: flex;
  opacity: 1;
}

/* Drawer desde arriba */
#cs-langDrawer {
  position: absolute;
  top: -220px;
  left: 0;
  width: 100%;
  background: #fff;
  border-bottom: 2px solid #ddd;
  box-shadow: 0px 4px 12px rgba(0,0,0,0.2);
  padding: 7px 10px 15px 10px;
  transition: top 0.4s ease;

}

#cs-langOverlay.show #cs-langDrawer {
  top: 0;
}

/* Fila de banderas */
.cs-langRow {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 0px 0px 0px;
}

.cs-langRow::-webkit-scrollbar {
  display: none;
}

/* Estilo banderas */
.cs-flagOption {
  cursor: pointer;
  text-align: center;
  min-width: 70px;
  padding: 6px;
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cs-flagOption:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0px 4px 8px rgba(0,0,0,0.15);
}

/* Estado activo */
.cs-flagOption.active {
  border: 2px solid #1976d2;
  background: #e3f2fd;
}

/* Banderas como PNG */
.cs-flag-img {
  width: 30px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 6px;
}

.cs-langName {
  font-size: 12px;
  margin-top: 4px;
  font-weight: 600;
  color: #333;
}

/* Overlay */
#cs-loading {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.9);
  z-index: 20000;
  align-items: center;
  justify-content: center;
}

/* Caja central */
.cs-loader-box {
  background: #fff;
  padding: 30px 40px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  text-align: center;
  animation: fadeInCS 0.3s ease;
}

/* Spinner animado */
.cs-spinner {
  margin: 0 auto 15px auto;
  width: 40px;
  height: 40px;
  border: 4px solid #e3f2fd;
  border-top: 4px solid #1976d2;
  border-radius: 50%;
  animation: spinCS 1s linear infinite;
}

/* Texto */
.cs-loader-box p {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: #1976d2;
}

/* Animaciones */
@keyframes spinCS {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeInCS {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
