/* =====================================================================
   DOI Portal — Monographs List (page-scoped)
   Loaded AFTER portal-publications-table.css — reuses its classes and
   adds only monograph-specific tweaks.
   ===================================================================== */

/* Full-width results section (replaces the old two-column row/aside layout).
   The tab bar now spans the top, and the table uses the whole container. */
.pub-results-full {
    width: 100%;
}

.pub-results-full .pub-table-wrap,
.pub-results-full .pub-table {
    width: 100%;
}

/* Small green count pill for "Broj radova" (published chapters). */
.mono-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    padding: 0.15rem 0.55rem;
    border-radius: 50px;
    background: rgba(92, 180, 106, 0.14);
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Author cell — allow wrapping but keep it compact. */
.mono-author-cell {
    color: var(--color-text-secondary);
    min-width: 150px;
}

/* =====================================================================
   MONOGRAPH DETAIL (page-scoped)
   Loaded AFTER portal-publication-detail.css — reuses its .pub-detail-*,
   .detail-meta-*, .article-list-* and .btn-doi look, adding only
   monograph-specific pieces.
   ===================================================================== */

/* Secondary subtitle line inside the gradient header (monograph subtitle). */
.pub-detail-header .mono-header-subtitle {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.5;
    margin: 0.25rem 0 0.15rem;
}

/* Year badge in the header badge row — neutral glass pill like .badge-type. */
.pub-header-badges .badge-year {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 50px;
    padding: 0.38rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(2px);
}

/* Section head that carries a trailing count pill (Poglavlja). */
.pub-section-head-inline {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.pub-section-head-inline .publisher-pub-count {
    flex-shrink: 0;
    align-self: center;
}

/* Keyword tags — soft, on-brand chips. */
.mono-keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.mono-keyword-list .keyword-tag {
    border-radius: 50px;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(92, 180, 106, 0.1) !important;
    color: #2f7d4a !important;
    border-color: rgba(92, 180, 106, 0.28) !important;
}

/* Chapter list — richer, clearly clickable cards (mirrors issue-detail
   article cards from portal-publication-detail.css). */
.mono-chapter-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.mono-chapter-list .article-list-item {
    display: block;
    text-decoration: none;
    border: 1px solid var(--color-border-subtle);
    border-radius: 14px;
    padding: 1.15rem 1.35rem;
    margin-bottom: 0;
    background: var(--color-surface-base);
    box-shadow: 0 1px 2px rgba(3, 51, 51, 0.03);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.mono-chapter-list .article-list-item:hover {
    background: #fff;
    border-color: rgba(92, 180, 106, 0.5);
    box-shadow: 0 16px 36px -18px rgba(3, 51, 51, 0.28);
    transform: translateY(-3px);
}

.mono-chapter-list .article-list-title {
    font-size: 1.02rem;
    line-height: 1.4;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0 0 0.35rem;
    transition: color 0.2s ease;
}

.mono-chapter-list .article-list-item:hover .article-list-title {
    color: var(--color-primary);
}

.mono-chapter-list .article-list-authors {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin: 0 0 0.3rem;
}

/* Chapter DOI line — monospaced, muted, breaks cleanly. */
.mono-chapter-doi {
    display: inline-flex;
    align-items: center;
    font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    word-break: break-all;
}

.mono-chapter-doi i {
    color: var(--color-primary);
    font-size: 0.95rem;
}

@media (max-width: 767.98px) {
    .pub-detail-header .mono-header-subtitle {
        font-size: 0.98rem;
    }
    .pub-section-head-inline {
        flex-direction: column;
    }
}

/* =====================================================================
   MONOGRAPHS LIST — mobile stacked cards (label-per-cell pattern)
   Mirrors the responsive approach used for the Publications table.
   Mobile-only: desktop layout is unchanged.
   ===================================================================== */
@media (max-width: 640px) {
    .pub-table-wrap { overflow: visible; border: none; background: transparent; box-shadow: none; border-radius: 0; }
    .pub-table { min-width: 0; width: 100%; }
    .pub-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .pub-table tbody, .pub-table tr, .pub-table td { display: block; width: 100%; }
    .pub-table tr.pub-row { background:#fff; border:1px solid var(--color-border); border-radius:12px; margin-bottom:0.85rem; padding:0.85rem 1rem; box-shadow:0 0 30px 3px rgba(3,51,51,0.04); }
    .pub-table td { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:0.4rem 0; border:none; text-align:right; }
    .pub-table td::before { content: attr(data-label); font-weight:700; font-size:0.78rem; color:var(--color-text-secondary); text-align:left; flex-shrink:0; }
    .pub-table td.pub-name-cell { border-bottom:1px solid var(--color-border-subtle); padding-bottom:0.7rem; margin-bottom:0.4rem; text-align:left; }
    .pub-table td.pub-name-cell::before { display:none; }
    .pub-table td:last-child { padding-bottom:0; }
    .pub-table td[colspan] { display:block; text-align:center; }
    .pub-table td[colspan]::before { display:none; }
}
