
/* Traxia Wiki — Final Public CSS (v4) */
:root {
    --primary: #21338E;
    --bg-light: #f4f6f9;
    --border: #ddd;
    --text: #202020;
}

/* Base */
body {
    font-family: 'Open Sans', sans-serif;
    background: #fff;
    color: var(--text);
    margin: 0;
    padding-top: 70px;
    overflow-x: hidden;
}

/* Header */
.wiki-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    height: 70px;
    display: flex;
    align-items: center;
    z-index: 1050;
}

.wiki-logo {
    height: 50px;
}

.navbar-toggler {
    border: none !important;
}

    .navbar-toggler:focus,
    .navbar-toggler:active {
        outline: none !important;
        box-shadow: none !important;
        border: none !important;
    }

/* Buttons */
.wiki-header .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

    .wiki-header .btn-primary:hover {
        background-color: #1b2975;
    }

/* Wrapper */
.wiki-wrapper {
    display: flex;
    flex: 1 0 auto;
    min-height: calc(100vh - 70px);
    align-items: stretch;
}

/* Sidebar */
.wiki-sidebar {
    background: var(--bg-light);
    border-right: 1px solid var(--border);
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: -webkit-sticky;
    position: sticky;
    top: 70px;
    align-self: flex-start;
    min-height: calc(100vh - 70px);
    box-sizing: border-box;
}

.wiki-sidebar-inner {
    flex-grow: 1;
    padding: 1rem;
    scroll-behavior: smooth;
}

