/**
 * Docs system chrome — the parts the CPT templates add on top of the reused
 * documentation.css: the hub grid, plugin doc home grid, breadcrumb, sidebar article
 * list, and prev/next nav. Matches the blue documentation theme.
 *
 * @package Devtonic Studios
 */

/* ==================== BREADCRUMB ==================== */

.docs-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.55);
}

.docs-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.docs-breadcrumb a:hover {
    color: #00A3FF;
}

.docs-breadcrumb .sep {
    opacity: 0.5;
}

.docs-breadcrumb .current {
    color: #ffffff;
    font-weight: 600;
}

/* ==================== HERO ACTIONS ==================== */

.docs-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-top: 34px;
}

.docs-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.docs-hero-btn-primary {
    background: linear-gradient(135deg, #0066FF, #0052CC);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.35);
}

.docs-hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 102, 255, 0.5);
}

.docs-hero-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.docs-hero-btn-ghost:hover {
    border-color: #00A3FF;
    color: #00A3FF;
}

/* ==================== SIDEBAR: ARTICLE LIST ==================== */

.docs-sidebar-title + .docs-articles-list {
    margin-top: 0;
}

.docs-articles-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
}

.docs-articles-list li {
    margin-bottom: 6px;
}

.docs-articles-link {
    display: block;
    padding: 12px 16px;
    color: #444;
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.docs-articles-link:hover {
    background: rgba(0, 102, 255, 0.08);
    color: #0066FF;
}

.docs-articles-link.active {
    background: linear-gradient(135deg, #0066FF, #0052CC);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 102, 255, 0.28);
}

.docs-sidebar-divider {
    height: 1px;
    background: rgba(0, 102, 255, 0.12);
    margin: 0 0 22px;
}

/* ==================== PREV / NEXT ==================== */

.docs-article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid rgba(0, 102, 255, 0.12);
}

.docs-article-nav-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px 26px;
    border: 2px solid rgba(0, 102, 255, 0.12);
    border-radius: 16px;
    text-decoration: none;
    background: #ffffff;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.docs-article-nav-link:hover {
    border-color: #0066FF;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 102, 255, 0.12);
}

.docs-article-nav-link.is-next {
    text-align: right;
    grid-column: 2;
}

.docs-article-nav-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #0066FF;
}

.docs-article-nav-title {
    font-size: 17px;
    font-weight: 800;
    color: #0a0a0a;
    line-height: 1.35;
}

/* ==================== HUB GRID (archive) & PLUGIN DOC HOME (taxonomy) ==================== */

.docs-search {
    max-width: 560px;
    margin: 34px auto 0;
    position: relative;
}

.docs-search input[type="search"] {
    width: 100%;
    padding: 16px 22px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.docs-search input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.docs-search input[type="search"]:focus {
    border-color: #00A3FF;
    background: rgba(255, 255, 255, 0.12);
}

.docs-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.docs-plugin-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 2px solid rgba(0, 102, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.docs-plugin-card:hover {
    transform: translateY(-6px);
    border-color: #0066FF;
    box-shadow: 0 16px 44px rgba(0, 102, 255, 0.16);
}

/* Real plugin banner across the top of the card. */
.docs-plugin-card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #eef3ff, #f8fbff);
    overflow: hidden;
}

.docs-plugin-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.docs-plugin-card:hover .docs-plugin-card-thumb img {
    transform: scale(1.04);
}

.docs-plugin-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 26px 30px 30px;
}

/* Icon fallback for a plugin with no banner set. */
.docs-plugin-card-icon {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.12), rgba(0, 163, 255, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 30px 0;
}

.docs-plugin-card-icon svg {
    width: 30px;
    height: 30px;
}

.docs-plugin-card h3 {
    font-size: 22px;
    font-weight: 800;
    color: #0a0a0a;
    margin: 0 0 10px;
}

.docs-plugin-card p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 20px;
    flex-grow: 1;
}

.docs-plugin-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: #0066FF;
}

