@import "prism-theme.css";
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300..900&family=DM+Sans:wght@300..900&display=swap');

/* Custom CSS for Mermaid diagrams and code blocks */
.mermaid {
    background: #1d1f21;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    font-family: var(--bff);
    max-width: 100%;
    overflow-x: auto;
}

.mermaid svg {
    max-width: 100%;
    height: auto !important;
}

/* Special styling for mermaid-labeled code blocks */
pre.language-mermaid::before {
    background: #ff8a36;
}


/* Set responsive font size for code blocks */
pre[class*="language-"] {
    font-size: 90% !important;    
}

pre[class*="language-"]::before {
    font-size: 80% !important;
}

code[class*="language-"] {
    font-size: 90% !important;
}



pre[class*="language-"] {
    border-radius: 8px;
    margin: 30px 0;
    position: relative;
    white-space: pre;
    word-break: break-word;
    overflow: visible;
    max-width: 100%;
    padding: 1.5em 1em 1em;    
}

/* Improve toolbar appearance */
div.code-toolbar>.toolbar {
    top: 0.5em;
    right: 0.5em;
}

div.code-toolbar>.toolbar>.toolbar-item>button {
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8em;
    transition: all 0.2s ease;
}

div.code-toolbar>.toolbar>.toolbar-item>button:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* Improve line highlighting */
.line-highlight {
    background: rgba(113, 66, 234, 0.15);
    margin-top: 0.5em;
}

/* Improved language label on code blocks */
pre[class*="language-"]::before {
    content: attr(data-language);
    position: absolute;
    top: 0;
    left: 0;
    padding: 0 7px;
    font-size: 0.7em;
    text-transform: uppercase;
    background: #7142EA;
    color: #fff;
    border-radius: 0 0 4px 0;
    z-index: 10;
}

/* Ensure code blocks don't overflow on mobile */
@media (max-width: 767px) {
    pre[class*="language-"] {
        line-height: 1.4;
        overflow: auto;
    }
}

/* Custom scrollbar styles that are more minimal when needed */
pre[class*="language-"]::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

pre[class*="language-"]::-webkit-scrollbar-track {
    background: transparent;
}

pre[class*="language-"]::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

pre[class*="language-"]::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   CUSTOM THEME STYLES (migrated from code injection)
   ============================================================ */

@media(max-width: 480px){.container{padding: 0 20px;}}

body{
    font-size: 18px;
    letter-spacing: 0;
    line-height: 1.44;
    font-weight: 400;
}
p{
    letter-spacing: 0;
    margin-bottom: 20px;
}
h1, h2, h3, h4, h5, h6{
    line-height: 1.22;
    letter-spacing: 0;
    font-weight: 800;
}
h1>a, h2>a, h3>a, h4>a, h5>a, h6>a{
    text-decoration: none;
    color: var(--hc);
}
h1>a:hover, h2>a:hover, h3>a:hover, h4>a:hover, h5>a:hover, h6>a:hover{
    color: var(--ghost-accent-color);
}

/* Ghost image cards */
figure.kg-card.kg-image-card {
    margin: 30px 0;
    position: relative;
}

figure.kg-card.kg-image-card img {
    border-radius: 13px;
    position: relative;
    width: 100%;
    object-fit: cover;
    display: block;
    box-shadow: 0px 0px 50px rgba(0,0,0,0.6);
    transition: all 0.3s ease;
}

figure.kg-card.kg-image-card figcaption {
    text-align: center;
    padding: 1em 0;
    font-size: 0.9em;
    color: rgba(255,255,255,0.7);
    font-style: italic;
}

figure.kg-card.kg-image-card:hover img {
    transform: translateY(-5px);
    box-shadow: 0px 10px 50px rgba(0,0,0,0.8);
}

.kg-gallery-image img {
    border-radius: 13px;
    box-shadow: 0px 0px 30px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.kg-gallery-image:hover img {
    transform: translateY(-3px);
    box-shadow: 0px 10px 30px rgba(0,0,0,0.7);
}

.kg-video-card {
    margin: 0 auto !important;
    max-width: 450px !important;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    margin: 16px 0;
}

thead {
    background: linear-gradient(135deg, #2d2d2d 0%, #1f1f1f 100%);
    border-bottom: 2px solid #333;
}

thead th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-right: 1px solid #333;
    position: relative;
}

thead th:last-child {
    border-right: none;
}

thead th::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4a9eff 0%, #00d4ff 50%, #4a9eff 100%);
}

tbody {
    background-color: #1a1a1a;
}

tbody tr {
    border-bottom: 1px solid #2d2d2d;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

tbody tr:hover {
    background-color: #252525;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

tbody tr:last-child {
    border-bottom: none;
}

tbody td {
    padding: 16px 20px;
    color: #e0e0e0;
    border-right: 1px solid #2d2d2d;
    vertical-align: middle;
}

tbody td:last-child {
    border-right: none;
}

tbody tr td:first-child {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.status-warning {
    color: #ffa726 !important;
    background: linear-gradient(90deg, rgba(255, 167, 38, 0.1) 0%, transparent 100%) !important;
}

.status-degraded {
    color: #ff7043 !important;
    background: linear-gradient(90deg, rgba(255, 112, 67, 0.1) 0%, transparent 100%) !important;
}

.status-critical {
    color: #ef5350 !important;
    background: linear-gradient(90deg, rgba(239, 83, 80, 0.1) 0%, transparent 100%) !important;
}

@media (max-width: 768px) {
    table {
        font-size: 12px;
    }
    thead th,
    tbody td {
        padding: 12px 16px;
    }
    thead th {
        font-size: 11px;
    }
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    background-color: #1a1a1a;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.table-container table {
    margin: 0;
    box-shadow: none;
    border-radius: 0;
}

.table-loading {
    opacity: 0.6;
    pointer-events: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.table-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.font-mono { font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace; }

.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.sortable::after {
    content: '↕';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 12px;
}

.sortable.asc::after {
    content: '↑';
    opacity: 1;
    color: #4a9eff;
}

.sortable.desc::after {
    content: '↓';
    opacity: 1;
    color: #4a9eff;
}

/* ─── Native Ghost Search button ─── */
.neoh_fn_search {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--bc);
    display: -webkit-flex;
    display: flex;
    -ms-align-items: center;
    align-items: center;
    transition: color .3s ease;
    line-height: 0;
}

.neoh_fn_search:hover {
    color: var(--hc);
}
