/* ==========================================================================
   MICROSOFT .NET STYLE SYSTEM (RESTORED DEFAULT LAYOUT)
   ========================================================================== */
:root {
  --net-purple: #512bd4;
  --net-link-blue: #0078d4;
  --net-black: #171717;
  --nav-height: 60px;
}

body {
  font-family: 'Segoe UI', -apple-system, sans-serif;
  /* DocFX default layout requires padding for the fixed navbar */
  padding-top: var(--nav-height);
  background-color: #ffffff;
  color: var(--net-black);
  margin: 0;
  overflow-x: hidden;
}

a { text-decoration: none; color: var(--net-link-blue); }
a:hover { text-decoration: underline; }

/* ==========================================================================
   1. NAVBAR STYLING (Kept Custom)
   ========================================================================== */
.navbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e1dfdd;
  height: var(--nav-height);
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

/* LOGO FIX */
.navbar-brand {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin-right: 20px !important;
}
.navbar-brand img, img#logo {
    height: 40px !important;
    width: auto !important;
    max-width: 250px !important;
    display: block !important;
}

/* LINKS */
.navbar-nav > li > a {
    color: #171717 !important;
    font-weight: 600;
    font-size: 14px;
    padding: 19px 15px; 
    border-bottom: 3px solid transparent;
    background-color: transparent !important;
}
.navbar-nav > li > a:hover,
.navbar-nav > li.active > a {
    color: var(--net-link-blue) !important;
    background-color: transparent !important;
    border-bottom-color: var(--net-link-blue) !important;
}

/* ==========================================================================
   2. HOMEPAGE HERO (Smart Breakout)
   ========================================================================== */
.net-hero {
    background-color: var(--net-purple);
    color: white;
    padding: 80px 0 100px;
    text-align: left;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: -60px; 
}
.net-container { max-width: 1260px; margin: 0 auto; padding: 0 24px; }
.net-hero h1 { font-size: 42px; margin: 0 0 16px 0; color: white !important; }
.net-hero p { font-size: 18px; max-width: 800px; color: #e2e2e2; margin: 0; }

/* HOMEPAGE GRID */
.net-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: -60px;
    z-index: 5;
    padding-bottom: 60px;
    position: relative;
}
.net-card {
    background: #fff;
    border: 1px solid #e1dfdd;
    border-radius: 4px;
    padding: 24px;
    display: flex;
    text-decoration: none !important;
    box-shadow: 0 1.6px 3.6px rgba(0,0,0,0.1);
    color: inherit !important;
}
.net-card:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,0.15); }
.net-card-icon { font-size: 32px; margin-right: 16px; }
.net-card-label { font-size: 11px; font-weight: 700; color: #666; display: block; margin-bottom: 4px; text-transform: uppercase; }
.net-card-title { font-size: 18px; font-weight: 600; color: var(--net-link-blue); margin: 0; }

/* ==========================================================================
   3. SIDEBAR RESTORATION (Standard DocFX)
   ========================================================================== */
/* We style the sidebar visually, but let DocFX handle the positioning */
.sidetoc {
    background-color: #f3f2f1; /* Light grey background like MS Docs */
    border-right: 1px solid #e1dfdd;
    padding: 15px;
    font-size: 14px;
}

/* Ensure the Search Bar is visible on top of the grey background */
.form-group #search-query {
    background: #ffffff;
    border: 1px solid #8a8886;
    color: #000;
}

/* Adjust the right-side "In this article" */
.sideaffix {
    padding-left: 20px;
    font-size: 13px;
}

/* ==========================================================================
   4. KNOWLEDGE BASE STYLES
   ========================================================================== */
.kb-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.kb-section {
    background: #ffffff;
    border: 1px solid #e1dfdd;
    border-radius: 4px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.kb-main-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    border-bottom: 1px solid #f3f2f1;
    padding-bottom: 15px;
}

.kb-main-icon { font-size: 32px; margin-right: 15px; }

.kb-main-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #171717;
    margin: 0 0 5px 0;
    border: none;
}
.kb-main-header p { font-size: 14px; color: #605e5c; margin: 0; }

.kb-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.kb-folder {
    font-size: 16px;
    font-weight: 600;
    color: #0078d4;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}
.kb-folder .icon { margin-right: 8px; font-size: 18px; opacity: 0.7; }

.kb-list { list-style: none; padding: 0; margin: 0; }
.kb-list li { margin-bottom: 10px; padding-left: 5px; }
.kb-list a { color: #0078d4; text-decoration: none; font-size: 14px; display: block; }
.kb-list a:hover { text-decoration: underline; color: #004578; }

/* View All Link */
.kb-view-all {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: #605e5c;
    text-decoration: none;
    cursor: pointer;
}
.kb-view-all:hover { color: #0078d4; text-decoration: underline; }

@media (max-width: 768px) {
    .kb-grid-2 { grid-template-columns: 1fr; gap: 30px; }
}

/* ==========================================================================
   5. BREADCRUMBS (Dark Text Fix)
   ========================================================================== */
.subnav {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e6e6e6 !important;
    color: #000000 !important;
    margin-bottom: 0 !important;
    min-height: 48px;
    position: relative;
    z-index: 10;
}

.subnav a, .breadcrumb > li > a {
    color: #333333 !important;
    font-weight: 400 !important;
    text-decoration: none !important;
}

.breadcrumb > li + li:before {
    color: #333333 !important;
    content: ">" !important;
    padding: 0 8px;
}

.breadcrumb > li.active {
    color: #666666 !important;
    font-weight: 600 !important;
}

.subnav a:hover, .breadcrumb > li > a:hover {
    color: #0078d4 !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   6. COOKIE POPUP
   ========================================================================== */
.cookie-modal {
    display: none;
    position: fixed; 
    z-index: 99999; 
    left: 0; top: 0;
    width: 100%; height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
}

.cookie-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    font-family: 'Segoe UI', sans-serif;
}

.cookie-close {
    color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer;
}
.cookie-close:hover { color: black; }
.cookie-content h3 { margin-top: 0; color: #171717; font-weight: 600; }
.cookie-content p { font-size: 14px; line-height: 1.6; color: #333; }

.cookie-btn {
    background-color: #0078d4;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
}
.cookie-btn:hover { background-color: #005a9e; }