/* ============================================================
   OJS-UK Theme — Article (submission) detail
   Reference board: left rail as one panel (figure, red Download
   PDF, outlined View PDF, DOI, How to cite, Export citation,
   Share); main column with hairline-separated sections.
   ============================================================ */

.submission-detail-container {
    padding-top: 26px;
    padding-bottom: 48px;
}

.article-labels-top {
    margin-bottom: 10px;
}

.article-labels-top .label-article {
    font-family: var(--uk-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--uk-red);
}

.submission-main-content > .article-title {
    font-family: var(--uk-serif);
    font-weight: 400;
    font-size: 33px;
    line-height: 1.3;
    color: var(--uk-ink);
    margin: 0 0 20px;
}

.submission-detail-row {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}

/* ---------- Sidebar: one bordered panel, hairline-divided ---------- */
.submission-sidebar {
    flex: 0 0 300px;
    max-width: 300px;
    border: 1px solid var(--uk-border);
    padding: 20px 22px;
}

.submission-sidebar .sidebar-block {
    background: transparent;
    border: none;
    border-top: 1px solid #dfe2e6;
    padding: 18px 0;
    margin: 0;
}

.submission-sidebar .sidebar-block:first-child {
    border-top: none;
    padding-top: 0;
}

.submission-sidebar .sidebar-block:last-child {
    padding-bottom: 0;
}

.submission-sidebar .figure-container {
    text-align: center;
}

.submission-sidebar .preview-image {
    max-width: 100%;
    height: auto;
    display: inline-block;
    border: 1px solid var(--uk-border);
}

.submission-sidebar h3 {
    font-family: var(--uk-sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--uk-ink);
    margin: 0 0 10px;
    padding: 0;
    border: none;
}

.submission-sidebar p {
    font-family: var(--uk-sans);
    font-size: 13px;
    line-height: 1.6;
    color: var(--uk-text);
    margin: 0;
    word-wrap: break-word;
}

.submission-sidebar a {
    color: var(--uk-navy);
}

.submission-sidebar a:hover {
    color: var(--uk-red);
    text-decoration: underline;
}

/* Action buttons — red solid Download PDF, outlined View PDF */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--uk-sans);
    font-size: 14px;
    font-weight: 500;
    padding: 11px 18px;
    transition: background 0.15s ease, color 0.15s ease;
}

.action-buttons .btn-download {
    background: var(--uk-red);
    border: 1px solid var(--uk-red);
    color: #fff;
}

.action-buttons .btn-download:hover {
    background: var(--uk-red-dark);
    border-color: var(--uk-red-dark);
    color: #fff;
    text-decoration: none;
}

.action-buttons .btn-view-pdf {
    background: transparent;
    border: 1px solid var(--uk-navy);
    color: var(--uk-navy);
}

.action-buttons .btn-view-pdf:hover {
    background: var(--uk-navy);
    color: #fff;
    text-decoration: none;
}

/* How to cite */
.citation-format-group {
    margin: 0 0 12px;
}

.submission-sidebar .form-control {
    width: 100%;
    height: auto;
    min-height: 34px;
    line-height: 1.5;
    border: 1px solid var(--uk-border);
    border-radius: 3px;
    font-family: var(--uk-sans);
    font-size: 11.5px;
    padding: 7px 8px;
    color: var(--uk-text);
    background: #fff;
}

.citation-text {
    font-family: var(--uk-serif) !important;
    font-size: 13.5px !important;
    line-height: 1.65 !important;
    color: var(--uk-text);
    margin: 0 0 12px !important;
}

.btn-copy-citation {
    width: 100%;
    background: transparent;
    border: 1px solid var(--uk-navy);
    border-radius: 3px;
    color: var(--uk-navy);
    font-family: var(--uk-sans);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-copy-citation:hover {
    background: var(--uk-navy);
    color: #fff;
}

/* Export citation — icon rows with chevrons */
.export-citation {
    margin-top: 18px;
    border-top: 1px solid #dfe2e6;
    padding-top: 16px;
}

.export-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 2px;
    border-bottom: 1px solid #e3e5e9;
    font-family: var(--uk-sans);
    font-size: 13px;
    color: var(--uk-navy);
}

.export-list a:last-child {
    border-bottom: none;
}

.export-list a:hover {
    color: var(--uk-red);
    text-decoration: none;
}

.export-list a span i {
    color: var(--uk-red);
    margin-right: 8px;
    width: 14px;
}

.export-list a b {
    font-weight: 400;
    font-size: 16px;
    color: #a8b1bd;
}

.export-list a:hover b {
    color: var(--uk-red);
}

.copyright-text {
    font-family: var(--uk-sans);
    font-size: 12.5px !important;
    color: var(--uk-text-muted) !important;
    line-height: 1.6;
}

/* Share icons — round navy buttons */
.share-icons {
    display: flex;
    gap: 12px;
}

.share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--uk-navy);
    color: #fff !important;
    font-size: 14px;
    transition: background 0.15s ease;
}

.share-icon:hover {
    background: var(--uk-red);
    text-decoration: none !important;
}

/* ---------- Main column ---------- */
.submission-main-content {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 0;
}

/* Authors — names inline, affiliations below */
.authors-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}

.author-name-row {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.author-name {
    font-family: var(--uk-serif);
    font-size: 17px;
    color: var(--uk-ink);
}

.author-sep {
    color: var(--uk-text-muted);
}

.author-icon-link {
    color: var(--uk-red);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
}

.author-icon-link:hover {
    color: var(--uk-red-dark);
}

.author-orcid-link img {
    display: block;
}

/* Superscript affiliation number(s) after the author name */
.author-aff-sup {
    font-family: var(--uk-sans);
    font-size: 10px;
    font-weight: 600;
    color: var(--uk-red);
    margin-left: 1px;
    vertical-align: super;
    line-height: 0;
}

/* Numbered, de-duplicated affiliation list — numbers align flush with
   the author names (no leading indent), wrapped lines hang-indent */
.affiliations-list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: aff;
}

