/* Skill MD - Dark Terminal Theme */
/* Built with TailwindCSS custom configuration */

/* Custom Properties */
:root {
  --terminal-bg: #0a0a0a;
  --terminal-surface: #111111;
  --terminal-border: #333333;
  --terminal-text: #e0e0e0;
  --terminal-accent: #00ff41;
  --terminal-muted: #666666;
}

/* Tailwind Base */
*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: var(--terminal-border);
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  margin: 0;
  line-height: inherit;
}

/* Base Styles */
.bg-transparent { background-color: transparent; }
.bg-terminal-bg { background-color: var(--terminal-bg); }
.bg-terminal-surface { background-color: var(--terminal-surface); }
.border-terminal-border { border-color: var(--terminal-border); }
.text-terminal-text { color: var(--terminal-text); }
.text-terminal-accent { color: var(--terminal-accent); }
.text-terminal-muted { color: var(--terminal-muted); }
.border-terminal-accent { border-color: var(--terminal-accent); }
.bg-terminal-accent { background-color: var(--terminal-accent); }

/* Layout */
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.grid { display: grid; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }

.m-0 { margin: 0; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-auto { margin-top: auto; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-16 { margin-bottom: 4rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-left: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Sizing */
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-full { width: 100%; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-64 { height: 16rem; }
.min-h-\[400px\] { min-height: 400px; }
.max-h-\[400px\] { max-height: 400px; }
.max-h-\[600px\] { max-height: 600px; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-6xl { max-width: 72rem; }

/* Typography */
.font-mono { font-family: 'Hack', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.whitespace-pre-wrap { white-space: pre-wrap; }

/* Borders */
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-dashed { border-style: dashed; }
.rounded-full { border-radius: 9999px; }

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.hidden { display: none; }
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.cursor-pointer { cursor: pointer; }
.resize-none { resize: none; }
.flex-shrink-0 { flex-shrink: 0; }

/* Transitions */
.transition-colors { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

/* Hover States */
.hover\:opacity-80:hover { opacity: 0.8; }
.hover\:opacity-90:hover { opacity: 0.9; }
.hover\:underline:hover { text-decoration: underline; }
.hover\:text-terminal-accent:hover { color: var(--terminal-accent); }
.hover\:text-terminal-text:hover { color: var(--terminal-text); }
.hover\:border-terminal-accent:hover { border-color: var(--terminal-accent); }
.hover\:border-terminal-text:hover { border-color: var(--terminal-text); }
.hover\:bg-terminal-accent:hover { background-color: var(--terminal-accent); }
.hover\:text-terminal-bg:hover { color: var(--terminal-bg); }

/* Focus States */
.focus\:border-terminal-accent:focus { border-color: var(--terminal-accent); }
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }

/* Form Elements */
input, textarea, select {
  color: var(--terminal-text);
  background-color: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-family: 'Hack', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Button base styles - prevent white backgrounds */
button {
  background-color: transparent;
  color: var(--terminal-text);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--terminal-accent);
  box-shadow: 0 0 0 2px rgba(0, 255, 65, 0.1);
}

input:hover, textarea:hover, select:hover {
  border-color: var(--terminal-muted);
}

input::placeholder, textarea::placeholder {
  color: var(--terminal-muted);
}

input[type="checkbox"] {
  appearance: none;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--terminal-border);
  background: var(--terminal-bg);
  cursor: pointer;
  padding: 0;
}

input[type="checkbox"]:checked {
  background: var(--terminal-accent);
  border-color: var(--terminal-accent);
}

input[type="file"] {
  padding: 0.5rem;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  background: var(--terminal-accent);
  color: var(--terminal-bg);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Hack', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  margin-right: 0.75rem;
  transition: background-color 0.2s ease;
}

input[type="file"]::file-selector-button:hover {
  background: #00cc35;
}

/* Select styling */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23666666' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

select:focus {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2300ff41' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

/* Format badges */
.format-badge {
  display: inline-block;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  cursor: default;
}

/* Red/Error colors */
.border-red-500 { border-color: #ef4444; }
.bg-red-500\/10 { background-color: rgba(239, 68, 68, 0.1); }
.text-red-400 { color: #f87171; }
.text-red-300 { color: #fca5a5; }

/* Source badge colors */
.border-purple-500 { border-color: #a855f7; }
.bg-purple-500\/20 { background-color: rgba(168, 85, 247, 0.2); }
.text-purple-400 { color: #c084fc; }
.hover\:border-purple-500:hover { border-color: #a855f7; }
.hover\:text-purple-400:hover { color: #c084fc; }

.border-gray-400 { border-color: #9ca3af; }
.bg-gray-400\/20 { background-color: rgba(156, 163, 175, 0.2); }
.text-gray-300 { color: #d1d5db; }
.hover\:border-gray-400:hover { border-color: #9ca3af; }
.hover\:text-gray-300:hover { color: #d1d5db; }

.border-orange-500 { border-color: #f97316; }
.bg-orange-500\/20 { background-color: rgba(249, 115, 22, 0.2); }
.text-orange-400 { color: #fb923c; }
.hover\:border-orange-500:hover { border-color: #f97316; }
.hover\:text-orange-400:hover { color: #fb923c; }

.border-blue-500 { border-color: #3b82f6; }
.bg-blue-500\/20 { background-color: rgba(59, 130, 246, 0.2); }
.text-blue-400 { color: #60a5fa; }
.hover\:border-blue-500:hover { border-color: #3b82f6; }
.hover\:text-blue-400:hover { color: #60a5fa; }

.border-green-500 { border-color: #22c55e; }
.bg-green-500\/20 { background-color: rgba(34, 197, 94, 0.2); }
.text-green-400 { color: #4ade80; }
.hover\:border-green-500:hover { border-color: #22c55e; }
.hover\:text-green-400:hover { color: #4ade80; }

/* Opacity */
.opacity-50 { opacity: 0.5; }

/* Pre/Code */
pre {
  font-family: 'Hack', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  margin: 0;
}

/* Responsive */
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:flex-row { flex-direction: row; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Selection */
::selection {
  background-color: var(--terminal-accent);
  color: var(--terminal-bg);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--terminal-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--terminal-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--terminal-muted);
}

/* Flex helpers */
.sm\:flex-row { }
@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
}

/* ===== ANIMATIONS ===== */

/* Fade in on load */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Fade in up (for cards and content) */
.fade-in-up {
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Smooth hover transitions for cards */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 65, 0.15);
  border-color: var(--terminal-accent);
}

/* Loading spinner */
.loading-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Pulse for processing state */
.pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Pulse border (for focus/active states) */
.pulse-border {
  animation: pulseBorder 2s ease-in-out infinite;
}

@keyframes pulseBorder {
  0%, 100% { border-color: var(--terminal-border); }
  50% { border-color: var(--terminal-accent); }
}

/* Slide in from right */
.slide-in-right {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Slide in from left */
.slide-in-left {
  animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Scale up (for modals and popups) */
.scale-up {
  animation: scaleUp 0.2s ease-out;
}

@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Success flash */
.flash-success {
  animation: flashGreen 0.5s ease;
}

@keyframes flashGreen {
  0%, 100% { border-color: var(--terminal-border); background-color: var(--terminal-surface); }
  50% { border-color: var(--terminal-accent); background-color: rgba(0, 255, 65, 0.1); }
}

/* Error flash */
.flash-error {
  animation: flashRed 0.5s ease;
}

@keyframes flashRed {
  0%, 100% { border-color: var(--terminal-border); background-color: var(--terminal-surface); }
  50% { border-color: #ef4444; background-color: rgba(239, 68, 68, 0.1); }
}

/* Shake (for errors) */
.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* Glow effect for accent elements */
.glow {
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { box-shadow: 0 0 5px rgba(0, 255, 65, 0.2); }
  to { box-shadow: 0 0 15px rgba(0, 255, 65, 0.4); }
}

/* Text glow for accent text */
.text-glow {
  animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
  from { text-shadow: 0 0 5px rgba(0, 255, 65, 0.3); }
  to { text-shadow: 0 0 15px rgba(0, 255, 65, 0.6); }
}

/* Typing cursor animation */
.typing-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Smooth button hover */
.btn-hover {
  transition: all 0.2s ease;
}

.btn-hover:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 255, 65, 0.2);
}

.btn-hover:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Progress bar animation */
.progress-bar {
  animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--terminal-surface) 25%, var(--terminal-bg) 50%, var(--terminal-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Stagger animation delay helpers */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* HTMX-specific animations */
.htmx-indicator {
  opacity: 0;
  transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
  opacity: 1;
}

.htmx-request.htmx-indicator {
  opacity: 1;
}

/* Smooth swap transitions for HTMX */
.htmx-swapping {
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.htmx-settling {
  opacity: 1;
  transition: opacity 0.2s ease-in;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== SYNTAX HIGHLIGHTING (Dark Terminal Theme) ===== */
/* Compatible with Prism.js and custom code blocks */

code, pre code {
  font-family: 'Hack', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
}

pre {
  background-color: var(--terminal-surface);
  border: 1px solid var(--terminal-border);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
}

/* Inline code */
:not(pre) > code {
  background-color: var(--terminal-surface);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  color: var(--terminal-accent);
}

/* Prism.js Terminal Theme Overrides */
code[class*="language-"],
pre[class*="language-"] {
  background: var(--terminal-surface);
  color: var(--terminal-text);
  text-shadow: none;
}

/* Token colors - Dracula-inspired for terminal aesthetic */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #6272a4;
  font-style: italic;
}

.token.punctuation {
  color: var(--terminal-text);
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
  color: #ff79c6;
}

.token.boolean,
.token.number {
  color: #bd93f9;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #50fa7b;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
  color: #ffb86c;
}

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
  color: #f1fa8c;
}

.token.keyword {
  color: #ff79c6;
}

.token.regex,
.token.important {
  color: #ffb86c;
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

/* YAML specific tokens */
.token.key,
.token.atrule {
  color: #8be9fd;
}

.token.scalar,
.token.string {
  color: #f1fa8c;
}

/* Markdown specific tokens */
.token.title,
.token.title .token.punctuation {
  color: var(--terminal-accent);
  font-weight: bold;
}

.token.list {
  color: #ff79c6;
}

.token.hr {
  color: #6272a4;
}

.token.code {
  color: #50fa7b;
}

.token.url,
.token.url-reference {
  color: #8be9fd;
  text-decoration: underline;
}

/* Code block styling */
pre[class*="language-"] {
  position: relative;
}

/* Copy button for code blocks (if added via JS) */
.code-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  color: var(--terminal-muted);
  font-size: 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

pre:hover .code-copy-btn {
  opacity: 1;
}

.code-copy-btn:hover {
  color: var(--terminal-accent);
  border-color: var(--terminal-accent);
}

.code-copy-btn.copied {
  color: var(--terminal-accent);
  border-color: var(--terminal-accent);
}

/* Skill preview code styling */
.skill-preview pre {
  margin: 1rem 0;
}

.skill-preview code {
  display: block;
  max-height: 400px;
  overflow-y: auto;
}

/* ===== LOADING BAR & NATIVE FEEL ===== */

/* Position utilities */
.fixed { position: fixed; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.z-50 { z-index: 50; }

/* Height */
.h-0\.5 { height: 0.125rem; }

/* Transform utilities */
.scale-x-0 { transform: scaleX(0); }
.origin-left { transform-origin: left; }

/* Transition utilities */
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.duration-300 { transition-duration: 300ms; }

/* View Transitions */
@view-transition {
    navigation: auto;
}

/* Gap utilities */
.gap-1 { gap: 0.25rem; }

/* Smooth page transitions with HTMX boost */
.htmx-swapping > main {
    opacity: 0;
    transition: opacity 0.15s ease-out;
}

.htmx-settling > main {
    opacity: 1;
    transition: opacity 0.15s ease-in;
}

/* ===== TOOLTIPS ===== */

/* Tooltip container */
.tooltip {
    position: relative;
}

/* Tooltip text - uses data-tooltip attribute */
.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background-color: var(--terminal-surface);
    border: 1px solid var(--terminal-accent);
    color: var(--terminal-text);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 100;
    pointer-events: none;
    border-radius: 4px;
}

/* Arrow */
.tooltip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--terminal-accent);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 100;
}

/* Show on hover/focus */
.tooltip:hover::after,
.tooltip:hover::before,
.tooltip:focus::after,
.tooltip:focus::before {
    opacity: 1;
    visibility: visible;
}

/* Position variant: bottom */
.tooltip-bottom::after {
    bottom: auto;
    top: calc(100% + 8px);
}

.tooltip-bottom::before {
    bottom: auto;
    top: calc(100% + 2px);
    border-top-color: transparent;
    border-bottom-color: var(--terminal-accent);
}

/* Position variant: left */
.tooltip-left::after {
    bottom: auto;
    left: auto;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
}

.tooltip-left::before {
    bottom: auto;
    left: auto;
    right: calc(100% + 2px);
    top: 50%;
    transform: translateY(-50%);
    border-top-color: transparent;
    border-left-color: var(--terminal-accent);
}

/* Position variant: right */
.tooltip-right::after {
    bottom: auto;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
}

.tooltip-right::before {
    bottom: auto;
    left: calc(100% + 2px);
    top: 50%;
    transform: translateY(-50%);
    border-top-color: transparent;
    border-right-color: var(--terminal-accent);
}
