/* ==========================================================
   "Contributor countries" — OJS 3.3, default theme
   Loaded only when an issue has at least one author with a country,
   by plugins/themes/default/templates/frontend/components/issueCountries.tpl.
   Flags come from flag-icons (.fi .fi-xx), loaded by the same template.
   Sits on the same line as the "Published" pill; wraps below it when the
   line is too narrow.
   ========================================================== */

.issue_countries {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    vertical-align: middle;
}

.issue_countries__label {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    color: #4b5563;
}

.issue_countries__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.issue_countries__item {
    margin: 0;
    padding: 0;
    line-height: 0;
}

.issue_countries__flag.fi {
    display: inline-block;
    width: 24px;
    height: 18px;
    line-height: 18px;
    border-radius: 3px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
    cursor: help;
}

/* Archives card: issue_summary.tpl wraps the Published pill and this block
   in .issue_card__metarow; the row takes over the pill's 16px top margin. */
.issue_card__metarow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-top: 16px;
}

.issue_card__metarow .issue_card__meta.published {
    margin-top: 0;
}

/* Issue page: the heading is a wrapping flex row. After the cover and
   description, DOI and Published use order 2, a -20px top margin and a 180px
   left indent (160px cover + 20px gap). issue_toc.tpl prints this block
   before them, so with the same order it gets its own full-width row above
   them, lined up with the DOI pill. */
.obj_issue_toc .heading .issue_countries {
    order: 2;
    flex: 0 0 100%;
    box-sizing: border-box;
    margin: -20px 0 10px; /* DOI row pulls up 20px; keep 10px between */
    padding-left: 180px;
}

/* Theme stacks the heading and drops the indent on small screens */
@media (max-width: 640px) {
    .obj_issue_toc .heading .issue_countries {
        justify-content: center;
        padding-left: 0;
    }
}
