/*
 * 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.
 *
 *= require_tree .
 *= require_self
 */

/* Reusable Glassmorphism Card Component */
.glass-card {
  background: rgba(128, 128, 128, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.glass-card-dark {
  background: rgba(64, 64, 64, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.soft-shadow-card {
  background: rgba(64, 64, 64, 0.2); /* Assuming same background as glass-card-dark */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05); /* Slightly less prominent border */
  border-radius: 20px; /* Matching the rounded-[20px] from ERB */
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.1), 0 2px 8px -2px rgba(0, 0, 0, 0.06); /* Softer, smaller shadow */
}

/* Subtle appear animation */
[data-controller="appear"] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

[data-controller="appear"].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* EasyMDE Glass Morphism Theme */
.CodeMirror {
  background: rgba(255, 255, 255, 0.02) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border: none !important;
  border-radius: 0 0 1rem 1rem !important;
  transition: all 0.3s ease !important;
}

.CodeMirror-cursor {
  border-left: 1px solid rgba(255, 255, 255, 0.8) !important;
}

.CodeMirror-selected {
  background-color: rgba(99, 102, 241, 0.2) !important;
}

.CodeMirror-gutters {
  background: rgba(255, 255, 255, 0.03) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.CodeMirror-linenumber {
  color: rgba(255, 255, 255, 0.4) !important;
}

/* EasyMDE Toolbar Glass Styling */
.editor-toolbar {
  background: rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: none !important;
  border-radius: 1rem 1rem 0 0 !important;
  padding: 0.75rem !important;
}

.editor-toolbar a {
  color: rgba(255, 255, 255, 0.8) !important;
  border: none !important;
  background: none !important;
  border-radius: 0.5rem !important;
  padding: 0.5rem !important;
  transition: all 0.2s ease !important;
}

.editor-toolbar a:hover {
  background: rgba(99, 102, 241, 0.2) !important;
  border-color: transparent !important;
  color: white !important;
  transform: translateY(-1px) !important;
}

.editor-toolbar a.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  color: white !important;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3) !important;
}

.editor-toolbar i.separator {
  border-left: 1px solid rgba(255, 255, 255, 0.2) !important;
  margin: 0 0.5rem !important;
}

/* EasyMDE Status Bar Glass */
.editor-statusbar {
  background: rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-top: none !important;
  border-radius: 0 0 1rem 1rem !important;
  color: rgba(255, 255, 255, 0.5) !important;
  padding: 0.5rem 1rem !important;
}

/* EasyMDE Preview Glass Styling */
.editor-preview, .editor-preview-side {
  background: rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 1rem !important;
  padding: 1.5rem !important;
}

.editor-preview h1, .editor-preview h2, .editor-preview h3, .editor-preview h4, .editor-preview h5, .editor-preview h6,
.editor-preview-side h1, .editor-preview-side h2, .editor-preview-side h3, .editor-preview-side h4, .editor-preview-side h5, .editor-preview-side h6 {
  color: white !important;
  margin-bottom: 1rem !important;
}

.editor-preview a, .editor-preview-side a {
  color: #a78bfa !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

.editor-preview a:hover, .editor-preview-side a:hover {
  color: #c4b5fd !important;
}

.editor-preview blockquote, .editor-preview-side blockquote {
  border-left: 4px solid rgba(99, 102, 241, 0.5) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.8) !important;
  margin: 1rem 0 !important;
  padding: 1rem !important;
  border-radius: 0.5rem !important;
}

.editor-preview code, .editor-preview-side code {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #a78bfa !important;
  padding: 0.25rem 0.5rem !important;
  border-radius: 0.375rem !important;
  font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
}

.editor-preview pre, .editor-preview-side pre {
  background: rgba(0, 0, 0, 0.2) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.75rem !important;
  padding: 1rem !important;
  margin: 1rem 0 !important;
}

.editor-preview ul, .editor-preview ol, .editor-preview-side ul, .editor-preview-side ol {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* EasyMDE Full Screen Mode */
.editor-toolbar.fullscreen {
  background: rgba(0, 0, 0, 0.8) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

.CodeMirror.CodeMirror-fullscreen {
  background: rgba(0, 0, 0, 0.8) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

/* EasyMDE Side by Side Mode */
.CodeMirror-sided {
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Focus states with beautiful glow */
.CodeMirror-focused {
  border-color: rgba(99, 102, 241, 0.5) !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
}

/* Custom scrollbar for EasyMDE */
.CodeMirror-scroll::-webkit-scrollbar {
  width: 8px;
}

.CodeMirror-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.CodeMirror-scroll::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 4px;
}

.CodeMirror-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

/* Shimmer Animation for Loading States */
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.animate-shimmer {
  animation: shimmer 2s infinite linear;
}

/* Application styles */

/* Tooltip styles */
.tooltip-popup {
  position: absolute;
  z-index: 1000;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  pointer-events: none;
  animation: tooltip-fade-in 0.2s ease-out;
}

@keyframes tooltip-fade-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
