@tailwind base;
@tailwind components;
@tailwind utilities;

/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom toast animation */
@keyframes toast-enter {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-toast {
  animation: toast-enter 0.3s ease-out forwards;
}

.project-switcher-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-button {
  background-color: #3490dc;
  /* Example color */
  color: white;
  padding: 8px;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

.dropdown-button .caret {
  border-width: 5px;
  border-style: solid;
  border-color: white transparent transparent transparent;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #1a202c;
  /* Example color */
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.dropdown-content a {
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #4a5568;
  /* Example color */
}

.dropdown-content .dropdown-header {
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  color: #a0aec0;
  /* Example color */
}

.new-project {
  color: #9f7aea;
  /* Example color */
}

/* Show the dropdown menu on hover */
.project-switcher-dropdown:hover .dropdown-content {
  display: block;
}

/* Onboarding animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
}

.animate-fade-in {
  animation: fade-in 0.4s ease-out forwards;
}

.onboarding-highlight {
  animation: pulse 2s infinite;
}

/* Tooltip styles */
.tooltip {
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

.tooltip-top::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #1f2937 transparent transparent transparent;
}

.tooltip-bottom::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent #1f2937 transparent;
}

.tooltip-left::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent transparent #1f2937;
}

.tooltip-right::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent #1f2937 transparent transparent;
}

/* Intro.js Custom Styles */
/* Ensure intro.js elements appear above navigation */
.introjs-overlay {
  z-index: 99 !important;
}

.introjs-helperLayer {
  z-index: 100 !important;
}

.introjs-tooltipReferenceLayer {
  z-index: 101 !important;
}

.introjs-fixedTooltip {
  z-index: 102 !important;
}

.introjs-custom-tooltip {
  background: #1f2937 !important;
  color: white !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif !important;
  max-width: 320px !important;
  padding: 20px !important;
  z-index: 102 !important;
}

.introjs-custom-tooltip .introjs-tooltip-header {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-bottom: 12px !important;
}

.introjs-custom-tooltip .introjs-tooltip-title {
  color: white !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  margin-bottom: 8px !important;
}

.introjs-custom-tooltip .introjs-tooltiptext {
  line-height: 1.5 !important;
  font-size: 14px !important;
  color: #e5e7eb !important;
}

.introjs-custom-tooltip .introjs-button {
  background: #3b82f6 !important;
  color: white !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 8px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.introjs-custom-tooltip .introjs-button:hover {
  background: #2563eb !important;
  transform: translateY(-1px) !important;
}

.introjs-custom-tooltip .introjs-skipbutton {
  background: transparent !important;
  color: #9ca3af !important;
  border: 1px solid #4b5563 !important;
}

.introjs-custom-tooltip .introjs-skipbutton:hover {
  background: #374151 !important;
  color: white !important;
  border-color: #6b7280 !important;
}

.introjs-custom-tooltip .introjs-prevbutton {
  background: #6b7280 !important;
}

.introjs-custom-tooltip .introjs-prevbutton:hover {
  background: #4b5563 !important;
}

.introjs-custom-tooltip .introjs-bullets {
  text-align: center !important;
  margin: 16px 0 8px 0 !important;
}

.introjs-custom-tooltip .introjs-bullets ul {
  padding: 0 !important;
  margin: 0 !important;
}

.introjs-custom-tooltip .introjs-bullets ul li {
  background: #4b5563 !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  margin: 0 4px !important;
}

.introjs-custom-tooltip .introjs-bullets ul li.active {
  background: #3b82f6 !important;
}

.introjs-custom-tooltip .introjs-progress {
  background: #374151 !important;
  height: 4px !important;
  border-radius: 2px !important;
  margin: 12px 0 !important;
}

.introjs-custom-tooltip .introjs-progressbar {
  background: #3b82f6 !important;
  border-radius: 2px !important;
}

.introjs-custom-highlight {
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6) !important;
  border-radius: 8px !important;
  animation: intro-highlight-pulse 2s infinite !important;
}

@keyframes intro-highlight-pulse {
  0%, 100% {
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6), 0 0 0 4px rgba(59, 130, 246, 0.3) !important;
  }
  50% {
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6), 0 0 0 8px rgba(59, 130, 246, 0.6) !important;
  }
}

.intro-highlighted {
  animation: intro-element-highlight 1s ease-out !important;
}

@keyframes intro-element-highlight {
  0% {
    background-color: rgba(59, 130, 246, 0.1);
    transform: scale(1);
  }
  50% {
    background-color: rgba(59, 130, 246, 0.2);
    transform: scale(1.02);
  }
  100% {
    background-color: transparent;
    transform: scale(1);
  }
}

/* Tour trigger buttons */
.tour-trigger-btn {
  @apply inline-flex items-center px-3 py-1.5 bg-blue-100 text-blue-700 text-sm font-medium rounded-lg hover:bg-blue-200 transition-colors;
}

.tour-trigger-btn:before {
  content: "🎯";
  margin-right: 6px;
}

/* Helper hint styles */
.intro-hint {
  @apply fixed z-40 bg-blue-500 text-white p-2 rounded-full cursor-pointer shadow-lg;
  animation: hint-pulse 2s infinite;
}

@keyframes hint-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
  }
}
