/* Only structural rules; the active theme owns visual styling. */
.block_elkuator_author_demographics .ead-stat-list {
    list-style: none; margin: 0; padding: 0;
}
.block_elkuator_author_demographics .ead-stat-list li { margin: .35em 0; }
.block_elkuator_author_demographics .ead-stat-row,
.block_elkuator_author_demographics .ead-stat-list li:not(:has(.ead-stat-row)) {
    display: flex; justify-content: space-between; align-items: baseline; gap: .5em;
}
.block_elkuator_author_demographics .ead-stat-list span {
    min-width: 0; overflow-wrap: anywhere;
}
.block_elkuator_author_demographics .ead-stat-list strong { flex-shrink: 0; }
.block_elkuator_author_demographics .ead-stat-section h3 {
    margin: 0 0 .5em; font-size: inherit;
}
.block_elkuator_author_demographics .ead-stat-section + .ead-stat-section {
    margin-block-start: 1em;
}
.block_elkuator_author_demographics .ead-stat-progress {
    display: block; width: 100%; height: .4em; accent-color: currentColor;
}

/* Keep flag layout independent of broad theme image/span/row styling.
 * Important declarations are limited to this block's structural geometry. */
.pkp_block.block_elkuator_author_demographics .ead-country-row {
    display: flex !important; align-items: center !important;
    justify-content: space-between; gap: .5em; min-width: 0;
}
.pkp_block.block_elkuator_author_demographics .ead-country-row .ead-country-label {
    display: flex !important; align-items: center !important;
    flex: 1 1 auto; gap: 6px; min-width: 0; margin: 0; padding: 0;
}
.pkp_block.block_elkuator_author_demographics .ead-country-row .ead-country-flag-slot {
    display: flex !important; align-items: center; justify-content: center;
    width: 20px !important; min-width: 20px !important; max-width: 20px !important;
    height: 15px !important; flex: 0 0 20px !important;
    margin: 0 !important; padding: 0 !important;
}
.pkp_block.block_elkuator_author_demographics .ead-country-row img.ead-country-flag {
    display: block !important;
    width: 20px !important; min-width: 20px !important; max-width: 20px !important;
    height: 15px !important; min-height: 15px !important; max-height: 15px !important;
    flex: 0 0 20px !important; object-fit: contain !important;
    margin: 0 !important; padding: 0 !important; float: none !important;
    box-sizing: border-box; border: 1px solid rgba(128,128,128,.25);
    border-radius: 2px;
}
.pkp_block.block_elkuator_author_demographics .ead-country-row .ead-country-name {
    display: block; min-width: 0; overflow-wrap: anywhere;
    margin: 0; padding: 0; text-align: start;
}
.pkp_block.block_elkuator_author_demographics .ead-country-row .ead-country-count {
    flex: 0 0 auto; margin-inline-start: auto; text-align: end;
    font-variant-numeric: tabular-nums;
}

/* Shared native-details country disclosure. CSS fallback remains usable without JS. */
details.ead-country-disclosure {position:relative;min-width:0;}
details.ead-country-disclosure > summary {display:inline-flex;align-items:center;gap:7px;cursor:pointer;list-style:none;font:inherit;color:inherit;}
details.ead-country-disclosure > summary::-webkit-details-marker {display:none;}
details.ead-country-disclosure > summary::marker {content:"";}
details.ead-country-disclosure > summary:focus-visible {outline:2px solid currentColor;outline-offset:2px;}
.ead-country-sidebar-more {margin:.55em 0;}
.ead-country-chevron {width:7px;height:7px;box-sizing:border-box;border-inline-end:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);transition:transform .15s;}
.ead-country-disclosure[open] .ead-country-chevron {transform:rotate(45deg);}
.ead-country-popover {box-sizing:border-box;background:#fff;color:#263442;padding:12px;border:1px solid #dce0e3;box-shadow:0 4px 16px rgba(0,0,0,.12);min-width:0;width:100%;max-height:320px;overflow:auto;overscroll-behavior:contain;}
.ead-country-popover h4 {margin:0 0 8px;font-size:14px;line-height:1.4;}
.ead-country-popover .ead-country-detail-list {list-style:none;margin:0;padding:0;display:block;}
.ead-country-popover .ead-country-detail-list li {display:flex;justify-content:space-between;align-items:center;gap:10px;padding:5px 0;margin:0;line-height:1.4;font-size:13px;}
.ead-country-detail-label {display:flex;align-items:center;gap:7px;min-width:0;overflow-wrap:anywhere;}
.ead-country-detail-label img {width:20px!important;height:15px!important;flex:0 0 20px;object-fit:contain;margin:0!important;border:1px solid #dce0e3;box-sizing:border-box;}
.ead-country-code {width:20px;flex:0 0 20px;text-align:center;font-size:10px;}
.ead-country-popover .ead-country-total {font-size:12px;margin:8px 0 0;}
@media(prefers-reduced-motion:reduce){.ead-country-chevron{transition:none;}}

/* Modern browsers promote the native-details panel to the top layer, avoiding
   clipping by compact issue cards and sticky sidebar. Older browsers keep the
   same bounded native disclosure in normal flow. */
details.ead-country-disclosure > .ead-country-popover[popover] {
    position:fixed;inset:auto;margin:0;width:min(300px,calc(100vw - 24px));max-width:calc(100vw - 24px);
    max-height:min(320px,calc(100dvh - 24px));z-index:1;
}
details.ead-country-disclosure:not([open]) > .ead-country-popover {display:none;}
.ead-country-sidebar-more > summary {font-weight:600;min-height:30px;}
