/* Custom styles for Eventix Documentation */

/* Hide Alpine.js elements until they're initialized */
[x-cloak] { 
    display: none !important; 
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-track {
    background: #374151;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Remove outline for non-keyboard navigation */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Keyboard focus styles */
:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


.h1, .h2, .h3, .h4 {
    margin-top: 1em;
    margin-bottom: 0.75em;
    font-weight: 700;
    scroll-margin-top: 100px;
}

.h1 {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.h2 {
    font-size: 1.875rem;
    line-height: 2.25rem;
    padding-bottom: 0.5rem;
    position: relative;
}

.h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #7c3aed, #8b5cf6);
    border-radius: 3px;
}

.dark .h2::after {
    background: linear-gradient(to right, #8b5cf6, #a78bfa);
}

.h3 {
    font-size: 1.5rem;
    line-height: 2rem;
}

.p {
    margin-bottom: 1.25em;
}

.ul, .ol {
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.li {
    margin-bottom: 0.5em;
}

.code:not(code) {
    background-color: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Courier New', monospace;
}

.dark .code:not(code) {
    background-color: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.pre {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-left: 4px solid #7c3aed;
}

.dark .pre {
    background-color: #0f172a;
    border-left-color: #8b5cf6;
}

/* Table styling */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.th {
    background-color: #f3f4f6;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.dark .th {
    background-color: #374151;
    border-bottom-color: #4b5563;
}

.td {
    border-top: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
}

.dark .td {
    border-top-color: #374151;
}

.tr:hover {
    background-color: #f9fafb;
}

.dark .tr:hover {
    background-color: #1f2937;
}

/* Link styling */
.a:not(.btn) {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.a:not(.btn):hover {
    border-bottom-color: #7c3aed;
}

.dark .a:not(.btn) {
    color: #a78bfa;
}

.dark .a:not(.btn):hover {
    border-bottom-color: #a78bfa;
}

/* Blockquote styling */
.blockquote {
    border-left: 4px solid #7c3aed;
    padding-left: 1.5rem;
    font-style: italic;
    color: #6b7280;
    margin: 1.5rem 0;
    background-color: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.dark .prose blockquote {
    color: #9ca3af;
    border-left-color: #8b5cf6;
    background-color: #1f2937;
}

/* Alert boxes */
.alert {
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-info {
    background-color: #dbeafe;
    border-left-color: #3b82f6;
    color: #1e40af;
}

.dark .alert-info {
    background-color: #1e3a8a;
    color: #dbeafe;
    border-left-color: #60a5fa;
}

.alert-warning {
    background-color: #fef3c7;
    border-left-color: #f59e0b;
    color: #92400e;
}

.dark .alert-warning {
    background-color: #78350f;
    color: #fef3c7;
    border-left-color: #fbbf24;
}

.alert-success {
    background-color: #d1fae5;
    border-left-color: #10b981;
    color: #065f46;
}

.dark .alert-success {
    background-color: #064e3b;
    color: #d1fae5;
    border-left-color: #34d399;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: #7c3aed;
    color: white;
    border-color: #7c3aed;
}

.btn-primary:hover {
    background-color: #6d28d9;
    border-color: #6d28d9;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.3);
}

.btn-secondary {
    background-color: white;
    color: #374151;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

/* Mobile optimizations */
@media (max-width: 768px) {
   
    .h1 {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
    
    .h2 {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    
    .h3 {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }
    
    .pre {
        padding: 1rem;
        font-size: 0.875rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    pre, code {
        background-color: #f5f5f5 !important;
        color: #000 !important;
        border: 1px solid #ddd !important;
    }
}
/* Hide Alpine.js elements until they're initialized */
[x-cloak] { 
    display: none !important; 
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

/* Custom scrollbar for sidebar and TOC */
.sidebar-scroll::-webkit-scrollbar,
.toc-scroll::-webkit-scrollbar {
    width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-track,
.toc-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb,
.toc-scroll::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.dark .sidebar-scroll::-webkit-scrollbar-thumb,
.dark .toc-scroll::-webkit-scrollbar-thumb {
    background: #4b5563;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover,
.toc-scroll::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Fix for sticky sidebar and TOC */
.sticky-sidebar {
    height: calc(100vh - 4rem);
    top: 4rem;
}

/* Content area should scroll independently */
.content-scroll {
    overflow-y: auto;
    max-height: calc(100vh - 4rem);
}

/* Mobile TOC dropdown */
#mobile-toc-container {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.dark #mobile-toc-container {
    scrollbar-color: #4b5563 transparent;
}

/* Active TOC item highlight */
#toc-container a.bg-eventix-primary\/10 {
    background-color: rgba(124, 58, 237, 0.1);
}

.dark #toc-container a.bg-eventix-primary\/10 {
    background-color: rgba(167, 139, 250, 0.1);
}

/* Prose content styling */
.prose {
    line-height: 1.75;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
    margin-top: 1em;
    margin-bottom: 0.75em;
    font-weight: 700;
    scroll-margin-top: 120px;
}

.prose h2 {
    font-size: 1.875rem;
    line-height: 2.25rem;
    padding-bottom: 0.5rem;
    position: relative;
}

.prose h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #7c3aed, #8b5cf6);
    border-radius: 3px;
}

.dark .prose h2::after {
    background: linear-gradient(to right, #8b5cf6, #a78bfa);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .content-scroll {
        max-height: none;
        overflow-y: visible;
    }
    
    .sticky-sidebar {
        height: auto;
        position: static;
    }
}

/* Ensure proper height calculations */
.min-h-0 {
    min-height: 0;
}

/* Smooth transitions */
.transition-all {
    transition: all 0.2s ease-in-out;
}

.code-block {
            position: relative;
        }
        .code-block pre {
            margin: 0;
            padding: 1rem;
            background: #1a202c;
            color: #e2e8f0;
            border-radius: 0.5rem;
            overflow-x: hidden;
        }
        .code-block .copy-btn {
            position: absolute;
            top: 0.5rem;
            right: 0.5rem;
            background: #2d3748;
            color: #cbd5e0;
            border: none;
            padding: 0.25rem 0.75rem;
            border-radius: 0.25rem;
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .code-block .copy-btn:hover {
            background: #4a5568;
            color: white;
        }
        .installation-step {
            counter-increment: step;
        }
        .installation-step::before {
            content: counter(step);
            position: absolute;
            left: -1.5rem;
            top: 0;
            width: 2rem;
            height: 2rem;
            background: linear-gradient(135deg, var(--eventix-primary), var(--eventix-secondary));
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }
         
        .journey-step {
            position: relative;
            margin-bottom: 2rem;
        }
        .journey-step:last-child {
            margin-bottom: 0;
        }
        .journey-step::before {
            content: "";
            position: absolute;
            left: 1.25rem;
            top: 0;
            bottom: -2rem;
            width: 2px;
            background: #cbd5e1;
        }
        .dark .journey-step::before {
            background: #475569;
        }
        .journey-step:last-child::before {
            display: none;
        }
        .journey-step-number {
            position: absolute;
            left: 0;
            top: 0;
            width: 2.5rem;
            height: 2.5rem;
            background: linear-gradient(135deg, var(--eventix-primary), var(--eventix-secondary));
            color: rgb(214, 23, 23);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 1.725rem;
            z-index: 2;
        }