/* override table width restrictions to make font size smaller and avoid the scrollbar */

.wy-table-responsive table.small-table,
.wy-table-responsive table.small-table th,
.wy-table-responsive table.small-table td,
.wy-table-responsive table.small-table th p,
.wy-table-responsive table.small-table td p {
    font-size: small;
}

/* smaller-table */
.wy-table-responsive table.smaller-table,
.wy-table-responsive table.smaller-table th,
.wy-table-responsive table.smaller-table td,
.wy-table-responsive table.smaller-table th p,
.wy-table-responsive table.smaller-table td p {
    font-size: 14px;
}

/* smaller-table - size for code blocks ``x``*/
.wy-table-responsive table.smaller-table code,
.wy-table-responsive table.smaller-table span.pre {
    font-size: 10px;
}

/* Smooth scroll behavior */
.wy-side-scroll {
    scroll-behavior: smooth;
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* justify all the documentation content */

.section,
.rst-content .section,
.wy-nav-content .section,
.document .documentwrapper .bodywrapper .body .section,
.rst-content .body .section,
.rst-content p,
.rst-content div.body p {
     text-align: justify !important;
}

/* Additional justification for specific content elements */
.rst-content .section > p,
.rst-content .section > div > p,
.rst-content .toctree-wrapper p {
     text-align: justify !important;
}

/* Larger space between paragraph and following list */
.rst-content p + ul,
.rst-content p + ol {
    margin-top: 20px;
}

/* Space for lists inside blockquotes (when text ends with colon) */
.rst-content p + blockquote ul,
.rst-content p + blockquote ol {
    margin-top: 0;
    margin-left: 20px;
}

.rst-content p + blockquote {
    margin-top: 12px;
    margin-bottom: 12px;
    margin-left: 20;
    padding-left: 0;
}

/* Space after list before next paragraph */
.rst-content ul + p,
.rst-content ol + p,
.rst-content blockquote + p {
    margin-top: 24px;
}

/* CSV / longtable - text wrapping */
.wy-table-responsive table td,
.wy-table-responsive table th {
    white-space: normal !important;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/*Formatting for "h2" not included in TOC */

.no-toc-sub, .no-toc-sub-2, .no-toc-sub-3 {
    margin-top:20px;
    margin-bottom:15px;
    font-weight: 900;
    display: block;
}

.no-toc-sub {
    font-size: 150%; /* this equals the h2 size in the theme.css */
}

.no-toc-sub-2 {
    font-size: 120%;
}

.no-toc-sub-3 {
    font-size: 115%;
}

/*/Styles for the DRAFT version banner/*/

.draft-banner {
    background: linear-gradient(to left, #f6f6fb, #dfe4f6, #e62d3014); /* <- soft red tint at the end */
    border-bottom: 1px solid #c8d0f0;
    padding: 12px 20px;
    text-align: left;
    font-weight: 500;
    font-size: 1rem;
    color: #2f3a69;
    font-family: inherit;
    margin-bottom: 20px;
}

.draft-banner i.fa-bell {
    margin-right: 8px;
    color: #2f3a69;
    font-size: 1.1em;
    vertical-align: middle;
    font-style: normal;
}

.draft-banner a {
    color: #2f3a69;
    text-decoration: underline;
    font-weight: 600;
    margin-left: 6px;
}

.draft-banner .draft-icon {
    height: 1.2em;
    width: 1.2em;
    vertical-align: middle;
    margin-right: 8px;
}


/* Customize the color for the .. note:: directive - Fudo style */
div.admonition.note {
    background-color: #f8fafb;
    border-bottom: 2px solid #e5e8ed;
    border-right: 2px solid #e5e8ed;
    color: #4A5568; /* Softer text color */
    border-radius: 6px 6px 6px 6px;
    margin-top: 20px;
}

/* Customize the title color inside the note - Fudo style */
div.admonition.note .admonition-title {
    color: white;
    background-color: #6B91C7; /* Muted Fudo blue */
    border-right: 2px solid #e5e8ed;
    font-weight: 600;
    border-radius: 6px 6px 0 0;
}

/* Customize the color for the .. warning:: directive - Fudo style */
div.admonition.warning {
    background-color: #f8f6fa;
    border-bottom: 2px solid #e5e5ed;
    border-right: 2px solid #e5e5ed;
    color: #4A5568; /* Softer text color */
    border-radius: 6px 6px 6px 6px;
    margin-top: 20px;
}

/* Customize the title color inside the warning - Fudo style */
div.admonition.warning .admonition-title {
    color: white;
    background-color: #B85450; /* Muted red accent */
    border-right: 2px solid #e5e5ed;
    font-weight: 600;
    border-radius: 6px 6px 0 0;
}

/* Success/Tip admonitions */
div.admonition.tip,
div.admonition.hint,
div.admonition.important {
    background-color: #f8f6fa;
    border-bottom: 2px solid #e5e5ed;
    border-right: 2px solid #e5e5ed;
    color: #4A5568;
    border-radius: 6px;
    margin-top: 20px;
}

div.admonition.tip .admonition-title,
div.admonition.hint .admonition-title,
div.admonition.important .admonition-title {
    color: white;
    background-color: #5A9A5A; /* Muted green accent */
    border-right: 2px solid #e5e5ed;
    font-weight: 600;
    border-radius: 6px 6px 0 0;
}

/* Caution/Attention admonitions */
div.admonition.caution,
div.admonition.attention {
    background-color: #f8f6fa;
    border-bottom: 2px solid #e5e5ed;
    border-right: 2px solid #e5e5ed;
    color: #4A5568;
    border-radius: 6px;
    margin-top: 20px;
}

div.admonition.caution .admonition-title,
div.admonition.attention .admonition-title {
    color: white;
    background-color: #B8860B; /* Muted orange accent */
    border-right: 2px solid #e5e5ed;
    font-weight: 600;
    border-radius: 6px 6px 0 0;
}

/* Danger admonitions (for deprecated warnings) */
div.admonition.danger,
.rst-content .danger {
    background-color: #f8f6fa;
    border-bottom: 2px solid #e5e5ed;
    border-right: 2px solid #e5e5ed;
    color: #4A5568;
    border-radius: 6px;
    margin-top: 20px;
}

div.admonition.danger .admonition-title,
.rst-content .danger .admonition-title {
    color: white;
    background-color: #B85450; /* Muted red accent - same as warning */
    border-right: 2px solid #e5e5ed;
    font-weight: 600;
    border-radius: 6px 6px 0 0;
}


/* Fix for Sphinx 8.2.3 - Restore bullet points in admonition boxes only */
.rst-content .admonition ul,
.rst-content .admonition ol {
    margin-left: 24px;
}

/* Fix for Sphinx 8.2.3 - Restore bullet points in content lists */

/* default: list after text */
.rst-content p + ul,
.rst-content p + ul.simple {
    margin-left: 24px;
}

/* exception: if this list is part of an item in another list */
.rst-content li > ul,
.rst-content li > p + ul,
.rst-content li > ul.simple,
.rst-content li > p + ul.simple {
    margin-left: 12px;
}


/* Additional bold for selected menu sections related to Fudo GUI */
.wy-menu-vertical li.toctree-l1 > a[href*="session_management.html"],
.wy-menu-vertical li.toctree-l1 > a[href*="user_management.html"],
.wy-menu-vertical li.toctree-l1 > a[href*="pv_index.html"],
.wy-menu-vertical li.toctree-l1 > a[href*="administration.html"] {
    font-weight: 700;
    color: #2980b9;
    background-color: rgba(41, 128, 185, 0.05);
    border-left: 3px solid #2980b9;
}

.rst-content ul li {
    list-style: disc outside;
    margin-left: 0;
    margin-top: 8px;
    margin-bottom: 4px;
}

.rst-content ol li {
    list-style: decimal outside;
    margin-left: 0;
    margin-top: 8px;
    margin-bottom: 4px;
}

.rst-content ul ul li {
    list-style: circle outside;
}

.rst-content ul ul ul li {
    list-style: square outside;
}

/* Ensure logo displays properly */
.wy-side-nav-search img.logo {
    display: block !important;
    max-width: 100%;
    height: auto;
    margin: 0 auto 10px auto;
}

table.docutils {
    table-layout: fixed;
    width: 100%;
}

/* Margins around images */
.rst-content img {
    margin-top: 12px;
    margin-bottom: 12px;
}

/* If using .. figure:: */
.rst-content .figure {
    margin-top: 16px;
    margin-bottom: 16px;
}

/* Additional spacing between consecutive images */
.rst-content img + img {
    margin-top: 16px;
}

/*Formatting for code block */

code, pre {
    font-size: 14px;
    background-color: #f7f7f9;
    border: 1px solid #d0d0d5;
    border-radius: 6px;
    padding: 10px 14px;
    overflow-x: auto;
    font-family: Menlo, Consolas, "Courier New", monospace;
    line-height: 1.5;
  }

/* For sphinx_copybutton */
/* Hide default SVG or fallback icon */
.copybtn svg {
    display: none;
  }
  
.copybtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: #f7f7f9;
  border-radius: 4px;
  cursor: pointer;
}

.copybtn::before {
    content: "\f0c5"; /* clipboard */
    font: var(--fa-font-regular);
    font-size: 15px;
    color: #126684;
}

/* ===== FUDO BRAND COLORS ALIGNMENT ===== */

  /* Update sidebar to match Fudo app light theme */
  .wy-nav-side {
      background: #F7F8FC !important;
      border-right: 1px solid #E2E8F0;
  }

  /* Update sidebar text colors */
  .wy-menu-vertical a {
      color: #4A5568 !important;
  }

  .wy-menu-vertical li.current>a,
  .wy-menu-vertical li.on a {
      background: #E6F3FF !important;
      color: #1A73E8 !important;
      border-right: 3px solid #4285F4;
  }

  /* Update search box to match Fudo styling */
  .wy-side-nav-search {
      background: #F7F8FC !important;
      border-bottom: 1px solid #E2E8F0;
  }

  .wy-side-nav-search input[type=text] {
      background: #FFFFFF !important;
      border: 1px solid #E2E8F0 !important;
      border-radius: 6px !important;
      color: #2D3748;
  }

  /* Update primary buttons to match Fudo blue */
  .btn-primary,
  .wy-btn-primary {
      background: #4285F4 !important;
      border-color: #4285F4 !important;
  }

  .btn-primary:hover,
  .wy-btn-primary:hover {
      background: #1A73E8 !important;
      border-color: #1A73E8 !important;
  }

  /* Fudo red accent is now handled by the detailed warning styles above */

  /* Update links to match Fudo blue */
  a {
      color: #1A73E8 !important;
  }

  a:hover {
      color: #1557B0 !important;
  }

  /* Update header navigation */
  .wy-nav-top {
      background: #4285F4 !important;
  }

  .wy-nav-top a {
      color: #fff !important;
      text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  }

  .wy-nav-top a:hover {
      color: #f0f0f0 !important;
  }

  /* Update code blocks with softer styling */
  .rst-content pre,
  .rst-content code {
      background: #F7F8FC !important;
      border: 1px solid #E2E8F0 !important;
      color: #2D3748;
  }

  /* Add Fudo-style shadows and spacing */
  .wy-nav-content-wrap {
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  /* Update table styling to match modern Fudo design */
  .wy-table-responsive table th {
      background: #F7F8FC !important;
      color: #2D3748 !important;
      border-bottom: 2px solid #E2E8F0 !important;
  }

  .wy-table-responsive table td {
      border-bottom: 1px solid #E2E8F0 !important;
  }

  /* Modern button styling matching Fudo */
  .btn {
      border-radius: 6px !important;
      font-weight: 500;
      transition: all 0.2s ease;
  }

  /* Update logo area */
  .wy-side-nav-search img.logo {
      padding: 10px 0;
      border-bottom: 1px solid #E2E8F0;
  }

/* ===== QUICKSTART Configuration sections styling ===== */

.admonition.config-section {
	background-color: #f8f9fa;
	border: 1px solid #dee2e6;
	border-left: 4px solid #007bff;
	padding: 15px;
	margin: 15px 0;
	border-radius: 4px;
}

.admonition.config-section > .admonition-title {
	background-color: transparent;
	color: #007bff;
	font-weight: 600;
	font-size: 1.1em;
	margin: -15px -15px 10px -15px;
	padding: 10px 15px;
	border-bottom: 1px solid #dee2e6;
}

.admonition.config-section p {
	margin: 0;
	line-height: 1.8;
}

.admonition.config-section code {
	background-color: #f0f4f8;
	padding: 2px 6px;
	border: 1px solid #d1d5db;
	border-radius: 3px;
	color: #282a2ccf;
	font-weight: 500;
}

/* Icons centering */

.security-icons p img {
    vertical-align: -1.5em;
    margin-right: 0.5em;
}

.security-icons p {
    margin-bottom: 0.8em;
}

/* ===== LANGUAGE TOGGLE button in breadcrumbs navigation ===== */

.language-toggle-nav {
    display: inline-block;
    margin-right: 12px;
    margin-bottom: 3px;
}

.language-btn-nav {
    /* Theme-matching button styling */
    color: #404040 !important;
    text-decoration: none !important;
    padding: 0;
    background: linear-gradient(135deg, #fcfcfc 0%, #f3f6f6 100%);
    border: 1px solid #cfd7dd;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.015em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 26px;
    text-align: center;
    gap: 2px;
    line-height: 1;
    vertical-align: middle;

    /* Subtle interactive effects matching theme */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    position: relative;
}

.language-btn-nav:hover {
    background: #605f92;
    border-color: #605f92;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px 0 rgba(96, 95, 146, 0.25);
}

.language-btn-nav:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .language-btn-nav {
        padding: 0;
        font-size: 10px;
        min-width: 40px;
        height: 22px;
        gap: 1px;
    }
}

/* ===== DOCUMENTATION SWITCHER ===== */

/* Documentation Switcher Label */
.doc-switcher-label-top,
.toc-label-top,
.search-label-top {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 10px 10px 8px 6px;
    opacity: 0.7;
    text-align: left;
}

.toc-label-top {
    margin-left: 20px;
}

/* Ensure TOC aligns with other elements */
.wy-menu.wy-menu-vertical ul {
    margin-left: 0;
    padding-left: 0;
}

.wy-menu.wy-menu-vertical > ul {
    padding: 0 10px;
}

.doc-switcher {
    margin: 0px 0px 20px 0px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    /* Match search box width */
    width: calc(100%);
}

.doc-switcher-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.08) 0%, rgba(66, 133, 244, 0.03) 100%);
    transition: background 0.2s ease;
}

