/* Manta Platform Documentation Custom Styling */

/* Define Manta color palette as CSS variables */
:root {
  --manta-bg: #00033D;        /* Dark backgrounds */
  --manta-primary: #5700FF;   /* Primary actions, links */
  --manta-secondary: #977DFF; /* Secondary elements */
  --manta-highlight: #F53AEC; /* Important CTAs */
  --manta-info: #5FFEFD;      /* Success, info */
  --manta-warning: #F1C529;   /* Warnings */
}

/* Custom styling for inline HTML sections */
.highlight-box {
    background: var(--manta-bg);
    border: 1px solid var(--manta-secondary);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    color: white;
}

/* Enhanced code blocks with Manta styling */
.highlight pre {
    border-left: 4px solid var(--manta-primary);
    background: rgba(87, 0, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
}

/* Style for success/completion checkmarks */
.success-list {
    background: linear-gradient(135deg, rgba(95, 254, 253, 0.1), rgba(87, 0, 255, 0.1));
    border-left: 4px solid var(--manta-info);
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.success-list li::before {
    content: "✅ ";
    color: var(--manta-info);
    font-weight: bold;
}

.success-list li {
    list-style: none;
    margin: 8px 0;
}

/* Custom button styling for CTAs */
.manta-cta-button {
    background: linear-gradient(135deg, var(--manta-primary), var(--manta-secondary));
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin: 10px 5px;
    transition: all 0.3s ease;
}

.manta-cta-button:hover {
    background: linear-gradient(135deg, var(--manta-secondary), var(--manta-highlight));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(87, 0, 255, 0.3);
    color: white;
    text-decoration: none;
}

/* Warning and tip boxes with Manta colors */
.admonition.tip {
    background: linear-gradient(135deg, rgba(95, 254, 253, 0.1), rgba(87, 0, 255, 0.1));
    border-left: 4px solid var(--manta-info);
}

.admonition.warning {
    background: rgba(241, 197, 41, 0.1);
    border-left: 4px solid var(--manta-warning);
}

.admonition.important,
.admonition.danger {
    background: rgba(245, 58, 236, 0.1);
    border-left: 4px solid var(--manta-highlight);
}

/* Enhanced table styling */
table.docutils {
    border: 1px solid var(--manta-secondary);
    border-radius: 8px;
    overflow: hidden;
}

table.docutils th {
    background: linear-gradient(135deg, var(--manta-primary), var(--manta-secondary));
    color: white;
    padding: 12px 16px;
    font-weight: 600;
}

table.docutils td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(151, 125, 255, 0.2);
}

table.docutils tr:hover {
    background: rgba(87, 0, 255, 0.05);
}

/* Code blocks with syntax highlighting enhancement */
.highlight .c1,
.highlight .c {
    color: var(--manta-secondary);
    font-style: italic;
}

.highlight .k,
.highlight .kn {
    color: var(--manta-primary);
    font-weight: bold;
}

.highlight .s,
.highlight .s1,
.highlight .s2 {
    color: var(--manta-info);
}

.highlight .nf {
    color: var(--manta-highlight);
}

/* Navigation and sidebar enhancements */
.sidebar-tree .toctree-l1 > a {
    border-left: 3px solid transparent;
    transition: border-color 0.3s ease;
}

.sidebar-tree .toctree-l1 > a:hover,
.sidebar-tree .toctree-l1 > a.current {
    border-left-color: var(--manta-primary);
    background: rgba(87, 0, 255, 0.1);
}

/* Custom styling for grid layouts in HTML sections */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.docs-card {
    background: linear-gradient(135deg, rgba(87, 0, 255, 0.1), rgba(151, 125, 255, 0.1));
    border: 2px solid var(--manta-secondary);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.docs-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(87, 0, 255, 0.2);
    border-color: var(--manta-primary);
}

.docs-card h3,
.docs-card h4 {
    color: var(--manta-primary);
    margin-top: 0;
}

/* Progress indicators and status badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-ready {
    background: rgba(95, 254, 253, 0.2);
    color: var(--manta-info);
    border: 1px solid var(--manta-info);
}

.status-running {
    background: rgba(87, 0, 255, 0.2);
    color: var(--manta-primary);
    border: 1px solid var(--manta-primary);
}

.status-warning {
    background: rgba(241, 197, 41, 0.2);
    color: var(--manta-warning);
    border: 1px solid var(--manta-warning);
}

/* Enhanced blockquotes and callout boxes */
blockquote {
    background: linear-gradient(135deg, rgba(0, 3, 61, 0.1), rgba(87, 0, 255, 0.1));
    border-left: 4px solid var(--manta-primary);
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
    font-style: italic;
    position: relative;
}

blockquote::before {
    content: """;
    font-size: 60px;
    color: var(--manta-secondary);
    position: absolute;
    top: -10px;
    left: 10px;
    line-height: 1;
}

/* Responsive design for mobile devices */
@media (max-width: 768px) {
    .docs-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 20px 0;
    }
    
    .docs-card {
        padding: 15px;
    }
    
    .manta-cta-button {
        display: block;
        text-align: center;
        margin: 10px 0;
    }
}

/* Print styles for documentation */
@media print {
    .highlight-box,
    .docs-card {
        background: white !important;
        border: 2px solid #333 !important;
        color: black !important;
    }
    
    .manta-cta-button {
        background: white !important;
        color: black !important;
        border: 2px solid #333 !important;
    }
    
    /* Ensure good contrast for printed documentation */
    :root {
        --manta-primary: #000080;
        --manta-secondary: #4B0082;
        --manta-highlight: #8B008B;
        --manta-info: #006666;
        --manta-warning: #B8860B;
    }
}

/* Animation for loading states and transitions */
@keyframes manta-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(87, 0, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(87, 0, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(87, 0, 255, 0);
    }
}

.manta-pulse {
    animation: manta-pulse 2s infinite;
}

/* Custom scrollbar styling for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(87, 0, 255, 0.1);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--manta-primary);
}

/* Focus indicators for accessibility */
a:focus,
button:focus,
.manta-cta-button:focus {
    outline: 3px solid var(--manta-info);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --manta-primary: #0000FF;
        --manta-secondary: #6600CC;
        --manta-highlight: #FF0066;
        --manta-info: #00CCCC;
        --manta-warning: #FFCC00;
        --manta-bg: #000000;
    }
    
    .docs-card,
    .highlight-box {
        border-width: 3px;
    }
}

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