/**
 * css/tag-cloud.css
 *
 * Styles for the Live Keyword Splitter tag-cloud page (/tag) and
 * tag-articles page (/tag/view/{keyword}).
 *
 * Uses BEM-inspired lks_ (live-keyword-splitter) prefix to avoid collisions
 * with existing OJS / theme stylesheets.
 */

/* ============================================================
   Tag Cloud Browse Page
   ============================================================ */

.lks_tag_browse_page .page_header {
    margin-bottom: 1.5rem;
}

.lks_tag_browse_page .lks_description {
    color: #555;
    margin-top: 0.25rem;
}

/* Cloud container — flexible wrapping row */
.lks_tag_cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.6rem;
    justify-content: center;
    padding: 1.5rem 0.5rem 2rem;
    line-height: 2;
}

/* Individual tag chip */
.lks_tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2em;
    padding: 0.2em 0.7em;
    background: #eef2f7;
    border: 1px solid #d0d9e6;
    border-radius: 2rem;
    color: #1a4a8a;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
}

.lks_tag:hover,
.lks_tag:focus {
    background: #1a4a8a;
    color: #fff;
    border-color: #1a4a8a;
    transform: translateY(-2px);
    text-decoration: none;
    outline-offset: 2px;
}

/* Article-count superscript inside each tag */
.lks_tag_count {
    font-size: 0.65em;
    opacity: 0.75;
    font-weight: 600;
    vertical-align: super;
}

/* ---- Size classes: sizeClass 1 (smallest) – 6 (largest) ---- */
.lks_size1 { font-size: 0.80rem; }
.lks_size2 { font-size: 1.00rem; }
.lks_size3 { font-size: 1.25rem; }
.lks_size4 { font-size: 1.55rem; font-weight: 600; }
.lks_size5 { font-size: 1.90rem; font-weight: 700; }
.lks_size6 { font-size: 2.30rem; font-weight: 800; }

/* Empty-state message */
.lks_empty {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 2rem 0;
}

/* ============================================================
   Tag Articles Page  (/tag/view/{keyword})
   ============================================================ */

.lks_tag_page .page_header {
    margin-bottom: 1rem;
    border-bottom: 2px solid #e0e6ef;
    padding-bottom: 0.75rem;
}

.lks_article_count {
    color: #666;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* Article list — no default list bullets */
.lks_article_list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.lks_article_item {
    padding: 1.25rem 0;
    border-bottom: 1px solid #e8ecf0;
}

.lks_article_item:last-child {
    border-bottom: none;
}

.lks_article_title {
    font-size: 1.1rem;
    margin: 0 0 0.3rem;
}

.lks_article_title a {
    color: #1a4a8a;
    text-decoration: none;
}

.lks_article_title a:hover {
    text-decoration: underline;
}

.lks_article_authors {
    font-size: 0.9rem;
    color: #444;
    margin: 0.2rem 0;
}

.lks_article_authors .label {
    font-weight: 600;
    margin-right: 0.3em;
}

.lks_article_abstract {
    font-size: 0.88rem;
    color: #555;
    margin: 0.4rem 0 0.3rem;
    line-height: 1.55;
}

.lks_article_meta {
    font-size: 0.82rem;
    color: #888;
    margin-top: 0.35rem;
}

/* ============================================================
   Pagination
   ============================================================ */

.lks_pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 2rem 0 1rem;
    justify-content: center;
}

.lks_page_link,
.lks_page_current {
    display: inline-block;
    min-width: 2.2rem;
    padding: 0.35rem 0.6rem;
    text-align: center;
    border: 1px solid #c8d4e3;
    border-radius: 0.3rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.lks_page_link {
    background: #fff;
    color: #1a4a8a;
    text-decoration: none;
    transition: background 0.12s ease;
}

.lks_page_link:hover,
.lks_page_link:focus {
    background: #eef2f7;
    border-color: #1a4a8a;
    text-decoration: none;
}

.lks_page_current {
    background: #1a4a8a;
    color: #fff;
    border-color: #1a4a8a;
    font-weight: 700;
    cursor: default;
}

.lks_page_prev,
.lks_page_next {
    min-width: auto;
    padding: 0.35rem 0.85rem;
}

/* ============================================================
   Back-link
   ============================================================ */

.lks_back_link {
    margin: 1.5rem 0 0.5rem;
}

.lks_back_link a {
    color: #1a4a8a;
    font-size: 0.9rem;
    text-decoration: none;
}

.lks_back_link a:hover {
    text-decoration: underline;
}

/* ============================================================
   Responsive tweaks
   ============================================================ */

@media (max-width: 600px) {
    .lks_tag_cloud {
        justify-content: flex-start;
    }

    .lks_size5 { font-size: 1.55rem; }
    .lks_size6 { font-size: 1.85rem; }
}