.docs-plugin-card-count {
    color: #9aa5b1;
    font-weight: 600;
}

/* Plugin doc home: article cards */
.docs-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 26px;
    max-width: 1100px;
    margin: 0 auto;
}

.docs-article-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 2px solid rgba(0, 102, 255, 0.1);
    border-radius: 18px;
    padding: 30px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.docs-article-card:hover {
    transform: translateY(-5px);
    border-color: #0066FF;
    box-shadow: 0 14px 36px rgba(0, 102, 255, 0.14);
}

.docs-article-card-num {
    font-size: 13px;
    font-weight: 700;
    color: #0066FF;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.docs-article-card h3 {
    font-size: 20px;
    font-weight: 800;
    color: #0a0a0a;
    margin: 0 0 10px;
}

.docs-article-card p {
    font-size: 14.5px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.docs-empty {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    color: #666;
    font-size: 17px;
    line-height: 1.7;
}

/* ==================== SHORTER HERO FOR INNER DOCS PAGES ==================== */

.docs-hero.docs-hero--compact {
    padding: 130px 20px 54px;
}

@media (max-width: 768px) {
    .docs-hero.docs-hero--compact {
        padding: 110px 20px 40px;
    }
}

/* ==================== LEFT MENU TREE (articles grouped into folders) ==================== */

.docs-tree-group {
    margin-bottom: 24px;
}

.docs-tree-group:last-child {
    margin-bottom: 0;
}

.docs-tree-heading {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #9aa5b1;
    margin: 0 0 8px;
    padding: 0 14px;
}

.docs-tree-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.docs-tree-list li {
    margin-bottom: 2px;
}

.docs-tree-link {
    display: block;
    padding: 9px 14px;
    border-radius: 10px;
    color: #3a4553;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;
    transition: all 0.25s ease;
}

.docs-tree-link:hover {
    background: rgba(0, 102, 255, 0.08);
    color: #0066FF;
}

.docs-tree-link.active {
    background: linear-gradient(135deg, #0066FF, #0052CC);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 102, 255, 0.28);
}

/* ==================== PLUGIN DOC HOME (folders + article cards in main) ==================== */

.docs-home-intro {
    font-size: 17px;
    line-height: 1.7;
    color: #555;
    margin: 0 0 40px;
    max-width: 760px;
}

.docs-home-group {
    margin-bottom: 48px;
}

.docs-home-group-title {
    font-size: 22px;
    font-weight: 800;
    color: #0a0a0a;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0, 102, 255, 0.15);
}

/* ==================== INLINE BOLD FIX ====================
   The legacy docs CSS makes every <strong> inside a callout box a block-level
   heading (.docs-tip-content strong, .docs-info-box strong, etc.). That is fine for a
   box's title, but when a sentence uses <strong> for emphasis or a cross-reference the
   bold phrase becomes a heading and its trailing period orphans onto its own line.
   A <strong> that sits INSIDE a paragraph is always inline text, never a heading. */

.docs-content p strong {
    display: inline;
    font-size: inherit;
    color: inherit;
    margin: 0;
}

/* ==================== MOBILE SIDEBAR TOGGLE ==================== */
/* documentation.js slides .docs-sidebar off-screen at <=1024px and toggles
   .mobile-active; this button is how the reader opens it. */

.docs-mobile-menu-toggle {
    display: none;
}

@media (max-width: 1024px) {
    .docs-mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        position: fixed;
        bottom: 100px;
        left: 20px;
        z-index: 1001;
        padding: 13px 22px;
        border: none;
        border-radius: 50px;
        background: linear-gradient(135deg, #0066FF, #0052CC);
        color: #ffffff;
        font-weight: 700;
        font-size: 14px;
        cursor: pointer;
        box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
    }
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .docs-article-nav {
        grid-template-columns: 1fr;
    }

    .docs-article-nav-link.is-next {
        grid-column: 1;
        text-align: left;
    }
}