.affiliations-list li {
    font-family: var(--uk-sans);
    font-size: 13px;
    line-height: 1.55;
    color: var(--uk-text);
    margin-bottom: 3px;
    counter-increment: aff;
    padding-left: 1.5em;
    text-indent: -1.5em;
}

.affiliations-list li::before {
    content: counter(aff) ". ";
    color: var(--uk-red);
    font-size: 11px;
}

.author-correspondence {
    font-family: var(--uk-sans);
    font-size: 13px;
    color: var(--uk-text-muted);
    margin: 8px 0 0;
}

.author-correspondence a {
    color: var(--uk-navy);
}

.author-correspondence a:hover {
    color: var(--uk-red);
    text-decoration: underline;
}

/* Legacy fallback (pre-JS render) */
.affiliations {
    margin-top: 10px;
}

.author-affiliation {
    font-family: var(--uk-sans);
    font-size: 13px;
    color: var(--uk-text);
    margin-bottom: 3px;
}

.authors-section {
    margin-bottom: 18px;
}

/* Publication dates — hairline-separated inline row */
.publication-dates {
    margin-bottom: 8px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--uk-border);
}

.dates-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 0;
}

.dates-inline .date-item {
    font-family: var(--uk-sans);
    font-size: 13px;
    color: var(--uk-text-muted);
    padding: 0 16px;
    border-right: 1px solid var(--uk-border);
}

.dates-inline .date-item:first-child {
    padding-left: 0;
}

.dates-inline .date-item:last-child {
    border-right: none;
}

.dates-inline .date-item strong {
    color: var(--uk-ink);
    font-weight: 600;
}

/* Sections — small-caps labels, hairline separators between blocks */
.submission-main-content .section-title {
    font-family: var(--uk-sans);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--uk-ink);
    margin: 0 0 14px;
    padding: 0;
    border: none;
}

.abstract-section,
.keywords-section,
.full-text-section,
.references-section {
    padding: 22px 0;
    border-bottom: 1px solid var(--uk-border);
}

.references-section {
    border-bottom: none;
}

.abstract-content,
.full-text-content {
    font-family: var(--uk-serif);
    font-size: 16px;
    line-height: 1.68;
    color: var(--uk-text);
    text-align: justify;
}

.full-text-content h1,
.full-text-content h2,
.full-text-content h3,
.full-text-content h4 {
    font-family: var(--uk-serif);
    font-weight: 600;
    color: var(--uk-ink);
    font-size: 17px;
    margin: 1.4em 0 0.6em;
}

.full-text-content img {
    max-width: 100%;
    height: auto;
}

.full-text-content a,
.abstract-content a {
    color: var(--uk-red);
    text-decoration: underline;
}

.full-text-content table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--uk-sans);
    font-size: 14px;
    margin: 16px 0;
}

.full-text-content table th,
.full-text-content table td {
    border: 1px solid var(--uk-border);
    padding: 8px 12px;
}

/* Keyword pills */
.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keyword-tag {
    font-family: var(--uk-sans);
    font-size: 13px;
    color: var(--uk-ink);
    background: transparent;
    border: 1px solid var(--uk-border);
    padding: 5px 14px;
    border-radius: 3px;
}

/* References */
/* References already carry their own numbering in the content, so
   don't add an <ol> counter — just give each entry a hanging indent
   so wrapped lines align under the text, not the number. */
.references-list {
    list-style: none;
    font-family: var(--uk-serif);
    font-size: 15px;
    line-height: 1.62;
    color: var(--uk-text);
    padding-left: 0;
    margin: 0;
}

.references-list li {
    margin-bottom: 10px;
    padding-left: 2.2em;
    text-indent: -2.2em;
}

.references-doi {
    color: var(--uk-red);
    text-decoration: underline;
    word-break: break-all;
}

/* Third-party contrimetric "Recommendations" panel — strip its white
   card styling so it blends into the page like the other sections.
   html body prefix outranks the widget's own stylesheet even though
   it loads after ours. */
html body #contrimetrics_weight,
html body .contrimetrics_weight--white-panel-bg,
html body [class*="contrimetrics_weight"] {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    border-top: 1px solid var(--uk-border) !important;
    margin-top: 26px !important;
    padding: 22px 0 0 !important;
}

html body .contrimetrics_weight--white-panel-bg > div {
    background-color: transparent !important;
}

/* ---------- Image preview modal ---------- */
.image-preview-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 35, 67, 0.88);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px;
}

.image-preview-content {
    max-width: 90%;
    max-height: 82vh;
    object-fit: contain;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.image-preview-caption {
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--uk-sans);
    font-size: 14px;
    margin-top: 14px;
}

.image-preview-close {
    position: absolute;
    top: 18px;
    right: 28px;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
}

.image-preview-close:hover {
    color: var(--uk-red);
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .submission-detail-row {
        flex-direction: column;
    }

    .submission-sidebar {
        flex: none;
        max-width: none;
        width: 100%;
        order: 2;
    }

    .submission-main-content {
        order: 1;
        width: 100%;
    }

    .submission-main-content > .article-title {
        font-size: 26px;
    }
}

@media (max-width: 640px) {
    /* Justified text opens ugly gaps on narrow screens — read better
       left-aligned */
    .abstract-content,
    .full-text-content {
        text-align: left;
    }

    .submission-sidebar {
        padding: 18px 16px;
    }

    .dates-inline .date-item {
        padding: 0 10px;
    }
}
