/* Keep the retention notice in normal flow above Elastic's flex layout. */
#playmail-retention-notice {
    position: static;
    flex: 0 0 auto;
    width: 100%;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: #fff3cd;
    color: #5f4800;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}

/* Only Elastic needs a flex body. In Larry, jQuery temporarily appends a TR
   to body to determine its default display; flex would blockify it and make
   subsequently revealed Cc/Bcc rows display:block instead of table-row. */
body:has(> #playmail-retention-notice):has(> #layout) {
    display: flex;
    flex-direction: column;
}

body:has(> #playmail-retention-notice) > #layout {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
}

#layout-menu #logo {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.task-login #logo {
    background: #fff;
    border-radius: 6px;
    padding: 6px;
    box-sizing: content-box;
    max-width: 200px;
    height: auto;
}

@media screen and (max-width: 600px) {
    #playmail-retention-notice {
        font-size: 12px;
    }
}

@media print {
    #playmail-retention-notice {
        display: none;
    }

    body:has(> #playmail-retention-notice) {
        display: block;
    }
}

/* Larry usa un layout a posizionamento assoluto: l'avviso deve spostare
   #mainscreen della sua altezza reale (misurata da notice-layout.js). */
body:has(> #playmail-retention-notice) #mainscreen {
    top: calc(88px + var(--playmail-notice-h, 0px));
}

body:has(> #playmail-retention-notice) #mainscreen.offset {
    top: calc(132px + var(--playmail-notice-h, 0px));
}

body:has(> #playmail-retention-notice).minimal #mainscreen {
    top: calc(62px + var(--playmail-notice-h, 0px));
}

body:has(> #playmail-retention-notice).minimal #mainscreen.offset {
    top: calc(102px + var(--playmail-notice-h, 0px));
}

body:has(> #playmail-retention-notice).extwin #mainscreen {
    top: calc(40px + var(--playmail-notice-h, 0px));
}

body:has(> #playmail-retention-notice).extwin #mainscreen.offset {
    top: calc(86px + var(--playmail-notice-h, 0px));
}
