/*  .. use the snippet below in order to load the actuall css contained in the file xstylesj.css

<link rel="stylesheet" href="https://epub.lib.uoa.gr/public/site/xstylesj.css">
<style>
    :root {   
        --footer-bg: #1E6292; */ /* This "feeds" the color to the external file */
/*    }
</style> */

/*  <style> */

/* 1. General Layout */
#uoa_wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#uoa_footer {
    background-color: var(--footer-bg, #1E6292);
/* ...was...   background-color: #A7A9AC; */
    position: relative;
    margin-top: 40px; 
    min-height: 290px;
    width: 100%;
    clear: both;
    display: block;
    z-index: 1;
}

/* 
   2. THE UNIVERSAL PDF DETECTOR 
   This hides the footer if the PDF viewer container is present 
   ANYWHERE on the page, regardless of body classes.
*/

/* Hide footer if common OJS PDF viewer IDs or classes exist */
body:has(.obj_galley_external) #uoa_footer,
body:has(.cmp_pdf_viewer) #uoa_footer,
body:has(#pdfCanvasContainer) #uoa_footer,
body:has(iframe[src*="pdf"]) #uoa_footer {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    top: -9999px !important;
}

/* Force the PDF viewer containers to fill the screen */
.obj_galley_external,
.cmp_pdf_viewer,
.pkp_view_galley .pkp_structure_main {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999999 !important;
    background: #525659;
}

/* 3. Table-to-div logic (Your styles) */
.divTable { display: flex; flex-direction: column; width: 100%; }
.divTableRow { display: flex; width: 100%; }
.divTableCell, .divTableHead {
    flex: 1; 
    background-color: #ffffff;
    padding: 10px;
    font-size: 0.6em;
}

/* 4. Logo Constraints */
#uoa_footer .logo_uoa { width: 240px !important; height: 66px !important; }
#uoa_footer .logo_uoa_bk { width: 230px !important; height: 46px !important; }
#uoa_footer .logo_uoa_ybk { width: 100px !important; height: 37px !important; }

/* 5. Hide default OJS footer */
.pkp_structure_footer_wrapper { display: none; }

/* 6. Mobile Responsiveness */
@media (max-width: 600px) {
    #uoa_footer { height: auto; margin-top: 20px; }
    .divTableRow { flex-direction: column; }
    .divTableCell { text-align: left; width: 100%; box-sizing: border-box; }
}

/* </style> */
