/**
 * ============================================================================
 * GDGoC Tree - Theme Switcher Menu Styles
 * ============================================================================
 */

.theme-switcher-wrapper {
  position: absolute;
  top: 25px;
  right: 25px;
  z-index: 300;
  user-select: none;
}

/* --------------------------------------------------------------------------
   Classic Mode Theme Switcher (Default)
   -------------------------------------------------------------------------- */
.theme-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.theme-menu-btn:hover {
  background: #ffffff;
  border-color: #cccccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.theme-menu-btn:active {
  transform: translateY(1px);
}

.theme-icon {
  font-size: 16px;
  display: flex;
  align-items: center;
}

.theme-label {
  font-size: 14px;
  font-weight: 600;
  color: #333333;
}

.theme-chevron {
  transition: transform 0.2s ease;
  color: #666666;
}

.theme-menu-btn[aria-expanded="true"] .theme-chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.theme-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #eaeaea;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 350;
  animation: fadeInDown 0.18s ease-out;
}

.theme-dropdown.open {
  display: flex;
}

.theme-dropdown-header {
  padding: 6px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #888888;
  letter-spacing: 0.5px;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
  width: 100%;
  color: inherit;
}

.theme-option:hover {
  background: #f4f6f9;
}

.theme-option.active {
  background: #edf3fd;
}

.option-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.option-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.option-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
}

.option-sub {
  font-size: 11px;
  color: #777777;
}

.option-check {
  font-size: 14px;
  font-weight: bold;
  color: #4285f4;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.theme-option.active .option-check {
  opacity: 1;
}

.theme-dropdown-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 6px 4px;
}

.motion-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  background: #e6f4ea;
  color: #137333;
  margin-left: auto;
  transition: all 0.2s ease;
}

.motion-badge.off {
  background: #f1f3f4;
  color: #5f6368;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Pixel Art Mode Overrides for Theme Switcher
   -------------------------------------------------------------------------- */
[data-theme="pixel"] .theme-menu-btn {
  font-family: "Press Start 2P", monospace, sans-serif;
  font-size: 9px;
  border-radius: 0;
  border: 3px solid #000000;
  box-shadow: 3px 3px 0px #000000;
  background: #ffffff;
  color: #000000;
  padding: 8px 12px;
}

[data-theme="pixel"] .theme-menu-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px #000000;
}

[data-theme="pixel"] .theme-menu-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #000000;
}

[data-theme="pixel"] .theme-label {
  font-family: "Press Start 2P", monospace, sans-serif;
  font-size: 9px;
}

[data-theme="pixel"] .theme-dropdown {
  font-family: "Press Start 2P", monospace, sans-serif;
  border-radius: 0;
  border: 3px solid #000000;
  box-shadow: 5px 5px 0px #000000;
  background: #fdfbf7;
  min-width: 250px;
}

[data-theme="pixel"] .theme-dropdown-header {
  font-family: "Press Start 2P", monospace, sans-serif;
  font-size: 8px;
  color: #000000;
  border-bottom: 2px solid #000000;
  margin-bottom: 4px;
}

[data-theme="pixel"] .theme-option {
  border-radius: 0;
  font-family: "Press Start 2P", monospace, sans-serif;
  padding: 8px 10px;
}

[data-theme="pixel"] .theme-option:hover {
  background: #000000;
  color: #ffffff;
}

[data-theme="pixel"] .theme-option:hover .option-title,
[data-theme="pixel"] .theme-option:hover .option-sub,
[data-theme="pixel"] .theme-option:hover .option-check {
  color: #ffffff;
}

[data-theme="pixel"] .option-title {
  font-family: "Press Start 2P", monospace, sans-serif;
  font-size: 9px;
}

[data-theme="pixel"] .option-sub {
  font-family: "Press Start 2P", monospace, sans-serif;
  font-size: 7px;
  line-height: 1.5;
  margin-top: 3px;
}

[data-theme="pixel"] .theme-option.active {
  background: #ece8df;
}

[data-theme="pixel"] .theme-option.active .option-check {
  color: #ea4335;
}

[data-theme="pixel"] .theme-dropdown-divider {
  height: 2px;
  background: #000000;
  margin: 6px 0;
}

[data-theme="pixel"] .motion-badge {
  font-family: "Press Start 2P", monospace, sans-serif;
  font-size: 8px;
  border-radius: 0;
  border: 2px solid #000000;
  background: #34a853;
  color: #ffffff;
  padding: 3px 6px;
  margin-left: auto;
}

[data-theme="pixel"] .motion-badge.off {
  background: #888888;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Mobile Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 850px) {
  .theme-switcher-wrapper {
    top: 15px;
    right: 15px;
  }

  .theme-menu-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .theme-label {
    display: none;
  }

  [data-theme="pixel"] .theme-menu-btn {
    padding: 6px 10px;
  }
}
