/* ===============================
   THEME SWITCHER - Panel flotante
   para alternar combinaciones de color
   =============================== */

.theme-switcher {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 998;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.theme-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.theme-options {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 50px;
  padding: 8px 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  transform: translateX(-10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.theme-switcher.open .theme-options {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

.theme-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  margin-right: 4px;
}

.theme-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.theme-btn:hover {
  transform: scale(1.15);
}

.theme-btn.active {
  border-color: #1a1a1a;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.8);
}

.theme-btn::after {
  content: attr(aria-label);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.theme-btn:hover::after {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 640px) {
  .theme-switcher {
    bottom: 16px;
    left: 16px;
  }

  .theme-options {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 0;
    border-radius: 16px;
    padding: 10px 14px;
    transform: translateY(10px);
    flex-wrap: wrap;
    max-width: 240px;
    justify-content: center;
    gap: 8px;
  }

  .theme-switcher.open .theme-options {
    transform: translateY(0);
  }

  .theme-label {
    width: 100%;
    text-align: center;
    margin-right: 0;
    margin-bottom: 4px;
  }
}
