/*
Theme Name: WIKI Theme (Linux Desktop)
Theme URI: https://emsites.com/
Author: EMSITES.COM
Description: A Linux Desktop / Windowed Terminal theme.
Version: 3.2.0
*/

:root {
    --bg-desktop: #0b101b;
    --bg-terminal: #050510;
    --text-desc: #D3D7CF;
    /* --text-htext: #C4A000; */
    --text-htext: #00ff2b;
    --line-color: rgba(255, 255, 255, 0.2);
    --font-pixel: 'VT323', monospace;
    --font-mono: 'Courier New', Courier, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-desktop);
    color: var(--text-desc);
    font-family: var(--font-mono);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* -------------------------------------
   SIDEBARS
   ------------------------------------- */
.social-sidebar,
.right-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.social-sidebar {
    left: 0;
    border-right: 1px solid var(--line-color);
    gap: 30px;
}

.right-sidebar {
    right: 0;
    border-left: 1px solid var(--line-color);
}

.social-icon svg {
    width: 24px;
    height: 24px;
    fill: #cbd5e1;
    transition: fill 0.3s;
}

.social-icon:hover svg {
    fill: #fff;
}

.email-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: #cbd5e1;
    font-size: 14px;
    letter-spacing: 2px;
}

/* -------------------------------------
   TOP NAVIGATION
   ------------------------------------- */
.top-nav-bar {
    position: fixed;
    top: 0;
    left: 0px;
    right: 0px;
    height: 60px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 20px;
    z-index: 100;
}

/* Dynamic WP Menu Styles */
.main-navigation,
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
    font-size: 14px;
    font-weight: bold;
    margin: 0;
    padding: 0;
}

/* Counter Reset on the container */
.main-navigation {
    counter-reset: menu-counter;
}

.main-navigation li {
    counter-increment: menu-counter;
}

.main-navigation li a {
    color: #cbd5e1;
}

.main-navigation li a:hover {
    color: #fff;
    text-shadow: 0 0 5px #fff;
}

/* The [1] Numbering */
.main-navigation li a::before {
    content: "[" counter(menu-counter) "] ";
    color: #34E2E2;
    margin-right: 5px;
}

/* -------------------------------------
   TERMINAL WINDOW
   ------------------------------------- */
.terminal-window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100vw - 200px);
    height: 80vh;
    max-width: 1400px;
    background-color: var(--bg-terminal);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.window-header {
    height: 45px;
    background: linear-gradient(89deg, #0b101b 0%, #34e2e221 100%);
    display: flex;
    align-items: flex-end;
    padding: 0 15px;
    border-radius: 12px 12px 0 0;
    overflow-x: auto;
}

/* Tabs */
.tab {
    background: #111;
    color: #aaa;
    padding: 8px 15px;
    border-radius: 6px 6px 0 0;
    font-size: 13px;
    display: flex;
    align-items: center;
    font-family: var(--font-mono);
    cursor: pointer;
    margin-right: 5px;
    min-width: 100px;
    justify-content: space-between;
    transition: background 0.2s;
}

.tab:hover {
    background: #222;
}

.tab.active {
    background: #1e1e2e;
    color: #fff;
    border-bottom: 2px solid var(--text-htext);
}

.tab-text {
    margin-right: 10px;
    font-weight: bold;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-close {
    font-size: 14px;
    opacity: 0.7;
}

.tab-close:hover {
    color: #f87171;
    opacity: 1;
}

.tab-add {
    color: #aaa;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.tab-add:hover {
    color: #fff;
}

/* Content Views */
.window-content {
    flex: 1;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.terminal-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 50px;
    display: none;
    /* Hidden by default */
}

.terminal-view.active {
    display: block;
}

/* Scrollbar */
.terminal-view::-webkit-scrollbar {
    width: 6px;
}

.terminal-view::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

/* Typography */
.imp-title {
    font-family: var(--font-pixel);
    font-size: 5rem;
    color: var(--text-htext);
    text-shadow: 4px 4px 0px #9d174d;
    line-height: 1;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

p.sub-title.f {
    margin: 10px 0px;
}
p.sub-title.s {
    font-size: 14px;
    font-weight: 400;
}

.sub-title {
    color: var(--text-desc);
    font-size: 1.3rem;
    margin-bottom: 40px;
    font-weight: bold;
    letter-spacing: 1px;
}

.cmd-item {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.cmd-key,
.cmd-alt {
    color: #eab308;
    font-weight: bold;
}

.ems-prompt-line {
    margin-top: 50px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.p-user {
    color: var(--text-desc);
    font-weight: bold;
}

.p-host {
    color: #a855f7;
}

.p-tilde {
    color: #34E2E2;
}

.p-sign {
    color: #fff;
    margin-right: 12px;
}

.text-display {
    color: #fff;
}

.blink {
    display: inline-block;
    width: 10px;
    height: 20px;
    background: #fff;
    animation: blink 1s step-end infinite;
}

/* Live Search Results */
#live-search-results {
    position: relative;
    z-index: 2000;
    /* Ensure it sits above other terminal elements */
    width: 100%;
}

.search-result-item {
    display: inline-block;
    padding: 5px 10px;
    margin-bottom: 2px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    /* Enforce hand cursor */
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    pointer-events: auto;
    /* Ensure no parents invoke none */
}

.search-result-item:hover {
    background: var(--text-htext);
    color: #000;
}

/* Footer Credit */
.footer-credit {
    position: fixed;
    bottom: 10px;
    width: 100%;
    text-align: center;
    color: #64748b;
    font-size: 12px;
    z-index: 50;
    /* pointer-events: none; */
}

/* Mobile Popup Fallback */
.ems-popup-wrapper {
    position: fixed;
    inset: 0;
    background: var(--bg-terminal);
    z-index: 9999;
    padding: 20px;
    display: none;
    flex-direction: column;
}

.ems-popup-wrapper.ems-show {
    display: flex;
}

.ems-popup-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dotted var(--text-desc);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

@media(max-width: 1024px) {
    .terminal-window {
    width: calc(100vw - 15px);
    }
    .terminal-view {
    padding: 15px;
    }

    div#live-search-results div {
        display: flex;
        align-items: center;
    }
}