.doc-switcher-header:hover {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.15) 0%, rgba(66, 133, 244, 0.08) 100%);
}

.doc-switcher-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4A5568;
    font-weight: 600;
}

.doc-switcher-icon {
    transition: transform 0.3s ease;
    color: #4A5568;
}

.doc-switcher.active .doc-switcher-icon {
    transform: rotate(180deg);
}

.doc-switcher-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #FFFFFF;
    border-top: 1px solid #E2E8F0;
}

.doc-switcher.active .doc-switcher-content {
    max-height: 300px;
}

.doc-switcher-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none !important;
    color: #4A5568 !important;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.doc-switcher-item:hover {
    background: rgba(66, 133, 244, 0.05);
    color: #1A73E8 !important;
    text-decoration: none !important;
}

.doc-switcher-item.active {
    background: rgba(26, 115, 232, 0.08);
    border-left-color: #1A73E8;
    color: #1A73E8 !important;
}

.doc-item-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    opacity: 0.7;
}

.doc-switcher-item:hover .doc-item-icon {
    opacity: 1;
}

.doc-item-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.doc-item-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.doc-item-desc {
    font-size: 11px;
    color: #718096;
}

.doc-item-external {
    width: 14px;
    height: 14px;
    margin-left: 8px;
    opacity: 0.4;
    flex-shrink: 0;
}

