/* ==========================================================================
   DARK MODE TOGGLE BUTTON STYLES
   The theme variables and overrides are in coastal-elegance.css
   This file only contains the toggle button UI
   ========================================================================== */

/* Smooth transitions for theme change */
body,
nav,
.hero-maritime,
.filters-maritime,
.footer-maritime,
#restaurantGrid > div,
#restaurantGrid .bg-white,
.cuisine-pill,
.filter-select,
.hero-search-box,
.modal-content,
button {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* --------------------------------------------------------------------------
   Dark Mode Toggle Button
   -------------------------------------------------------------------------- */
.theme-toggle {
  position: fixed;
  top: 5.5rem;
  right: 1.5rem;
  z-index: 60;
  background: white;
  border: 1px solid var(--mist, #e9ecef);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(10, 22, 40, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .theme-toggle {
  background: var(--mist, #1e293b);
  border-color: rgba(148, 163, 184, 0.2);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(10, 22, 40, 0.15);
  border-color: var(--sea-light, #3a7ca5);
}

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

.theme-toggle svg {
  width: 22px;
  height: 22px;
  color: var(--sea-mid, #1e4976);
  transition: transform 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .theme-toggle svg {
  color: var(--sea-foam, #81c3d7);
}

.theme-toggle:hover svg {
  transform: rotate(15deg);
}

/* Hide/show icons based on theme */
[data-theme="light"] .theme-toggle .moon-icon,
:root:not([data-theme]) .theme-toggle .moon-icon {
  display: block;
}

[data-theme="light"] .theme-toggle .sun-icon,
:root:not([data-theme]) .theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

/* Mobile responsive positioning */
@media (max-width: 768px) {
  .theme-toggle {
    top: 4.5rem;
    right: 1rem;
    width: 44px;
    height: 44px;
  }

  .theme-toggle svg {
    width: 20px;
    height: 20px;
  }
}

/* High contrast for accessibility */
@media (prefers-contrast: high) {
  .theme-toggle {
    border-width: 2px;
    border-color: currentColor;
  }
}
