/**
 * Elementor Dark Mode Pro - Switcher Styles
 * Features exact Warm Sand Sun/Moon Pill Capsule with smooth sliding thumb knob
 */

:root {
  --edm-track-bg-light: #ebd7ac;
  --edm-track-bg-dark: #232533;
  --edm-thumb-bg-light: #ffffff;
  --edm-thumb-bg-dark: #ffffff;
  --edm-sun-color-light: #e5a93b;
  --edm-moon-color-light: #8a8979;
  --edm-sun-color-dark: #64748b;
  --edm-moon-color-dark: #818cf8;
}

.edm-switcher-wrapper {
  display: inline-block;
  vertical-align: middle;
}

/* Floating Switcher */
.edm-switcher-wrapper.edm-is-floating {
  position: fixed !important;
  z-index: 999999 !important;
}

.edm-switcher-wrapper.edm-pos-bottom-right {
  bottom: 24px;
  right: 24px;
}

.edm-switcher-wrapper.edm-pos-bottom-left {
  bottom: 24px;
  left: 24px;
}

.edm-switcher-wrapper.edm-pos-top-right {
  top: 24px;
  right: 24px;
}

.edm-switcher-wrapper.edm-pos-top-left {
  top: 24px;
  left: 24px;
}

/* 1. Sun & Moon Capsule Pill Toggle Switcher (Exact Image Design) */
.edm-switcher-btn.edm-toggle-pill {
  all: unset !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: relative !important;
  width: 68px !important;
  height: 36px !important;
  box-sizing: border-box !important;
  padding: 4px !important;
  margin: 0 !important;
  border-radius: 9999px !important;
  -webkit-border-radius: 9999px !important;
  -moz-border-radius: 9999px !important;
  background-color: var(--edm-track-bg-light, #ebd7ac) !important;
  border: none !important;
  cursor: pointer !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  overflow: hidden !important;
  line-height: 1 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease, box-shadow 0.3s ease !important;
  outline: none !important;
}

.edm-switcher-btn.edm-toggle-pill:focus-visible {
  outline: 2px solid #e5a93b !important;
  outline-offset: 3px !important;
}

.edm-switcher-btn.edm-toggle-pill:hover {
  filter: brightness(1.02);
}

.edm-toggle-track {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

/* Ambient Track Icons */
.edm-toggle-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  line-height: 1 !important;
  z-index: 1 !important;
  transition: opacity 0.35s ease, transform 0.35s ease, color 0.3s ease !important;
  pointer-events: none !important;
}

/* In Light Mode: Left Ambient Sun is hidden (0 opacity) under the white knob; Right Moon is visible */
.edm-icon-sun {
  color: var(--edm-sun-color-dark, #64748b) !important;
  stroke: var(--edm-sun-color-dark, #64748b) !important;
  opacity: 0 !important;
  transform: scale(0.5) !important;
}

.edm-icon-moon {
  color: var(--edm-moon-color-light, #8a8979) !important;
  stroke: var(--edm-moon-color-light, #8a8979) !important;
  opacity: 0.85 !important;
  transform: scale(1) !important;
}

/* Sliding Solid Circular Thumb Knob */
.edm-toggle-thumb {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 28px !important;
  height: 28px !important;
  background-color: var(--edm-thumb-bg-light, #ffffff) !important;
  border-radius: 50% !important;
  -webkit-border-radius: 50% !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16), 0 1px 2px rgba(0, 0, 0, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2 !important;
  transition: transform 0.35s cubic-bezier(0.34, 1.25, 0.64, 1), background-color 0.25s ease, box-shadow 0.3s ease !important;
  will-change: transform !important;
  pointer-events: none !important;
}

/* Active Icons inside Knob */
.edm-thumb-icon {
  position: absolute !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.25, 0.64, 1) !important;
}

.edm-thumb-sun {
  color: var(--edm-sun-color-light, #e5a93b) !important;
  stroke: var(--edm-sun-color-light, #e5a93b) !important;
  opacity: 1 !important;
  transform: scale(1) rotate(0deg) !important;
}

.edm-thumb-moon {
  color: var(--edm-moon-color-dark, #818cf8) !important;
  stroke: var(--edm-moon-color-dark, #818cf8) !important;
  opacity: 0 !important;
  transform: scale(0.5) rotate(-45deg) !important;
}

/* When Dark Mode Active */
.edm-switcher-btn.edm-toggle-pill.edm-is-dark {
  background-color: var(--edm-track-bg-dark, #232533) !important;
}

.edm-switcher-btn.edm-toggle-pill.edm-is-dark .edm-toggle-thumb {
  transform: translateX(32px) !important;
  background-color: var(--edm-thumb-bg-dark, #ffffff) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.edm-switcher-btn.edm-toggle-pill.edm-is-dark .edm-thumb-sun {
  opacity: 0 !important;
  transform: scale(0.5) rotate(45deg) !important;
}

.edm-switcher-btn.edm-toggle-pill.edm-is-dark .edm-thumb-moon {
  opacity: 1 !important;
  transform: scale(1) rotate(0deg) !important;
}

.edm-switcher-btn.edm-toggle-pill.edm-is-dark .edm-icon-sun {
  opacity: 0.8 !important;
  transform: scale(1) !important;
}

.edm-switcher-btn.edm-toggle-pill.edm-is-dark .edm-icon-moon {
  opacity: 0 !important;
  transform: scale(0.5) !important;
}

/* 2. Segmented Tri-State Control */
.edm-segmented-control {
  display: inline-flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  gap: 2px;
}

html.dark-mode .edm-segmented-control {
  background: #171a21;
  border-color: #2b313c;
}

.edm-segment-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

html.dark-mode .edm-segment-opt {
  color: #94a3b8;
}

.edm-segment-opt:hover {
  color: #0f172a;
}

html.dark-mode .edm-segment-opt:hover {
  color: #ffffff;
}

.edm-segment-opt.edm-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

html.dark-mode .edm-segment-opt.edm-active {
  background: #7c5cfc;
  color: #ffffff;
}

/* 3. Action Button */
.edm-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

html.dark-mode .edm-action-btn {
  background: #171a21;
  color: #f5f7fa;
  border-color: #2b313c;
}

.edm-action-btn .edm-moon-icon {
  display: none;
}

html.dark-mode .edm-action-btn .edm-sun-icon {
  display: none;
}

html.dark-mode .edm-action-btn .edm-moon-icon {
  display: inline-block;
}

/* 4. Minimalist Icon Only */
.edm-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

html.dark-mode .edm-icon-btn {
  background: #171a21;
  color: #f5f7fa;
  border-color: #2b313c;
}

.edm-icon-btn .edm-moon-icon {
  display: none;
}

html.dark-mode .edm-icon-btn .edm-sun-icon {
  display: none;
}

html.dark-mode .edm-icon-btn .edm-moon-icon {
  display: inline-block;
}

/* 5. Dropdown Select */
.edm-dropdown-select {
  padding: 8px 14px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

html.dark-mode .edm-dropdown-select {
  background: #171a21;
  border-color: #2b313c;
  color: #f5f7fa;
}
