/* Custom CSS for numpyCore C++ documentation */

/* Improve method table styling */
.method-table {
    width: 100%;
    border-collapse: collapse;
}

.method-table th,
.method-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--pst-color-border);
}

.method-table th {
    font-weight: 600;
    background-color: var(--pst-color-surface);
}

.method-table tr:hover {
    background-color: var(--pst-color-surface);
}

/* C++ signature styling */
.sig-name {
    font-weight: 600;
}

.sig-param {
    font-style: italic;
}

/* Make code blocks more prominent */
div.highlight {
    margin: 1em 0;
}

/* API reference list styling */
.api-list {
    list-style-type: none;
    padding-left: 0;
}

.api-list li {
    margin: 0.3em 0;
}

.api-list a {
    font-family: var(--pst-font-family-monospace);
}

/* Category section styling */
.category-section {
    margin-top: 2em;
    margin-bottom: 1em;
}

.category-section h2 {
    border-bottom: 2px solid var(--pst-color-primary);
    padding-bottom: 0.3em;
}

/* Improve table responsiveness */
.table-wrapper {
    overflow-x: auto;
}

/* Method signature in tables */
td code.sig {
    white-space: nowrap;
    font-size: 0.9em;
}

/* Quick links section */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1em;
    margin: 1em 0;
}

.quick-link-card {
    padding: 1em;
    border: 1px solid var(--pst-color-border);
    border-radius: 4px;
    transition: box-shadow 0.2s;
}

.quick-link-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* C++ class overview */
.class-overview {
    background-color: var(--pst-color-surface);
    padding: 1em;
    border-radius: 4px;
    margin-bottom: 1.5em;
}

.class-overview code {
    background-color: transparent;
}

/* Navigation improvements */
.bd-sidebar-primary .nav-link {
    padding: 0.3em 0.5em;
}

/* Method documentation styling */
dl.method > dt {
    background-color: var(--pst-color-surface);
    padding: 0.5em;
    border-left: 3px solid var(--pst-color-primary);
    margin-top: 1em;
}

dl.method > dd {
    padding-left: 1em;
    margin-top: 0.5em;
}

/* Parameter lists */
.field-list {
    margin-top: 1em;
}

.field-list dt {
    font-weight: 600;
}

.field-list dd {
    margin-left: 1em;
    margin-bottom: 0.5em;
}

/* C++ specific - template parameters */
.template-params {
    font-style: italic;
    color: var(--pst-color-text-muted);
}

/* C++ namespace badge */
.namespace-badge {
    background-color: var(--pst-color-primary);
    color: white;
    padding: 0.1em 0.4em;
    border-radius: 3px;
    font-size: 0.85em;
}

/* File location styling */
.file-location {
    font-size: 0.85em;
    color: var(--pst-color-text-muted);
}

/* Signature truncation with ellipsis */
.sig-truncated::after {
    content: "...";
    color: var(--pst-color-text-muted);
}

/* Fix table column visibility for long signatures */
.pst-scrollable-table-container table {
    table-layout: fixed;
    width: 100%;
}

/* Contain text within cells - prevent overflow */
.pst-scrollable-table-container td {
    overflow: hidden;
}

/* Allow signature column to wrap */
.pst-scrollable-table-container td:first-child code {
    word-break: break-all;
    white-space: normal;
}

/* Location column - allow wrapping (removed white-space: nowrap) */
.pst-scrollable-table-container td:nth-child(3) {
    word-break: break-word;
}

/* Example column - keep "View" link on single line */
.pst-scrollable-table-container td:last-child {
    white-space: nowrap;
    min-width: 50px;
}

/* Modal overlay styles for View links */
.example-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.example-modal-overlay.active {
    display: flex;
}

.example-modal {
    background: var(--pst-color-background);
    border-radius: 8px;
    max-width: 900px;
    max-height: 80vh;
    width: 90%;
    overflow: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.example-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--pst-color-border);
    position: sticky;
    top: 0;
    background: var(--pst-color-background);
}

.example-modal-title {
    font-weight: 600;
    margin: 0;
}

.example-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--pst-color-text-muted);
    padding: 0 8px;
}

.example-modal-close:hover {
    color: var(--pst-color-text-base);
}

.example-modal-body {
    padding: 16px;
}
