/**
 * Button Fix CSS
 * Enhanced button styles and theme toggle animation
 */

/* ===== Theme Toggle Button Animation ===== */
@keyframes rotateToggle {
  0% { 
    transform: translate(-50%, -50%) rotate(0deg); 
    opacity: 0.8;
  }
  50% { 
    transform: translate(-50%, -50%) rotate(180deg); 
    opacity: 1;
  }
  100% { 
    transform: translate(-50%, -50%) rotate(360deg); 
    opacity: 0.8;
  }
}

.theme-toggle-animation #darkIcon,
.theme-toggle-animation #lightIcon {
  animation: rotateToggle 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Theme toggle button styling */
.z-theme-toggle {
  overflow: hidden !important; /* Contain the icon within the button */
  position: relative !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: transparent !important;
  border: none !important;
  cursor: pointer !important;
  transition: background-color 0.3s !important;
}

/* Theme-specific toggle button styling */
.theme-dark .z-theme-toggle {
  color: #E2E8F0 !important;
}

.theme-light .z-theme-toggle {
  color: #1E293B !important;
}

/* Hover effects */
.theme-dark .z-theme-toggle:hover {
  background-color: rgba(123, 112, 250, 0.15) !important;
}

.theme-light .z-theme-toggle:hover {
  background-color: rgba(108, 92, 231, 0.15) !important;
}

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

/* Fix icon positioning */
#darkIcon, #lightIcon {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  font-size: 1.2rem !important;
  width: 20px !important;
  height: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Theme-specific icon colors */
.theme-dark #lightIcon {
  color: #E2E8F0 !important;
}

.theme-light #darkIcon {
  color: #1E293B !important;
}

/* ===== Button Color Fixes ===== */

/* Primary Buttons */
.theme-dark .btn-primary,
.theme-dark .btn.btn-primary,
.theme-dark a.btn-primary {
  background-color: #7B70FA !important;
  border-color: #7B70FA !important;
  color: #FFFFFF !important;
}

.theme-light .btn-primary,
.theme-light .btn.btn-primary,
.theme-light a.btn-primary {
  background-color: #6C5CE7 !important;
  border-color: #6C5CE7 !important;
  color: #FFFFFF !important;
}

/* Primary Button Hover */
.theme-dark .btn-primary:hover,
.theme-dark .btn.btn-primary:hover,
.theme-dark a.btn-primary:hover {
  background-color: #6C5CE7 !important;
  border-color: #6C5CE7 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(123, 112, 250, 0.4) !important;
}

.theme-light .btn-primary:hover,
.theme-light .btn.btn-primary:hover,
.theme-light a.btn-primary:hover {
  background-color: #5B51D6 !important;
  border-color: #5B51D6 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(108, 92, 231, 0.4) !important;
}

/* Secondary Buttons */
.theme-dark .btn-secondary,
.theme-dark .btn.btn-secondary {
  background-color: #3a4158 !important;
  border-color: #3a4158 !important;
  color: #E2E8F0 !important;
}

.theme-light .btn-secondary,
.theme-light .btn.btn-secondary {
  background-color: #475569 !important;
  border-color: #475569 !important;
  color: #FFFFFF !important;
}

/* Outline Buttons */
.theme-dark .btn-outline-primary,
.theme-dark .btn.btn-outline-primary {
  color: #7B70FA !important;
  border-color: #7B70FA !important;
  background-color: transparent !important;
}

.theme-light .btn-outline-primary,
.theme-light .btn.btn-outline-primary {
  color: #6C5CE7 !important;
  border-color: #6C5CE7 !important;
  background-color: transparent !important;
}

/* Outline Button Hover */
.theme-dark .btn-outline-primary:hover,
.theme-dark .btn.btn-outline-primary:hover {
  background-color: rgba(123, 112, 250, 0.1) !important;
  color: #7B70FA !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(123, 112, 250, 0.2) !important;
}

.theme-light .btn-outline-primary:hover,
.theme-light .btn.btn-outline-primary:hover {
  background-color: rgba(108, 92, 231, 0.1) !important;
  color: #6C5CE7 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(108, 92, 231, 0.2) !important;
}

/* Button Transitions */
.btn, 
.btn-primary, 
.btn-secondary, 
.btn-outline-primary {
  transition: all 0.3s ease !important;
}

/* Home page hero buttons */
.btn-primary,
.btn-outline {
  transition: all 0.3s ease !important;
}

.hero-buttons .btn-primary {
  background-color: #7B70FA !important;
  border-color: #7B70FA !important;
  color: white !important;
}

.theme-light .hero-buttons .btn-primary {
  background-color: #6C5CE7 !important;
  border-color: #6C5CE7 !important;
}

.hero-buttons .btn-primary:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 15px rgba(123, 112, 250, 0.4) !important;
}

.theme-light .hero-buttons .btn-primary:hover {
  background-color: #5B51D6 !important;
  box-shadow: 0 8px 15px rgba(108, 92, 231, 0.4) !important;
}
