/**
 * CDE header and institutional footer, measured from the supplied Figma design.
 *
 * @package local_layout_cde
 * @copyright 2026 Marcelo M. Almeida Jr.
 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
body.layout-cde-console-active { --local-layout-cde-header-height: 99px; }
body.layout-cde-console-active nav.navbar.fixed-top {
    height: var(--local-layout-cde-header-height) !important;
    min-height: var(--local-layout-cde-header-height) !important;
    padding: 0 !important; display: block !important; background: #fff !important;
    border: 0 !important; box-shadow: none !important; overflow: visible !important;
}
body.layout-cde-console-active .layout-cde-native-navbar { display: none !important; }
body.layout-cde-console-active #page { margin-top: var(--local-layout-cde-header-height) !important; }
body.layout-cde-console-active #theme_boost-drawers-blocks,
body.layout-cde-console-active #theme_boost-drawers-courseindex {
    top: var(--local-layout-cde-header-height) !important;
    height: calc(100vh - var(--local-layout-cde-header-height)) !important;
}
body.layout-cde-console-active .drawer-toggler {
    top: calc(var(--local-layout-cde-header-height) + 16px) !important; z-index: 1032;
}
#layout-cde-console-header, #layout-cde-console-footer {
    box-sizing: border-box; font-family: 'Rethink Sans', Arial, sans-serif;
}
#layout-cde-console-header *, #layout-cde-console-footer * { box-sizing: border-box; }
#layout-cde-console-header {
    width: 100%; height: var(--local-layout-cde-header-height); background: #fff; color: #000;
    border-bottom: 3px solid #c8c8b9; padding: 12px 20px;
}
#layout-cde-console-header .cde-head {
    display: grid; grid-template-columns: 127px minmax(0, 1fr) auto;
    grid-template-rows: 39px 29px; gap: 4px 20px;
    align-items: center; height: 72px; max-width: 1324px; margin: 0 auto;
}
#layout-cde-console-header .cde-brand {
    grid-column: 1; grid-row: 1 / 3; display: flex; align-items: center;
    width: 127px; height: 63px; padding-right: 19px; border-right: 1px solid #000;
}
#layout-cde-console-header .cde-brand img { display: block; width: 107px; height: 63px; object-fit: contain; }
#layout-cde-console-header .cde-title {
    grid-column: 2; grid-row: 1; font-size: 30px; font-weight: 500; line-height: 39px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
#layout-cde-console-header .cde-nav { grid-column: 2; grid-row: 2; min-width: 0; height: 29px; overflow: visible; }
#layout-cde-console-header .cde-nav .primary-navigation,
#layout-cde-console-header .cde-nav .moremenu,
#layout-cde-console-header .cde-nav .navbar-nav {
    display: flex !important; align-items: flex-start !important; gap: 20px !important;
    height: 29px !important; padding: 0 !important; margin: 0 !important; border: 0;
    overflow: visible !important; flex-wrap: nowrap;
}
#layout-cde-console-header .cde-nav .nav-item { margin: 0 !important; }
#layout-cde-console-header .cde-nav .nav-link {
    position: relative !important; height: 29px !important; padding: 4px 0 !important;
    border: 0 !important; background: transparent !important; color: #000 !important;
    font-size: 14px !important; font-weight: 500 !important; line-height: 21px !important;
    text-transform: uppercase; white-space: nowrap; box-shadow: none !important;
}
#layout-cde-console-header .cde-nav .nav-link.active::after,
#layout-cde-console-header .cde-nav .nav-link[aria-current='page']::after,
#layout-cde-console-header .cde-nav .nav-link.cde-course-active::after {
    position: absolute !important; right: 0 !important; bottom: -3px !important; left: 0 !important;
    display: block !important; height: 3px !important; width: auto !important;
    margin: 0 !important; border: 0 !important; background: #ffb52f !important; content: '' !important;
}
#layout-cde-console-header .cde-actions {
    grid-column: 3; grid-row: 1 / 3; display: flex; align-items: center;
    justify-content: flex-end; gap: 15px; min-width: 0; height: 42px;
}
#layout-cde-console-header .cde-calendar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 25px; height: 42px; padding: 0; color: #000; flex: 0 0 25px;
}
#layout-cde-console-header .cde-calendar img { display: block; width: 25px; height: 28px; }
#layout-cde-console-header .cde-notifications,
#layout-cde-console-header .cde-notifications > .popover-region,
#layout-cde-console-header .cde-notifications [data-region='popover-region-toggle'] {
    position: relative !important; display: flex; align-items: center; justify-content: center;
    width: 24px !important; height: 30px !important; padding: 0 !important;
    overflow: visible !important; background: transparent !important; border: 0 !important; box-shadow: none !important;
}
#layout-cde-console-header .cde-notifications [data-region='popover-region-toggle']::before,
#layout-cde-console-header .cde-notifications [data-region='popover-region-toggle']::after,
#layout-cde-console-header .cde-notifications [data-region='popover-region-toggle'] > .icon,
#layout-cde-console-header .cde-notifications [data-region='popover-region-toggle'] > img {
    display: none !important; content: none !important;
}
#layout-cde-console-header .cde-notification-icon { display: block; width: 24px; height: 30px; pointer-events: none; }
#layout-cde-console-header .cde-notification-icon img { display: block; width: 24px; height: 30px; max-width: none; }
#layout-cde-console-header .cde-notifications .count-container {
    position: absolute !important; z-index: 2; top: -4px !important; right: -8px !important;
    min-width: 16px; height: 16px; padding: 0 3px; border: 0; border-radius: 3px;
    box-shadow: none !important; font-size: 10px; line-height: 16px; transform: none !important;
}
#layout-cde-console-header .cde-notifications .count-container.hidden,
#layout-cde-console-header .cde-notifications .count-container[hidden],
#layout-cde-console-header .cde-notifications .count-container:empty { display: none !important; }
#layout-cde-console-header .cde-notifications .popover-region-container {
    max-width: calc(100vw - 24px); top: 42px; right: 0; left: auto;
}
#layout-cde-console-header .dropdown-menu,
#layout-cde-console-header .popover-region-container { z-index: 1060 !important; }
#layout-cde-console-header .cde-user {
    display: flex; align-items: center; height: 42px; min-width: 162px; padding-left: 20px;
    margin-left: 5px; border-left: 1px solid #000;
}
#layout-cde-console-header .cde-user .usermenu { display: flex; align-items: center; }
#layout-cde-console-header #user-menu-toggle {
    display: inline-flex !important; align-items: center; gap: 8px; padding: 0 !important;
    color: #000 !important; background: transparent !important; text-decoration: none !important;
}
#layout-cde-console-header #user-menu-toggle::after,
#layout-cde-console-header #user-menu-toggle .usertext { display: none !important; }
#layout-cde-console-header .userpicture, #layout-cde-console-header .userinitials {
    width: 40px !important; height: 40px !important; border-radius: 0 !important; object-fit: cover; margin: 0 !important;
}
#layout-cde-console-header .cde-user-name {
    display: inline-flex; flex-direction: column; width: 64px; overflow: hidden;
    font-size: 16px; font-weight: 400; line-height: 21px; text-align: left;
}
#layout-cde-console-header .cde-user-name strong { overflow: hidden; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
#layout-cde-console-header .cde-user-caret { display: block; width: 13px; height: 9px; object-fit: contain; }
/* Remove only the optional messaging entry, including its counter and wrapper space. */
body.layout-cde-console-active nav.navbar.fixed-top .cde-messages-hidden {
    display: none !important;
}
#layout-cde-console-header .cde-native-tools { display: flex; align-items: center; gap: 8px; height: 42px; min-width: 0; }
#layout-cde-console-header .cde-native-tools #usernavigation { align-items: center !important; gap: 8px; height: 100%; flex-wrap: nowrap; }
#layout-cde-console-header .cde-native-tools #usernavigation > .divider { display: none !important; }
#layout-cde-console-header .cde-native-tools form { margin-bottom: 0; }
#layout-cde-console-header .cde-native-tools .input-group { flex-wrap: nowrap; }
#layout-cde-console-header .cde-native-tools:empty,
#layout-cde-console-header .cde-notifications:empty,
#layout-cde-console-header .cde-user:empty { display: none !important; }
#layout-cde-console-header a:focus-visible,
#layout-cde-console-footer a:focus-visible { outline: 2px solid #ffb52f; outline-offset: 3px; }
/* The source's containment correction is retained to avoid clipping the footer in Boost. */
body.layout-cde-console-active #page-wrapper,
body.layout-cde-console-active #page,
body.layout-cde-console-active #page-content {
    height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important;
}
body.layout-cde-console-active #page-footer { display: none !important; }
#layout-cde-console-footer {
    display: block; position: relative; width: 100%; max-width: none; height: auto;
    margin-top: 64px; padding: 24px 0 32px; background: #000; color: #9b9583; overflow: visible;
}
#layout-cde-console-footer a { color: inherit; text-decoration: none; }
#layout-cde-console-footer .cde-footer-inner {
    display: flex; flex-direction: column; gap: 12px; width: min(1225px, calc(100% - 48px)); margin: 0 auto;
}
#layout-cde-console-footer .cde-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
#layout-cde-console-footer .cde-top { min-height: 92px; }
#layout-cde-console-footer .cde-logos { display: flex; align-items: flex-start; gap: 24px; width: 200px; height: 92px; flex: 0 0 200px; }
#layout-cde-console-footer .cde-logos img { display: block; object-fit: contain; flex: none; }
#layout-cde-console-footer .cde-image-pucfooter { width: 55px; height: 92px; }
#layout-cde-console-footer .cde-image-jesuitas { width: 50px; height: 50px; }
#layout-cde-console-footer .cde-image-arquidiocese { width: 47px; height: 50px; }
#layout-cde-console-footer .cde-menu {
    display: flex; align-items: center; justify-content: space-between; gap: 30px; width: 814px;
    color: #f5f5f0; font-size: 18px; font-weight: 700; line-height: 24px; letter-spacing: .36px; text-align: center;
}
#layout-cde-console-footer .cde-menu a { flex-shrink: 0; }
#layout-cde-console-footer .cde-rule { position: relative; width: 100%; height: 0; flex: 0 0 0; }
#layout-cde-console-footer .cde-rule img { position: absolute; top: 0; left: 0; display: block; width: 100%; height: 1px; }
#layout-cde-console-footer .cde-contact { min-height: 119px; font-size: 14px; line-height: 18.676px; letter-spacing: .28px; }
#layout-cde-console-footer .cde-contact > div:first-child { width: 440px; }
#layout-cde-console-footer .cde-contact > div:nth-child(2) { width: 310px; }
#layout-cde-console-footer .cde-contact strong { display: block; margin-bottom: 10px; color: #9b9583; font-weight: 700; }
#layout-cde-console-footer .cde-contact a { color: #fff; text-decoration: underline; }
#layout-cde-console-footer .cde-emec { display: block; width: 201px; height: 119px; flex: 0 0 201px; }
#layout-cde-console-footer .cde-emec img { display: block; width: 201px; height: 119px; object-fit: contain; }
#layout-cde-console-footer .cde-emec-placeholder { display: flex; width: 201px; height: 119px; align-items: center; text-align: center; padding: 12px; border: 1px solid #9b9583; }
#layout-cde-console-footer .cde-partners { display: flex; align-items: center; justify-content: space-between; width: 776px; max-width: 100%; height: 47px; margin: 0 auto; }
#layout-cde-console-footer .cde-partners img { display: block; object-fit: contain; }
#layout-cde-console-footer .cde-image-ausjal { width: 91px; height: 45px; }
#layout-cde-console-footer .cde-image-rederio { width: 94px; height: 47px; }
#layout-cde-console-footer .cde-image-periodicos { width: 111px; height: 28px; }
#layout-cde-console-footer .cde-image-financiar { width: 134px; height: 27px; }
#layout-cde-console-footer .cde-bottom { min-height: 28.7px; font-size: 11px; line-height: 18px; letter-spacing: .22px; }
#layout-cde-console-footer .cde-social { display: flex; gap: 30px; width: 245px; height: 25px; flex: 0 0 245px; }
#layout-cde-console-footer .cde-social img { display: block; width: 25px; height: 25px; }
#layout-cde-console-footer .cde-privacy { color: #fff; font-size: 13px; line-height: 17.342px; letter-spacing: .26px; text-decoration: underline; }
@media (max-width: 1199px) {
    #layout-cde-console-footer .cde-top { flex-wrap: wrap; align-items: flex-start; gap: 24px; }
    #layout-cde-console-footer .cde-menu { width: 100%; flex-wrap: wrap; justify-content: flex-start; text-align: left; }
    #layout-cde-console-footer .cde-contact > div:first-child,
    #layout-cde-console-footer .cde-contact > div:nth-child(2) { width: auto; flex: 1; }
    #layout-cde-console-footer .cde-bottom { flex-wrap: wrap; }
    #layout-cde-console-header .cde-native-tools .simplesearchform { display: none; }
}
@media (max-width: 780px) {
    body.layout-cde-console-active { --local-layout-cde-header-height: 156px; }
    #layout-cde-console-header { padding: 10px 16px; }
    #layout-cde-console-header .cde-head { grid-template-columns: 88px minmax(0, 1fr); grid-template-rows: 48px 29px 42px; gap: 8px 12px; height: 135px; }
    #layout-cde-console-header .cde-brand { grid-row: 1; width: 88px; height: 44px; padding-right: 12px; }
    #layout-cde-console-header .cde-brand img { width: 74px; height: 44px; }
    #layout-cde-console-header .cde-title { grid-row: 1; grid-column: 2; font-size: 24px; line-height: 31px; }
    #layout-cde-console-header .cde-nav { grid-row: 2; grid-column: 1 / 3; }
    #layout-cde-console-header .cde-actions { grid-row: 3; grid-column: 1 / 3; width: 100%; }
    #layout-cde-console-header .cde-native-tools { margin-right: auto; gap: 4px; }
    #layout-cde-console-header .cde-user { min-width: 0; }
    #layout-cde-console-header .cde-notifications .popover-region-container { position: fixed !important; top: 156px !important; right: 12px !important; }
    #layout-cde-console-footer .cde-footer-inner { width: calc(100% - 32px); gap: 20px; }
    #layout-cde-console-footer .cde-row { flex-direction: column; align-items: flex-start; gap: 24px; }
    #layout-cde-console-footer .cde-contact > div { width: 100% !important; flex: auto !important; }
    #layout-cde-console-footer .cde-logos,
    #layout-cde-console-footer .cde-emec,
    #layout-cde-console-footer .cde-social { flex: 0 0 auto; }
    #layout-cde-console-footer .cde-partners { flex-wrap: wrap; gap: 24px; height: auto; justify-content: flex-start; }
    #layout-cde-console-footer .cde-menu { gap: 20px; font-size: 16px; }
    #layout-cde-console-footer .cde-privacy { white-space: normal; }
}
@media print {
    body.layout-cde-console-active nav.navbar.fixed-top, #layout-cde-console-footer { display: none !important; }
    body.layout-cde-console-active #page { margin-top: 0 !important; }
}
