.theme-nav-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: var(--md-shape-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition:
    background-color 0.18s var(--md-easing-standard),
    border-color 0.18s var(--md-easing-standard),
    transform 0.16s var(--md-easing-standard),
    color 0.18s var(--md-easing-standard);
}

.theme-nav-btn:hover,
.theme-nav-btn:focus-visible {
  background: var(--surface-alt);
  border-color: var(--hover-border);
  transform: translateY(-1px);
}

.theme-nav-btn:active {
  transform: translateY(0);
}

.theme-nav-btn svg {
  width: 20px;
  height: 20px;
  grid-area: 1 / 1;
}

.drawer-footer {
  padding: 16px;
  border-top: 1px solid var(--line);
  margin-top: auto;
  background: var(--header-bg);
}

.theme-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 50px;
  padding: 11px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--md-shape-sm);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  cursor: pointer;
  transition:
    background-color 0.18s var(--md-easing-standard),
    border-color 0.18s var(--md-easing-standard);
}

.theme-toggle-row:hover,
.theme-toggle-row:focus-visible {
  background: var(--nav-hover-bg);
  border-color: var(--hover-border);
}

.theme-toggle-row:active {
  transform: scale(0.985);
}

.theme-row-content {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.theme-icon-wrapper {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
}

.theme-icon-wrapper svg {
  width: 22px;
  height: 22px;
  grid-area: 1 / 1;
}

.theme-switch-indicator {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--line);
  border-radius: var(--md-shape-full);
  transition: background-color 0.24s var(--md-easing-standard);
}

.theme-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.24s var(--md-easing-emphasized);
}

:root[data-color-scheme="dark"] .theme-switch-indicator {
  background: var(--navy);
}

:root[data-color-scheme="dark"] .theme-switch-knob {
  transform: translateX(20px);
  background: var(--sky);
}

.theme-icon-sun,
.theme-icon-moon {
  transition:
    opacity 0.24s var(--md-easing-standard),
    transform 0.28s var(--md-easing-emphasized);
}

.theme-icon-sun {
  opacity: 0;
  transform: rotate(-45deg) scale(0.75);
}

.theme-icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

:root[data-color-scheme="dark"] .theme-icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

:root[data-color-scheme="dark"] .theme-icon-moon {
  opacity: 0;
  transform: rotate(45deg) scale(0.75);
}

.whatsapp-fab {
  --fab-x: 0px;
  --fab-y: 0px;
  position: fixed;
  right: clamp(16px, 2.5vw, 28px);
  bottom: clamp(16px, 2.5vw, 28px);
  z-index: 1030;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  transform: translate3d(var(--fab-x), var(--fab-y), 0);
  transition:
    background-color 0.18s var(--md-easing-standard),
    transform 0.32s var(--md-easing-emphasized),
    opacity 0.28s var(--md-easing-standard),
    visibility 0.32s var(--md-easing-standard),
    box-shadow 0.22s var(--md-easing-standard);
}

.whatsapp-fab:hover {
  --fab-y: -2px;
  background: #20ba59;
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.24);
}

.whatsapp-fab:active {
  --fab-y: 0px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}

.whatsapp-fab:focus-visible {
  outline: 3px solid #25d366;
  outline-offset: 3px;
}

.whatsapp-fab svg {
  width: 28px;
  height: 28px;
}

body.drawer-open .whatsapp-fab {
  --fab-x: calc(100% + clamp(16px, 2.5vw, 28px) + 24px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.26s cubic-bezier(0.4, 0, 0.7, 1),
    opacity 0.22s var(--md-easing-standard),
    visibility 0.26s var(--md-easing-standard);
}
