/* Default supplies Qaumiyyah's colours, typography and responsive navigation.
   Additional presentation is kept in this child theme. */

/* Original Qaumiyyah journal stylesheet, also used by the legacy .hover HTML.
   @double from the old LESS rule is 1.43rem in the official Default Theme. */
.hover {
    width: 100%;
    border-collapse: collapse;
}
.hover th {
    height: 30px;
    background: #371806;
    color: #ffffff;
}
.hover td {
    height: 30px;
    padding-top: 3px;
    vertical-align: middle;
    border-bottom: 1px solid #ffffff;
    text-align: center;
}
.hover td a { width: 100%; display: block; }
.hover tr { background: #71320e; color: #ffffff; }
.hover tr:hover { background-color: #371806; }
.hover tr a { color: #ffffff; }
.pkp_structure_footer { display: flow-root; }
.pkp_footer_content {
    float: left;
    width: 50%;
    padding-top: 10px;
    padding-bottom: 10px;
}
.pkp_brand_footer {
    float: right;
    width: 30%;
    padding-top: 50px;
    padding-bottom: 10px;
}
.pkp_structure_footer_wrapper {
    background: #e8ebef;
    border-bottom: 1.43rem solid #1c0210;
}

/* OJS uses Font Awesome 4's .fa icons. Font Awesome 5 is available through
   .fas, .far and .fab without replacing the font used by existing OJS icons. */
.fa:not(.fas):not(.far):not(.fab) {
    font-family: FontAwesome;
    font-weight: normal;
}
.obj_article_summary .qaumiyyah_doi,
.obj_article_summary .qaumiyyah_usage {
    font-size: 14px;
    line-height: 20px;
    overflow-wrap: anywhere;
}
.obj_article_summary .qaumiyyah_doi img,
.obj_article_summary .qaumiyyah_usage img {
    display: inline-block;
    max-width: 20px;
    height: auto;
    vertical-align: middle;
}
.obj_article_summary .qaumiyyah_doi { margin-top: 4px; }
.obj_article_summary .qaumiyyah_downloads {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    margin-top: 10px;
}
.obj_article_summary .qaumiyyah_downloads .galleys_links {
    margin-top: 0;
    margin-bottom: 0;
    flex-wrap: wrap;
}
.obj_article_summary .qaumiyyah_usage { margin-top: 0; }

/* Preserve the vertical logo spacing of Qaumiyyah's previous Default Theme. */
@media (min-width: 992px) {
    .pkp_site_name .is_img { margin-top: 10px; margin-bottom: 10px; }
}

/* Homepage presentation: existing journal content, no additional widgets. */
.qaumiyyah_home .homepage_about {
    padding: 0;
    margin-bottom: 32px;
}
.qaumiyyah_home .homepage_about > h2 {
    margin: 0 0 16px;
    padding: 0 0 10px;
    border-bottom: 1px solid #cbb9a6;
    color: #371708;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.5;
}
.qaumiyyah_home .additional_content {
    display: flow-root;
    margin: 0 0 32px;
    padding: 0;
    border-top: 0;
    font-size: 14px;
    line-height: 1.8;
}
.qaumiyyah_home .additional_content > p:first-child img {
    float: left;
    width: 190px;
    max-width: 40%;
    height: auto;
    margin: 0 24px 16px 0;
}
.qaumiyyah_home .additional_content > p {
    margin: 0 0 16px;
}
.qaumiyyah_home .additional_content pre.tw-data-text {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    white-space: normal;
    font: inherit;
}
.qaumiyyah_home .additional_content > pre + p {
    clear: both;
    margin-bottom: 6px;
    padding-top: 16px;
    border-top: 1px solid #e5ddd5;
    color: #371708;
}
.qaumiyyah_home .current_issue > h2 {
    display: inline-block;
    margin: 0 0 16px;
    padding: 0 0 8px;
    border-bottom: 3px solid #8b5e36;
    color: #371708;
    font-size: 18px;
    line-height: 1.4;
}
.qaumiyyah_home .current_issue_title {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.5;
}
.qaumiyyah_home .obj_issue_toc > .heading {
    display: flow-root;
    font-size: 13px;
    line-height: 1.7;
}
.qaumiyyah_home .obj_issue_toc > .heading .cover {
    float: left;
    width: 110px;
    margin: 0 20px 0 0;
}
.qaumiyyah_home .obj_issue_toc > .heading .cover img {
    max-width: 100%;
    max-height: 170px;
    width: auto;
    height: auto;
}
.qaumiyyah_home .obj_issue_toc > .heading .pub_id,
.qaumiyyah_home .obj_issue_toc > .heading .published {
    margin: 0 0 12px;
    overflow-wrap: anywhere;
}
.qaumiyyah_home .obj_issue_toc .sections {
    margin-top: 24px;
}
.qaumiyyah_home .obj_issue_toc .section {
    margin: 0 0 24px;
    padding: 0;
}
.qaumiyyah_home .obj_issue_toc .section::before {
    display: none;
}
.qaumiyyah_home .obj_issue_toc .section > h3 {
    position: static;
    display: block;
    margin: 0;
    padding: 0 0 10px;
    border-bottom: 1px solid #cbb9a6;
    background: transparent;
    color: #371708;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
}
.qaumiyyah_home .obj_issue_toc .articles {
    margin: 0;
    padding: 0;
}
.qaumiyyah_home .obj_issue_toc .articles > li {
    margin: 0;
    padding: 20px 0;
    border-bottom: 1px solid #e5ddd5;
}
.qaumiyyah_home .obj_issue_toc .articles > li:last-child {
    border-bottom: 0;
}
.qaumiyyah_home .obj_article_summary .title {
    font-size: 15px;
    line-height: 1.55;
}
.qaumiyyah_home .obj_article_summary .title a {
    color: #371708;
}
.qaumiyyah_home .obj_article_summary .title a:hover,
.qaumiyyah_home .obj_article_summary .title a:focus {
    text-decoration: underline;
}
.qaumiyyah_home .obj_article_summary .meta {
    margin-top: 5px;
    color: #5d554f;
    font-size: 12px;
    line-height: 1.7;
}
.qaumiyyah_home .obj_article_summary .qaumiyyah_doi,
.qaumiyyah_home .obj_article_summary .qaumiyyah_usage {
    font-size: 12px;
    line-height: 1.7;
}
.qaumiyyah_home .qaumiyyah_doi img,
.qaumiyyah_home .qaumiyyah_usage img {
    max-width: 17px;
}
.qaumiyyah_home .obj_galley_link {
    border-color: #8b5e36;
    color: #633819;
}
.qaumiyyah_home .obj_galley_link:hover,
.qaumiyyah_home .obj_galley_link:focus {
    border-color: #633819;
    background: #633819;
    color: #fff;
}
@media (max-width: 600px) {
    .qaumiyyah_home .additional_content > p:first-child img {
        float: none;
        display: block;
        width: 180px;
        max-width: 100%;
        margin: 0 auto 20px;
    }
    .qaumiyyah_home .obj_issue_toc > .heading .cover {
        width: 88px;
        margin-right: 14px;
    }
}

/* Adapted from the supplied DeeJournal identity layout for Qaumiyyah's HTML.
   Colours and fonts follow Qaumiyyah, not DeeJournal's global palette. */
.qaumiyyah-wrapper {
    margin-top: 6px;
    max-width: 100%;
}
.qaumiyyah-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.qaumiyyah-cover {
    flex: 0 0 165px;
    min-width: 0;
}
.qaumiyyah-cover img {
    display: block;
    width: 165px;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}
.qaumiyyah-identity {
    flex: 1;
    min-width: 0;
}
.qaumiyyah-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 8px 0;
    border-bottom: 1px dotted #e5ddd5;
    font-size: 13px;
    line-height: 1.6;
}
.qaumiyyah-row:last-child { border-bottom: 0; }
.qaumiyyah-label {
    flex: 0 0 160px;
    font-weight: 700;
}
.qaumiyyah-value {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}
.qaumiyyah-value strong { color: #371708; }
.qaumiyyah-value a {
    color: inherit;
    text-decoration: none;
}
.qaumiyyah-value a:hover,
.qaumiyyah-value a:focus { text-decoration: underline; }
.qaumiyyah-long-description {
    margin-top: 18px;
    padding-top: 14px;
    font-size: 14px;
    line-height: 1.8;
    text-align: justify;
    overflow-wrap: break-word;
}
.qaumiyyah-long-description p,
.qaumiyyah-long-description > div {
    margin: 0 0 12px;
    font-size: inherit;
    line-height: inherit;
    text-align: inherit;
}
.qaumiyyah-long-description .list { margin-left: 18px; }

/* The existing Qaumiyyah custom blocks retain their original .hover colours. */
.pkp_structure_sidebar .block_custom {
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
}
.pkp_structure_sidebar .block_custom img {
    max-width: 100%;
    height: auto;
}

@media (min-width: 561px) and (max-width: 1023px) {
    .qaumiyyah-box { gap: 16px; }
    .qaumiyyah-cover { flex-basis: 145px; }
    .qaumiyyah-cover img { width: 145px; }
    .qaumiyyah-label { flex-basis: 145px; }
    .qaumiyyah-row { gap: 12px; padding: 7px 0; }
}
@media (min-width: 561px) and (max-width: 768px) {
    .qaumiyyah-cover { flex-basis: 115px; }
    .qaumiyyah-cover img { width: 115px; }
    .qaumiyyah-label { flex-basis: 130px; }
    .qaumiyyah-row { gap: 10px; padding: 6px 0; }
}
@media (max-width: 768px) {
    .pkp_structure_footer .pkp_footer_content,
    .pkp_structure_footer .pkp_brand_footer {
        float: none;
        width: 100%;
        padding-top: 10px;
        padding-bottom: 10px;
    }
}
@media (max-width: 560px) {
    .qaumiyyah-box { flex-direction: column; gap: 14px; }
    .qaumiyyah-cover { flex: none; width: 100%; }
    .qaumiyyah-cover img { width: 130px; margin: 0 auto; }
    .qaumiyyah-identity { width: 100%; }
    .qaumiyyah-row { display: block; padding: 6px 0; font-size: 13px; }
    .qaumiyyah-label { margin-bottom: 2px; }
    .qaumiyyah-long-description {
        margin-top: 14px;
        padding-top: 8px;
        font-size: 13px;
        line-height: 1.7;
        text-align: left;
    }
}


/* Article lists: DeeJournal's arrangement with Qaumiyyah's palette and metadata. */
.qaumiyyah_article .qaumiyyah_authors { display: block; }
.qaumiyyah_article .qaumiyyah_author { display: block; line-height: 1.65; }
.qaumiyyah_article .qaumiyyah_author > .fas { width: 12px; margin-right: 4px; color: #371708; }
.qaumiyyah_article .qaumiyyah_author strong { font-weight: 700; color: #371708; }
.qaumiyyah_article .qaumiyyah_author_country { white-space: nowrap; }
.qaumiyyah_article .qaumiyyah_author_flag {
    display: inline-block; width: 16px; height: 12px; max-width: none;
    margin-left: 5px; vertical-align: -1px; object-fit: cover; border: 0;
}
.qaumiyyah_article .qaumiyyah_doi { margin: 7px 0 0; }
.qaumiyyah_article .qaumiyyah_doi img { width: 16px; height: 16px; margin-right: 3px; }
.qaumiyyah_article .qaumiyyah_article_footer {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 8px 14px; margin-top: 10px; font-size: 12px; line-height: 1.5;
}
.qaumiyyah_article .qaumiyyah_article_footer .galleys_links {
    display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none;
}
.qaumiyyah_article .qaumiyyah_article_footer .galleys_links > li { margin: 0; padding: 0; }
.qaumiyyah_home .qaumiyyah_article .obj_galley_link,
.qaumiyyah_article .obj_galley_link {
    display: inline-flex; align-items: center; padding: 5px 10px; min-height: 30px;
    border: 1px solid #633819; border-radius: 9px; background: #633819;
    color: #fff; font-size: 12px; font-weight: 700; line-height: 18px; text-decoration: none;
}
.qaumiyyah_home .qaumiyyah_article .obj_galley_link:hover,
.qaumiyyah_article .obj_galley_link:hover,
.qaumiyyah_article .obj_galley_link:focus { background: #371708; border-color: #371708; color: #fff; }
.qaumiyyah_article .obj_galley_link.pdf { text-transform: uppercase; }
.qaumiyyah_article .obj_galley_link.pdf::before {
    content: "\f1c1"; font-family: "Font Awesome 5 Free"; font-weight: 900; margin-right: 5px;
}
.qaumiyyah_article .qaumiyyah_usage {
    display: inline-flex; align-items: center; flex-wrap: wrap; gap: 7px 13px;
    margin: 0; font-size: 12px; line-height: 1.5; color: #371708;
}
.qaumiyyah_article .qaumiyyah_stat { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.qaumiyyah_article .qaumiyyah_citations { display: inline-flex; align-items: center; min-height: 23px; }
.qaumiyyah_article .qaumiyyah_citation_fallback { font-size: 12px; color: #633819; }
.qaumiyyah_has_citation_badge .qaumiyyah_citation_fallback { display: none; }
.qaumiyyah_article .__dimensions_badge_embed__ { display: inline-block; vertical-align: middle; }
.qaumiyyah_article .qaumiyyah_article_pages { margin-left: auto; font-size: 12px; font-weight: 700; color: #371708; white-space: nowrap; }

/* Icons follow each destination, so reordering a menu keeps the correct icon. */
#navigationPrimary a::before,
#customblock-sidebar .hover td > a::before {
    content: var(--qaumiyyah-menu-icon, "\f0c1") / "";
    display: inline-block; width: 16px; margin-right: 7px; text-align: center;
    font-family: "Font Awesome 5 Free"; font-style: normal; font-weight: 900;
    font-variant: normal; line-height: 1; text-rendering: auto; -webkit-font-smoothing: antialiased;
}
#navigationPrimary a[href$="/qaumiyyah"],
#navigationPrimary a[href$="/qaumiyyah/"],
#navigationPrimary a[href$="/qaumiyyah/index"] { --qaumiyyah-menu-icon: "\f015"; }
#navigationPrimary a[href$="/issue/current"] { --qaumiyyah-menu-icon: "\f518"; }
#navigationPrimary a[href$="/issue/archive"] { --qaumiyyah-menu-icon: "\f187"; }
#navigationPrimary a[href$="/announcement"] { --qaumiyyah-menu-icon: "\f0a1"; }
#navigationPrimary a[href$="/about/editorialMasthead"] { --qaumiyyah-menu-icon: "\f0c0"; }
#navigationPrimary a[href$="/reviewerqaumiyyah"],
#customblock-sidebar a[href$="/reviewer"] { --qaumiyyah-menu-icon: "\f4fc"; }
#navigationPrimary a[href$="/about/contact"],
#customblock-sidebar a[href$="/about/contact"] { --qaumiyyah-menu-icon: "\f0e0"; }
#navigationPrimary a[href$="/about/submissions"],
#customblock-sidebar a[href$="/about/submissions"] { --qaumiyyah-menu-icon: "\f093"; }
#customblock-sidebar a[href$="/focusandscope"] { --qaumiyyah-menu-icon: "\f140"; }
#customblock-sidebar a[href$="/types-of-manuscript"] { --qaumiyyah-menu-icon: "\f15c"; }
#customblock-sidebar a[href$="/publishing-schedule"] { --qaumiyyah-menu-icon: "\f073"; }
#customblock-sidebar a[href$="/authorguidelines"] { --qaumiyyah-menu-icon: "\f5ad"; }
#customblock-sidebar a[href$="/authorship-criteria"] { --qaumiyyah-menu-icon: "\f4ff"; }
#customblock-sidebar a[href$="/review-process-policy"] { --qaumiyyah-menu-icon: "\f2f1"; }
#customblock-sidebar a[href$="/APC"] { --qaumiyyah-menu-icon: "\f53a"; }
#customblock-sidebar a[href$="/access-policy"] { --qaumiyyah-menu-icon: "\f3c1"; }
#customblock-sidebar a[href$="/copyright"] { --qaumiyyah-menu-icon: "\f1f9"; }
#customblock-sidebar a[href$="/license"] { --qaumiyyah-menu-icon: "\f56c"; }
#customblock-sidebar a[href$="/electronic-archiving"] { --qaumiyyah-menu-icon: "\f1c0"; }
#customblock-sidebar a[href$="/publicationethics"] { --qaumiyyah-menu-icon: "\f24e"; }
#customblock-sidebar a[href$="/plagiarims"] { --qaumiyyah-menu-icon: "\f002"; }
#customblock-sidebar a[href$="/allegation-of-research-misconduct"] { --qaumiyyah-menu-icon: "\f071"; }
#customblock-sidebar a[href$="/conflict-of-interest"] { --qaumiyyah-menu-icon: "\f24e"; }
#customblock-sidebar a[href$="/post-publication-discussion"] { --qaumiyyah-menu-icon: "\f086"; }
#customblock-sidebar a[href$="/correction-and-retraction"] { --qaumiyyah-menu-icon: "\f1da"; }
#customblock-sidebar a[href$="/ownership-and-management"] { --qaumiyyah-menu-icon: "\f19c"; }
#customblock-sidebar a[href*="scholar.google.com"] { --qaumiyyah-menu-icon: "\f19d"; }

/* Only the Additional Menu table has both a heading and direct cell links. */
#customblock-sidebar table.hover:has(th):has(td > a) { border-collapse: separate; border-spacing: 0 5px; }
#customblock-sidebar table.hover:has(th):has(td > a) tr,
#customblock-sidebar table.hover:has(th):has(td > a) tr:hover { background: transparent; }
#customblock-sidebar table.hover:has(th):has(td > a) th { border-radius: 5px; padding: 5px 8px; }
#customblock-sidebar table.hover:has(th):has(td > a) td { height: auto; padding: 0; border: 0; }
#customblock-sidebar table.hover:has(th):has(td > a) td > a {
    position: relative; box-sizing: border-box; min-height: 33px;
    padding: 7px 9px 7px 35px; border: 1px solid #a56e43; border-radius: 5px;
    background: #71320e; color: #fff; text-align: left; text-decoration: none;
    font-size: 12px; font-weight: 600; line-height: 1.45;
}
#customblock-sidebar table.hover:has(th):has(td > a) td > a::before { position: absolute; left: 10px; top: 10px; margin: 0; }
#customblock-sidebar table.hover:has(th):has(td > a) td > a:hover,
#customblock-sidebar table.hover:has(th):has(td > a) td > a:focus { background: #371806; color: #f3d17a; border-color: #633819; }
@media (max-width: 560px) {
    .qaumiyyah_article .qaumiyyah_article_footer { gap: 8px 11px; }
    .qaumiyyah_article .qaumiyyah_author { line-height: 1.7; }
}