/* Sidebar Navigation */
.nav-list, .nav-list ul {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.nav-item {
    display: block;
    padding: .45rem .75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #333;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

    .nav-item:hover {
        background-color: rgba(33, 51, 142, 0.08);
        text-decoration: none !important;
    }

    .nav-item.active {
        background-color: #f4f4f4;
        border-left: 3px solid #007BFF;
        color: #007BFF;
        font-weight: 600;
        padding-left: calc(.75rem - 3px);
    }

.nav-group {
    margin-bottom: .25rem;
}


.nav-level-app > .nav-toggle {
    font-weight: 700;
    color: var(--primary);
    padding-left: .5rem;
    font-size: 1rem;
}

.nav-level-section {
    margin-left: 0.75rem;
}

.nav-level-section > .nav-toggle {
    font-weight: 500;
    color: #333;
    opacity: 0.75;
    font-size: 1rem;
}

.nav-level-article {
    margin-left: 1rem;
}

.nav-section-link {
    opacity: 0.75;
}

.nav-article-link {
    font-weight: 400;
}

.nav-toggle {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    margin: .15rem 0;
    font-family: 'Barlow Semi Condensed', sans-serif;
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: 1rem;
    padding: .35rem .5rem;
    border-radius: 4px;
    transition: color .2s ease, background-color .2s ease;
}

    .nav-toggle:hover {
        background-color: rgba(33, 51, 142, 0.08);
        color: #1b2975;
    }

.nav-toggle.is-expanded {
    background-color: rgba(33, 51, 142, 0.06);
}

.toggle-icon {
    width: 0.55rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 0.55rem;
    line-height: 1;
    transition: transform .2s ease, color .2s ease;
}

.nav-toggle.is-expanded .toggle-icon {
    color: var(--primary);
}

.toggle-label {
    flex: 1;
}

.root-link {
    font-weight: 600;
    color: var(--primary);
    display: block;
    padding: .45rem .75rem;
    border-radius: 4px;
    text-decoration: none !important;
}

    .root-link:hover {
        background: #e8ebf5;
        color: var(--primary);
        text-decoration: none !important;
    }

/* Content */
.wiki-content {
    flex-grow: 1;
    padding: 2rem;
    background: #fff;
    position: relative;
    z-index: 1;
}

.content-wrapper {
    max-width: 960px;
    margin: 0 auto;
}

.page-title {
    border-bottom: 1px solid var(--border);
    padding-bottom: .5rem;
    margin-bottom: 1rem;
}

/* Footer */
.wiki-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    color: #666;
    font-size: 0.9rem;
}

/* Wiki Article */
.wiki-article {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #222;
}

.wiki-breadcrumb {
    margin-bottom: 1rem;
    color: #666;
}

    .wiki-breadcrumb a {
        color: var(--primary);
        text-decoration: none;
    }

        .wiki-breadcrumb a:hover {
            text-decoration: underline;
        }

.wiki-article h2 {
    border-top: 2px solid #e0e4f2;
    padding-top: 2rem;
    margin-top: 2rem;
    color: var(--primary);
}

.wiki-article h3 {
    color: #2a2a2a;
    font-weight: 600;
    margin-top: 1.5rem;
}

.wiki-article p {
    margin-bottom: 1rem;
}

.section-overview__description {
    font-size: 1rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.section-overview__articles {
    margin: 0;
    padding: 0;
}

.section-overview__item + .section-overview__item {
    border-top: 1px solid #e4e7f5;
}

.section-overview__link {
    display: block;
    padding: .75rem 0;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease;
}

    .section-overview__link:hover {
        color: #1b2975;
        text-decoration: underline;
    }

.search-form {
    margin-bottom: 2rem;
}

.search-summary {
    font-size: 0.9rem;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-result__title {
    font-size: 1.15rem;
    margin-bottom: .25rem;
}

    .search-result__title a {
        color: var(--primary);
        text-decoration: none;
    }

    .search-result__title a:hover {
        text-decoration: underline;
    }

.search-result__meta {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: .5rem;
}

.search-result__section {
    color: #555;
    text-decoration: none;
}

    .search-result__section:hover {
        text-decoration: underline;
    }

.search-result__snippet {
    margin-bottom: 0;
    color: #333;
}

.search-hint {
    font-size: 0.95rem;
}

.section-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-list__item {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid transparent;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

    .section-list__item:hover {
        background-color: #f7f8fc;
        border-color: rgba(33, 51, 142, 0.25);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
        text-decoration: none;
    }

.section-list__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.section-list__description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.45;
}

.section-list__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.4rem;
    font-size: 0.82rem;
    color: #999;
}

.section-list__stat {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.section-list__icon {
    font-size: 0.85rem;
}

.section-list__empty {
    margin-top: 1rem;
}

.application-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.application-list__item {
    display: block;
    padding: 0.9rem 1.1rem;
    border-radius: 8px;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid transparent;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

    .application-list__item:hover {
        background-color: #f7f8fc;
        border-color: rgba(33, 51, 142, 0.25);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
        text-decoration: none;
    }

.application-list__title {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 0.35rem;
}

.application-list__subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 0.4rem;
}

.application-list__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: #999;
}

.application-list__stat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'Open Sans', sans-serif;
}

.application-list__icon {
    font-size: 0.85rem;
}

.application-list__empty {
    margin-top: 1rem;
}

.page-header {
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-link-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1px solid rgba(33, 51, 142, 0.2);
    color: var(--primary);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
    font-family: 'Open Sans', sans-serif;
}

    .share-link-button:hover {
        background-color: rgba(33, 51, 142, 0.08);
        border-color: rgba(33, 51, 142, 0.4);
    }

.share-link-button__icon {
    font-size: 0.9rem;
}

.share-link-button__label {
    font-size: 0.85rem;
}

.share-link-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 1050;
}

.share-link-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.share-link-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 1060;
}

.share-link-modal.is-visible,
.share-link-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.share-link-modal__content {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    width: min(90vw, 420px);
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.2);
}

.share-link-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.share-link-modal__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #222;
}

.share-link-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 0.25rem;
    line-height: 1;
    transition: color .2s ease;
}

    .share-link-close:hover {
        color: var(--primary);
    }

.share-link-modal__body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.share-link-field {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

#share-link-input {
    flex: 1;
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #d0d4e4;
    font-size: 0.95rem;
    font-family: 'Open Sans', sans-serif;
}

.share-link-copy {
    border: none;
    background: var(--primary);
    color: #fff;
    padding: 0 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color .2s ease;
}

    .share-link-copy:hover {
        background: #1b2975;
    }

.share-link-message {
    font-size: 0.85rem;
    color: #1b5e20;
    opacity: 0;
    transition: opacity .2s ease;
}

