/* Adoption block — server-rendered data tables and SVG bar charts in blog posts */

.adoption-block {
    margin: 2.5em 0;
    padding: 1.5em;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #111827;
}

.adoption-block .adoption-heading {
    margin: 0 0 1em 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    border-bottom: 0;
    padding-bottom: 0;
}

/* SVG chart */
.adoption-block .adoption-chart {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 0 1em 0;
}

.adoption-block .adoption-chart-continuation {
    margin-top: 0.5em;
}

.adoption-block .adoption-row text.adoption-label {
    fill: #111827;
    font-weight: 500;
}

.adoption-block .adoption-row text.adoption-value {
    fill: #374151;
    text-anchor: end;
    font-weight: 600;
}

.adoption-block .adoption-row .adoption-count {
    fill: #6b7280;
    font-weight: 400;
}

.adoption-block .adoption-row:hover rect[fill="url(#adoption-bar-fill)"] {
    opacity: 0.85;
}

/* Expand toggle */
.adoption-block .adoption-expand {
    margin: 0 0 1.5em 0;
}

.adoption-block .adoption-expand > summary {
    cursor: pointer;
    color: #1d4ed8;
    font-weight: 500;
    font-size: 0.95rem;
    margin: 0.25em 0;
    padding: 0.4em 0.8em;
    background: #eff6ff;
    border-radius: 4px;
    display: inline-block;
    list-style: none;
}

.adoption-block .adoption-expand > summary::-webkit-details-marker {
    display: none;
}

.adoption-block .adoption-expand[open] > summary {
    background: #dbeafe;
}

/* Data table */
.adoption-block .adoption-table-wrap {
    overflow-x: auto;
    margin: 1em 0 1em 0;
}

.adoption-block .adoption-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.adoption-block .adoption-table th,
.adoption-block .adoption-table td {
    text-align: left;
    padding: 0.55em 0.75em;
    border-bottom: 1px solid #e5e7eb;
}

.adoption-block .adoption-table thead th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.adoption-block .adoption-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.adoption-block .adoption-table td:nth-child(1) {
    width: 3em;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

.adoption-block .adoption-table td:nth-child(3),
.adoption-block .adoption-table td:nth-child(4) {
    font-variant-numeric: tabular-nums;
}

/* Footer */
.adoption-block .adoption-footer {
    margin: 1em 0 0 0;
    font-size: 0.85rem;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.75em;
}

.adoption-block .adoption-footer a {
    color: #1d4ed8;
    text-decoration: none;
}

.adoption-block .adoption-footer a:hover {
    text-decoration: underline;
}

/* Mobile */
@media (max-width: 700px) {
    .adoption-block {
        padding: 1em;
    }
    .adoption-block .adoption-chart text {
        font-size: 11px !important;
    }
}
