/* ========================================
   GeoDx Documentation - Custom Enhancements
   Additional styling improvements
   ======================================== */

/* Smooth scrolling for all anchor links */
html {
    scroll-behavior: smooth;
}

/* Enhanced focus states for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* Better text selection */
::selection {
    background-color: rgba(168, 85, 247, 0.3);
    color: var(--text-primary);
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 6px;
    border: 3px solid var(--bg-secondary);
}

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

/* Enhanced documentation body tables */
.docs-body table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.docs-body thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.docs-body tbody tr {
    transition: background-color 0.2s ease;
}

.docs-body tbody tr:nth-child(even) {
    background: var(--bg-secondary);
}

.docs-body tbody tr:hover {
    background: var(--bg-tertiary);
}

/* Enhanced blockquote styling */
.docs-body blockquote {
    position: relative;
    padding-left: 1.5rem;
    margin-left: 0;
    font-size: 1.0625rem;
}

.docs-body blockquote::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -0.5rem;
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: Georgia, serif;
}

/* Enhanced list styling */
.docs-body ul,
.docs-body ol {
    line-height: 1.8;
}

.docs-body li::marker {
    color: #ffffff;
    font-weight: 600;
}

/* Light theme: use dark markers for contrast */
html.light-theme .docs-body li::marker {
    color: #1a1a1a;
    font-weight: 600;
}

.docs-body ul ul,
.docs-body ol ul,
.docs-body ul ol,
.docs-body ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Enhanced badge/pill styling for inline code */
.docs-body p code,
.docs-body li code,
.docs-body td code {
    font-weight: 500;
}

/* Enhanced documentation cards grid */
.docs-cards {
    gap: 2rem;
}

.docs-card {
    border: 2px solid var(--border-color);
}

.docs-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.docs-card:hover::before {
    opacity: 1;
}

/* Keyboard shortcut styling */
kbd {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.875em;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

/* Horizontal rule enhancement */
.docs-body hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 3rem 0;
}

/* Enhanced search input */
#homeSearch input,
#docsSearch input {
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

#homeSearch input:focus,
#docsSearch input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

/* Gradient text utilities */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Fade in animation for content */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Print styles */
@media print {
    .docs-sidebar,
    .docs-toc,
    .docs-page-nav,
    .docs-sidebar-toggle {
        display: none !important;
    }
    
    .docs-main {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .docs-body a {
        color: var(--text-primary) !important;
        text-decoration: underline !important;
    }
}

/* Image sizing and styling */
.docs-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
    display: block;
}

/* Dark mode specific enhancements */
@media (prefers-color-scheme: dark) {
    .docs-body img {
        opacity: 0.9;
    }
    
    .docs-body img:hover {
        opacity: 1;
    }
}

/* Light theme image styling */
html.light-theme .docs-body img {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

/* Improved mobile navigation */
@media (max-width: 991px) {
    .docs-sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    
    .docs-sidebar-overlay.active {
        opacity: 1;
        pointer-events: all;
    }
}

/* Enhanced contrast for better readability */
.high-contrast {
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
}

/* Feature highlights */
.feature-highlight {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 0.375rem;
    font-size: 0.875em;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Version badge */
.version-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Status indicators */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-dot.success {
    background: #10b981;
}

.status-dot.warning {
    background: #f59e0b;
}

.status-dot.error {
    background: #ef4444;
}

.status-dot.info {
    background: #3b82f6;
}