.doc-switcher-item:hover .doc-item-external {
    opacity: 0.7;
}

/* Animation for smooth transitions */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.doc-switcher.active .doc-switcher-content {
    animation: slideDown 0.3s ease-out;
}

/* Divider in documentation switcher */
.doc-switcher-divider {
    height: 1px;
    background-color: #e1e4e8;
    margin: 5px 0;
}

/* PDF download link styling */
.doc-switcher-pdf {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    background-color: #f6f8fa;
    transition: background-color 0.2s;
}

.doc-switcher-pdf:hover {
    background-color: #e9ecef;
}

/* Override definition list styling to be more subtle */
.rst-content dl:not(.docutils) dt {
    background: transparent !important;
    border: none !important;
    color: inherit !important;
    font-weight: normal !important;
    padding: 0 !important;
    margin: 12px 0 6px 0 !important;
    display: block !important;
    font-size: 100% !important;
}

/* Keep nested definition lists more subtle */
.rst-content dl:not(.docutils) dl dt {
    background: transparent !important;
    border: none !important;
    color: inherit !important;
    font-weight: normal !important;
    font-style: italic !important;
    padding: 0 !important;
    margin: 8px 0 4px 0 !important;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    /* Fix for side navigation width on mobile */
    .wy-nav-side.shift {
        width: 300px !important;
        max-width: 85%;
    }

    .wy-side-scroll {
        width: 100% !important;
        overflow-y: auto !important;
    }

    /* Fix content margin when menu is open */
    .wy-nav-content-wrap.shift {
        left: 300px !important;
        min-width: calc(100% - 300px) !important;
    }

    .doc-switcher {
        margin: 15px 10px;
        width: calc(100% - 20px);
    }

    .doc-switcher-header {
        padding: 10px 12px;
    }

    .doc-switcher-item {
        padding: 10px 12px;
    }

    .doc-item-title {
        font-size: 13px;
    }

    .doc-item-desc {
        font-size: 10px;
    }
}
