/* Styles for post-enhancements.js and the neuron-basis figures. */

d-article a.xref {
    border-bottom: 1px dotted rgba(0, 0, 0, 0.35);
    text-decoration: none;
}

.xref-pop {
    position: absolute;
    z-index: 1000;
    box-sizing: border-box;
    width: max-content;
    max-width: min(380px, calc(100vw - 24px));
    padding: 10px 12px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    color: #333;
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
    overflow-wrap: anywhere;
}

.xref-pop img {
    display: block;
    width: 354px;
    max-width: 100%;
    max-height: 240px;
    object-fit: contain;
    margin-bottom: 8px;
}

.xref-pop a {
    color: inherit;
}

.xref-pop .xref-go {
    display: block;
    margin-top: 6px;
    color: #777;
}

d-article details.appendix-section {
    grid-column: text;
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0;
    background: none;
    box-shadow: none;
}

d-article details.appendix-section > summary {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.9em 0;
    cursor: pointer;
    list-style: none;
}

d-article details.appendix-section > summary::-webkit-details-marker {
    display: none;
}

d-article details.appendix-section > summary::before {
    content: "";
    flex: none;
    border-style: solid;
    border-width: 5px 0 5px 7px;
    border-color: transparent transparent transparent #777;
    transition: transform 0.15s;
}

d-article details.appendix-section[open] > summary::before {
    transform: rotate(90deg);
}

d-article details.appendix-section > summary h3 {
    margin: 0 !important;
}

d-article details.appendix-section[open] {
    padding-bottom: 1em;
}

.neuron-types {
    grid-column: text;
    margin: 0.5em 0 2em;
    font-size: 14px;
    line-height: 1.4;
}

.neuron-types .types-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.neuron-types button {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font: inherit;
    cursor: pointer;
}

.neuron-types button[aria-selected="true"] {
    border-color: #333;
    background: #f3f3f1;
}

.neuron-types button b {
    display: block;
}

.neuron-types button span {
    color: #666;
    font-size: 12px;
}

.neuron-types .types-panel {
    padding: 14px 0 0;
}

.neuron-types .flow {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 18px minmax(0, 1fr) 18px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
}

.neuron-types .column {
    display: grid;
    gap: 8px;
}

.neuron-types .box {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.neuron-types .box.unit {
    border-color: #333;
    border-radius: 24px;
}

.neuron-types .box small {
    display: block;
    color: #666;
}

.neuron-types .box.adds-a {
    border-color: #1b9e77;
    background: rgba(27, 158, 119, 0.08);
}

.neuron-types .box.adds-b {
    border-color: #7570b3;
    background: rgba(117, 112, 179, 0.1);
}

.neuron-types .arrow {
    color: #777;
    text-align: center;
}

.neuron-types .takeaway {
    margin: 10px 0 0;
    color: #555;
}

@media (max-width: 600px) {
    .neuron-types .flow {
        grid-template-columns: minmax(0, 1fr);
    }

    .neuron-types .arrow {
        transform: rotate(90deg);
    }
}

@media print {
    .xref-pop,
    .types-tabs {
        display: none;
    }
}
