/*
 * sacj_overrides.css
 * Loaded after pkp.css (and font-awesome.css) to fix broken Font Awesome glyphs
 * that render as empty boxes because the webfont binaries are not present.
 *
 * Strategy
 * --------
 * 1. Suppress the content of every ::before / ::after pseudo-element that was
 *    drawing a Font Awesome icon. Setting content:"" hides the box.
 * 2. Replace the few visually meaningful icons with plain-text equivalents so
 *    the UI still communicates intent without any font dependency.
 * 3. Style the dedicated search page so it looks consistent with the site.
 */

/* =========================================================
   1. Remove broken Font Awesome glyphs (render as nothing)
   ========================================================= */

/* Galley / PDF download buttons */
.obj_galley_link::before,
.obj_galley_link::after,
.obj_galley_link.pdf::before,
.obj_galley_link.restricted::before,
.obj_galley_link_supplementary::before,
.obj_galley_link_supplementary::after { content: "" !important; display: none !important; }

/* Announcement date/read-more arrows */
.obj_announcement_full .date::before,
.obj_announcement_summary .date::before,
.obj_announcement_summary .read_more::after { content: "" !important; display: none !important; }

/* Pagination arrows */
.cmp_pagination .prev::before,
.cmp_pagination .next::after { content: "" !important; display: none !important; }

/* Edit link pencil */
.cmp_edit_link::before { content: "" !important; display: none !important; }

/* Header view return/download */
.header_view .return::before,
.header_view .download::before { content: "" !important; display: none !important; }

/* Citation format button */
.obj_article_details .citation_display .citation_formats_button::after { content: "" !important; display: none !important; }

/* Search bar prompt/cancel icons */
.pkp_search .search_prompt::before,
.pkp_search .search_cancel::before { content: "" !important; display: none !important; }

/* Current-issue "read more" arrow */
.pkp_page_index .current_issue .read_more::after { content: "" !important; display: none !important; }

/* Uploaded file summary icons */
.pkp_uploadedFile_summary .details > span::before,
.pkp_uploadedFile_summary .print::before { content: "" !important; display: none !important; }


/* =========================================================
   2. Replace meaningful icons with clean text equivalents
   ========================================================= */

/* PDF galley button: show "PDF" text via pseudo, no font needed.
   The button already has its label text as child text, so we just
   ensure there is no leading box. The text/emoji from the template
   is sufficient — nothing extra added here. */

/* Pagination: replace broken arrows with ASCII */
.cmp_pagination .prev::before {
    content: "\2190 " !important; /* ← */
    display: inline !important;
    font: inherit !important;
}
.cmp_pagination .next::after {
    content: " \2192" !important; /* → */
    display: inline !important;
    font: inherit !important;
}

/* Announcement date: prefix with a calendar character */
.obj_announcement_full .date::before,
.obj_announcement_summary .date::before {
    content: "\1F4C5 " !important; /* 📅 */
    display: inline !important;
    font: inherit !important;
    font-size: 0.9em !important;
}

/* Read more: suffix with a right arrow */
.obj_announcement_summary .read_more::after,
.pkp_page_index .current_issue .read_more::after {
    content: " \2192" !important; /* → */
    display: inline !important;
    font: inherit !important;
}


/* =========================================================
   3. Search page — styled to match the site
   ========================================================= */

/* Override .cmp_form max-width for the dedicated search page so the input
   stretches properly and looks intentional, not like a bare <input>. */
.page_search .cmp_form {
    margin: 0 0 30px;
}

.page_search .cmp_form .search_input {
    display: flex;
    align-items: stretch;
    gap: 0;
    max-width: 600px;
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Override pkp.css max-width: 20em on this input */
.page_search .cmp_form .search_input input[type="text"],
.page_search .cmp_form .search_input input#query {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none !important;
    height: 42px;
    padding: 0 14px;
    border: none !important;
    border-radius: 0 !important;
    font-size: 15px;
    background: #fff;
    color: rgba(0,0,0,0.87);
    box-shadow: none !important;
    outline: none;
}

.page_search .cmp_form .search_input input[type="text"]:focus,
.page_search .cmp_form .search_input input#query:focus {
    background: #fff;
}

.page_search .cmp_form .search_input button[type="submit"] {
    flex: 0 0 auto;
    padding: 0 22px;
    height: 42px;
    background: #1c3e6e;
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 700;
    font-family: "Montserrat", sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    /* reset pkp.css button styles */
    box-shadow: none;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.page_search .cmp_form .search_input button[type="submit"]:hover,
.page_search .cmp_form .search_input button[type="submit"]:focus {
    background: #14305a;
}

.page_search .cmp_form .search_input button[type="submit"]::before {
    content: "\1F50D"; /* 🔍 */
    font-size: 1em;
    font-style: normal;
}

/* Search results */
.page_search .search_results {
    margin-top: 10px;
}

.page_search .search_results h2 {
    font-size: 1rem;
    color: rgba(0,0,0,0.54);
    font-weight: 400;
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.page_search .cmp_article_list .obj_article_summary .title a {
    font-size: 1rem;
    color: #1c3e6e;
}

.page_search .search_no_results {
    color: rgba(0,0,0,0.54);
    font-style: italic;
    margin-top: 20px;
}

/* =========================================================
   4. Information pages — minor table styling
   ========================================================= */
.page_information .information_content h2 {
    margin-top: 30px;
}
.page_information .journal_details_table {
    width: auto;
    border-collapse: collapse;
    margin: 10px 0 20px;
    font-size: 0.9rem;
}
.page_information .journal_details_table th,
.page_information .journal_details_table td {
    padding: 6px 14px 6px 0;
    vertical-align: top;
    border-bottom: 1px solid #eee;
    text-align: left;
}
.page_information .journal_details_table th {
    font-weight: 700;
    color: rgba(0,0,0,0.7);
    white-space: nowrap;
    padding-right: 20px;
}
