/* ------------------------------------------------------------------ */
/* Class documentation pages — light theme matching /colvmn/style.css    */
/* ------------------------------------------------------------------ */

/* Give class-doc pages a bit more breathing room than the default docs
   layout, since method signatures and code blocks benefit from width. */
body > .page {
    max-width: 1080px;
}

/* Root wrapper produced by the parser */
class {
    display: block;
}

/* Elements we don't need to show (the className is hoisted into the header h1) */
classInfo > className,
method > name,
method > methodName,
method > lineno,
method > isAsync,
linenumberstart,
linenumberend,
isstatic,
access,
author,
version,
property > category {
    display: none;
}

/* ---------- class header block ---------- */

classInfo {
    display: block;
    padding-bottom: 24px;
    font-size: 13px;
    color: #555;
    line-height: 1.8;
}

classInfo > extends,
classInfo > filepath {
    display: block;
}

classInfo > extends:before,
classInfo > filepath:before {
    display: inline-block;
    min-width: 70px;
    color: #2a2a2a;
    font-weight: 600;
    letter-spacing: 0.2px;
}

classInfo > extends:before { content: "Extends:"; }
classInfo > filepath:before { content: "Source:"; }

classInfo > filepath a {
    color: #555;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
}

classInfo > filepath a:hover {
    color: #2a2a2a;
}

classInfo > description {
    display: block;
    margin-top: 18px;
    white-space: pre-wrap;
    font-size: 13px;
    color: #555;
    line-height: 1.75;
}

classInfo > description:before {
    content: "Description";
    display: block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #2a2a2a;
    margin-bottom: 10px;
}

/* ---------- section headings ---------- */

classmethods,
instancemethods,
properties {
    display: block;
    border-top: 1px solid #ddd;
    padding: 30px 0;
}

classmethods:before,
instancemethods:before,
properties:before {
    display: block;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.3px;
    color: #2a2a2a;
    margin-bottom: 24px;
}

properties:before     { content: "Instance Slots"; }
classmethods:before   { content: "Class Methods"; }
instancemethods:before { content: "Instance Methods"; }

/* ---------- categories within a section ---------- */

category {
    display: block;
    margin-top: 18px;
    margin-bottom: 4px;
}

category:first-child {
    margin-top: 0;
}

category > name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #2a2a2a;
    margin-top: 16px;
    margin-bottom: 8px;
}

category:not(:has(> name)) {
    margin-top: 0;
}

/* ---------- methods ---------- */

method {
    display: block;
    padding: 2px 0;
    border-bottom: 1px solid #ececec;
}

method:last-child {
    border-bottom: none;
}

method > fullMethodName {
    display: block;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: #2a2a2a;
    padding: 8px 0 8px 18px;
    transition: color 0.15s;
}

method > fullMethodName:hover {
    color: #000;
}

method.expanded > fullMethodName {
    color: #000;
    font-weight: 500;
}

method > fullMethodName[async]::before {
    content: "async ";
    color: #5a9a5a;
}

/* Collapsible indicator — reused by fullMethodName and source-toggle */
.collapsible {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.collapsible::before {
    content: '▶';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    color: #bbb;
    line-height: 1;
    transition: color 0.15s;
}

.collapsible:hover::before {
    color: #2a2a2a;
}

.collapsible.expanded::before {
    content: '▼';
    color: #2a2a2a;
}

.collapsible-content {
    display: none;
}

.collapsible-content.show {
    display: block;
}

.method-info-content {
    border-left: 2px solid #e6e6e3;
    padding: 2px 0 10px 18px;
    margin: 4px 0 10px 18px;
    font-size: 13px;
    color: #555;
    line-height: 1.75;
}

.method-info-content > category {
    display: none;
}

method > description,
methodinfo description {
    display: block;
    margin: 2px 0 10px;
    white-space: pre-wrap;
}

/* ---------- parameters ---------- */

params {
    display: block;
    margin: 8px 0;
}

param {
    display: block;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: #555;
    padding: 1px 0;
}

paramname {
    color: #2a2a2a;
}

paramtype {
    color: #888;
    margin-left: 6px;
}

paramtype:before { content: "{"; }
paramtype:after  { content: "}"; }

param > description {
    display: inline;
    margin-left: 8px;
    font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-style: italic;
    color: #888;
}

/* ---------- returns ---------- */

returns {
    display: block;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: #555;
    margin: 6px 0;
}

returns:before {
    content: "returns ";
    color: #2a2a2a;
}

returns > returntype {
    display: inline-block;
    color: #888;
}

returns > returntype:before { content: "{"; }
returns > returntype:after  { content: "}"; }

returns > description {
    display: inline;
    margin-left: 8px;
    font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-style: italic;
    color: #888;
}

/* ---------- throws ---------- */

throws {
    display: block;
    font-size: 12px;
    color: #a05a5a;
    margin: 6px 0;
}

throws:before {
    content: "throws: ";
    font-weight: 500;
    color: #a05a5a;
}

/* ---------- method source toggle ---------- */

.source-wrapper {
    margin-top: 10px;
}

.source-toggle {
    display: inline-block;
    cursor: pointer;
    position: relative;
    padding: 4px 0 4px 16px;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
}

.source-toggle::before {
    content: '▶';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8px;
    color: #bbb;
    line-height: 1;
}

.source-toggle.expanded::before {
    content: '▼';
    color: #2a2a2a;
}

.source-toggle:hover {
    color: #2a2a2a;
}

methodsource {
    display: none;
    white-space: pre-wrap;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: #2a2a2a;
    background: #f5f5f3;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 16px 20px;
    margin-top: 6px;
    overflow-x: auto;
    line-height: 1.6;
}

methodsource.show {
    display: block;
}

/* ---------- properties ---------- */

property {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid #ececec;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
}

property:last-child {
    border-bottom: none;
}

propertyname {
    display: inline-block;
    color: #2a2a2a;
}

propertytype {
    display: inline-block;
    color: #888;
    margin-left: 6px;
}

propertytype:before { content: "{"; }
propertytype:after  { content: "}"; }

property description {
    display: block;
    margin-top: 6px;
    font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13px;
    color: #666;
    line-height: 1.75;
    white-space: pre-wrap;
}

/* ---------- responsive ---------- */

@media (max-width: 700px) {
    classInfo > extends:before,
    classInfo > filepath:before {
        min-width: 56px;
    }
}