.share-link-message.is-visible {
    opacity: 1;
}

.share-link-modal__footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.share-link-close--footer {
    background: none;
    border: none;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    transition: background-color .2s ease, color .2s ease;
}

    .share-link-close--footer:hover {
        background-color: rgba(33, 51, 142, 0.08);
        color: var(--primary);
    }

/* PRINT */

.print-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1px solid rgba(33, 51, 142, 0.2);
    color: var(--primary);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
    font-family: 'Open Sans', sans-serif;
}

    .print-button:hover {
        background-color: rgba(33, 51, 142, 0.08);
        border-color: rgba(33, 51, 142, 0.4);
    }

.print-button__icon {
    font-size: 0.9rem;
}

.print-button__label {
    font-size: 0.85rem;
}

.print-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 1050;
}

    .print-overlay.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

.print-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 1060;
}

    .print-modal.is-visible,
    .print-overlay.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

.print-modal__content {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    width: min(90vw, 420px);
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.2);
}

.print-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.print-modal__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #222;
}

.print-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 0.25rem;
    line-height: 1;
    transition: color .2s ease;
}

    .print-close:hover {
        color: var(--primary);
    }

.print-modal__body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.print-field {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

#print-input {
    flex: 1;
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #d0d4e4;
    font-size: 0.95rem;
    font-family: 'Open Sans', sans-serif;
}

.print-copy {
    border: none;
    background: var(--primary);
    color: #fff;
    padding: 0 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color .2s ease;
}

    .print-copy:hover {
        background: #1b2975;
    }

.print-message {
    font-size: 0.85rem;
    color: #1b5e20;
    opacity: 0;
    transition: opacity .2s ease;
}

    .print-message.is-visible {
        opacity: 1;
    }

.print-modal__footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.print-close--footer {
    background: none;
    border: none;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    transition: background-color .2s ease, color .2s ease;
}

    .print-close--footer:hover {
        background-color: rgba(33, 51, 142, 0.08);
        color: var(--primary);
    }
/* PRINT */

.scroll-top-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(33, 51, 142, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
    z-index: 1040;
}

.scroll-top-button.is-visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-button:hover {
    transform: translateY(-2px);
    background: #1b2975;
}

@media (max-width: 576px) {
    .scroll-top-button {
        bottom: 1.25rem;
        right: 1.25rem;
    }

    .page-header {
        align-items: flex-start;
    }
}

.wiki-article__row {
    margin-bottom: 2rem;
}

    .wiki-article__row .wiki-article__body {
        margin-top: 1rem;
    }

@media (min-width: 992px) {
    .wiki-article__row.image-left-text-right .wiki-article__body,
    .wiki-article__row.image-right-text-left .wiki-article__body {
        margin-top: 20px;
    }
}

.wiki-article ul, .wiki-article ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.wiki-article li {
    margin-bottom: .4rem;
}

.wiki-note {
    background: #f5f7fb;
    border-left: 4px solid var(--primary);
    padding: .75rem 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-size: 0.9rem;
}

.wiki-figure {
    text-align: center;
    margin: 1.5rem 0;
}

    .wiki-figure img {
        max-width: 100%;
        border: 1px solid #ddd;
        border-radius: 4px;
    }

    .wiki-figure figcaption {
        font-size: 0.85rem;
        color: #666;
        margin-top: .5rem;
    }

.wiki-callout {
    border: 1px solid #e0e4f2;
    border-left: 4px solid var(--primary);
    background: #fafbff;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

    .wiki-callout h4 {
        margin-top: 0;
        color: var(--primary);
    }

/* Mobile off-canvas */
@media (max-width: 991px) {
    .wiki-sidebar {
        position: fixed;
        top: 70px;
        left: -100%;
        bottom: 0;
        width: 80%;
        height: calc(100% - 70px);
        transition: transform 0.3s ease, left 0.3s ease;
        z-index: 1040;
    }

        .wiki-sidebar.open {
            left: 0;
        }

    .wiki-content {
        padding: 1rem;
    }
}

.goog-te-gadget .goog-te-combo {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 0.85rem;
}
