/* ===== TABLE IMPROVEMENTS ===== */

/* Override table width restrictions - allow content to wrap */
.wy-table-responsive table td,
.wy-table-responsive table th {
   /* !important prevents the common CSS stylesheets from overriding
      this as on RTD they are loaded after this stylesheet */
   white-space: normal !important;
   word-wrap: break-word !important;
   word-break: break-word !important;
}

/* Remove horizontal scrolling on tables */
.wy-table-responsive {
   overflow: visible !important;
}

/* Improve table layout */
.wy-table-responsive table {
   border-collapse: collapse !important;
   table-layout: auto !important;
}

/* Better handling of code blocks within tables */
.wy-table-responsive table td code,
.wy-table-responsive table th code {
   white-space: normal !important;
   word-wrap: break-word !important;
}

/* ===== CODE BLOCK IMPROVEMENTS ===== */

/* Improve code block wrapping */
.rst-content pre.literal-block,
.rst-content div[class^='highlight'] pre {
   white-space: pre-wrap !important;
   word-wrap: break-word !important;
   word-break: break-word !important;
}

/* Better inline code handling */
code {
   white-space: pre-wrap !important;
   word-wrap: break-word !important;
}

/* ===== CONTENT WIDTH IMPROVEMENTS ===== */

/* Increase max content width for better readability on large screens */
.wy-nav-content {
   max-width: 1200px !important;
}

/* ===== API DOCUMENTATION IMPROVEMENTS ===== */

/* Better spacing for method signatures */
.rst-content dl:not(.docutils) dt {
   background: #f4f4f4;
   border-left: 3px solid #2980b9;
   padding: 6px;
   margin-bottom: 6px;
}

/* Improve parameter list readability */
.rst-content dl:not(.docutils) dd {
   margin-left: 24px;
   margin-bottom: 12px;
}

/* Better handling of long method/class names */
.rst-content dl:not(.docutils) .descname,
.rst-content dl:not(.docutils) .descclassname {
   white-space: normal !important;
   word-wrap: break-word !important;
}

/* ===== ADMONITION IMPROVEMENTS ===== */

/* Better wrapping for admonitions (notes, warnings, etc.) */
.rst-content .admonition {
   overflow-wrap: break-word;
   word-wrap: break-word;
}

/* ===== NAVIGATION IMPROVEMENTS ===== */

/* Ensure sidebar navigation items wrap properly */
.wy-menu-vertical li.toctree-l1,
.wy-menu-vertical li.toctree-l2 {
   white-space: normal !important;
}

/* ===== MOBILE RESPONSIVENESS ===== */

/* Better mobile display */
@media screen and (max-width: 768px) {
   .wy-table-responsive table {
      display: table !important;
      width: 100% !important;
   }
   
   .wy-nav-content {
      max-width: 100% !important;
   }
}