/* ============================================================
   NLA Journal — Shared Design Tokens & Base Styles
   Loaded by both public and admin layouts.
   ============================================================ */

:root {
    /* Brand (overridden per journal via inline :root in layout headers) */
    --primary: #1a56db;
    --primary-dark: #1e429f;
    --secondary: #6875f5;
    --accent: #c9a227;

    --success: #0e9f6e;
    --warning: #c27803;
    --danger: #e02424;

    --surface: #ffffff;
    --surface-alt: #f9fafb;
    --border: #e5e7eb;

    --text-primary: #111928;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    --radius: 0.75rem;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);

    /* Direction support (LTR default) */
    --direction: ltr;
    --text-align: left;
    --text-align-opposite: right;

    /* Admin shell */
    --sidebar-width: 260px;
    --sidebar-bg: #1e293b;
    --sidebar-text: #cbd5e1;
    --sidebar-hover: #334155;
    --sidebar-border: #334155;
    --sidebar-muted: #94a3b8;
    --sidebar-subnav-text: #d1dae6;
    --sidebar-section-text: #b8c4d4;
    --sidebar-brand-text: #ffffff;
    --sidebar-hover-text: #ffffff;
    --admin-panel-bg: #f9fafb;
    --admin-panel-text: #111928;
    --admin-topbar-height: 60px;
}

/* RTL Support */
html[dir="rtl"] {
    direction: rtl;
}

body[dir="rtl"] {
    text-align: right;
}

/* Auto-detect RTL languages (Hausa, Igbo, Yoruba may need RTL) */
html[dir="auto"] {
    direction: auto;
}

[dir="rtl"] .sidebar {
    right: 0;
    left: auto;
}

[dir="rtl"] .nav-item::before {
    margin-right: 0;
    margin-left: 8px;
}

[dir="rtl"] .card-body {
    text-align: right;
}

[dir="rtl"] .flex-row {
    flex-direction: row-reverse;
}

/* Accessibility */
.skip-link {
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    font-size: 15px;
}
h1, h2, h3, h4, h5 { font-family: 'Merriweather', serif; }
a { color: var(--primary); }
p { margin: 0; }

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: #fff;
    padding: 8px 16px;
    z-index: 2000;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}
.skip-link:focus {
    top: 0;
}

/* Utility: brand-icon fallback size */
.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
}

/* Utility: logo image sizing (replaces inline style="height:40px;width:auto;border-radius:8px;") */
.journal-logo {
    height: var(--journal-logo-height, 40px);
    width: auto;
    border-radius: 8px;
    flex-shrink: 0;
    max-height: var(--journal-logo-max-height, 48px);
    object-fit: contain;
}

/* Current issue hero card — print back cover or fallback icon */
.current-issue-card {
    background: rgba(255, 255, 255, .1);
    border-radius: 1rem;
    padding: 2rem;
    backdrop-filter: blur(8px);
    text-align: center;
}
.current-issue-card-media {
    line-height: 0;
}
.current-issue-card-body {
    min-width: 0;
    margin-top: .75rem;
}
.pub-hero-home .current-issue-card-body {
    margin-top: 0;
}
.current-issue-card .current-issue-icon {
    font-size: 5rem;
    opacity: .9;
}
.current-issue-card-kicker {
    font-size: .8rem;
    color: rgba(255, 255, 255, .65);
}
.current-issue-card-volume {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}
.current-issue-card-subtitle {
    font-size: .85rem;
    color: rgba(255, 255, 255, .78);
}
.current-issue-card-cta {
    font-size: .8rem;
    color: rgba(255, 255, 255, .6);
}
.current-issue-card-link:hover .current-issue-card-cta {
    color: #fff;
}
.issue-back-cover {
    max-height: var(--issue-cover-height, 140px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: .5rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}
.issue-cover-thumb {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: .5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.journal-publication-strip {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: .75rem;
    padding: .85rem 1rem;
}
.journal-publication-strip-link {
    display: block;
    color: #fff;
}
.journal-publication-strip-kicker {
    display: block;
    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    opacity: .85;
    margin-bottom: .15rem;
}
.journal-publication-strip-label {
    display: block;
    font-size: 1.05rem;
    line-height: 1.3;
}
.journal-publication-strip-title {
    display: block;
    font-size: .85rem;
    opacity: .9;
    margin-top: .2rem;
}
.journal-publication-strip-cta {
    display: inline-block;
    font-size: .8rem;
    margin-top: .45rem;
    opacity: .95;
}

/* Utility: stat icon color (replaces inline style="color:#1e3a5f") */
.stat-icon {
    color: #1e3a5f;
}

/* Utility: KPI card icon container */
.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* Utility: brand dark color (matches default --primary-dark) */
.text-brand-dark { color: #1e3a5f; }

/* ============================================================
   RTL Support
   ============================================================ */

html[dir="rtl"] {
    direction: rtl;
}

[dir="rtl"] body {
    text-align: right;
}

[dir="rtl"] .sidebar {
    right: 0;
    left: auto;
    transform: translateX(0);
}

[dir="rtl"] .sidebar.collapsed {
    transform: translateX(260px);
}

[dir="rtl"] .sidebar-overlay {
    left: auto;
    right: 0;
}

[dir="rtl"] .nav-item::before {
    margin-right: 0;
    margin-left: 8px;
}

[dir="rtl"] .nav-link::after {
    right: auto;
    left: -12px;
}

[dir="rtl"] .card-body {
    text-align: right;
}

[dir="rtl"] .flex-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .article-meta {
    direction: rtl;
}

[dir="rtl"] .citation-list {
    direction: rtl;
}

[dir="rtl"] .search-filters {
    direction: rtl;
}

[dir="rtl"] .stat-card {
    direction: rtl;
}

[dir="rtl"] .admin-table {
    direction: rtl;
}

[dir="rtl"] .admin-form .form-group {
    direction: rtl;
}

[dir="rtl"] .admin-form .form-group label {
    text-align: right;
}

[dir="rtl"] .admin-form .form-control {
    text-align: right;
}

[dir="rtl"] .admin-form .select2-selection__choice {
    direction: rtl;
}

[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    content: "\f104";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

[dir="rtl"] .pagination .page-link {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

[dir="rtl"] .btn-group .btn {
    border-radius: 0.375rem;
}

[dir="rtl"] .modal-footer {
    flex-direction: row-reverse;
}

[dir="rtl"] .tab-content {
    direction: rtl;
}

[dir="rtl"] .table th:first-child,
[dir="rtl"] .table td:first-child {
    text-align: right;
}

[dir="rtl"] .table th:last-child,
[dir="rtl"] .table td:last-child {
    text-align: left;
}

/* Print styles */
@media print {
    .sidebar, .admin-topbar, .nav, .btn-group, .alert-dismissible {
        display: none !important;
    }
    .container { max-width: 100%; }
    article { page-break-inside: avoid; }
}
