/* UI scale: Elastic html { font-size: 14px }. Larger html font-size scales rem list/menu/subjects. */
html[data-ippt-fs] {
    font-size: var(--ippt-fs, 14px) !important;
}

/* Extra scale for the message body; HTML mail often sets its own px/pt. */
html[data-ippt-body] #messagebody,
html[data-ippt-body] #messagebody .message-htmlpart,
html[data-ippt-body] #messagebody .message-part {
    font-size: var(--ippt-body, 14px) !important;
    line-height: 1.45;
}

html[data-ippt-body] #messagebody p,
html[data-ippt-body] #messagebody span,
html[data-ippt-body] #messagebody font,
html[data-ippt-body] #messagebody td,
html[data-ippt-body] #messagebody div,
html[data-ippt-body] #messagebody li,
html[data-ippt-body] #messagebody a,
html[data-ippt-body] #messagebody [style*="font-size"] {
    font-size: inherit !important;
}

html[data-ippt-body] #messagebody pre,
html[data-ippt-body] #messagebody code {
    font-size: 0.95em;
}

/* Compiled listing row height is px; let larger type wrap instead of clipping. */
html[data-ippt-fs]:not([data-ippt-fs="14"]) #messagelist tbody td {
    height: auto !important;
}

.ippt-fontsize {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0 .15rem;
    border: 1px solid rgba(0, 0, 0, .18);
    border-radius: .25rem;
    overflow: hidden;
    line-height: 1;
    z-index: 3;
}

.ippt-fontsize-rail {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: .2rem .6rem;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    background: #fbfbfb;
    gap: .35rem;
}

html.dark-mode .ippt-fontsize {
    border-color: rgba(255, 255, 255, .28);
}

html.dark-mode .ippt-fontsize-rail {
    background: transparent;
    border-bottom-color: rgba(255, 255, 255, .12);
}

.ippt-fontsize button {
    min-width: 2.1rem;
    height: 2.1rem;
    padding: 0 .2rem;
    border: 0;
    background: transparent;
    color: inherit;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    touch-action: manipulation;
}

.ippt-fontsize button:disabled {
    opacity: .35;
    cursor: default;
}

.ippt-fontsize .ippt-fs-value {
    min-width: 1.5rem;
    text-align: center;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    opacity: .8;
}

.ippt-fontsize-rail .ippt-fs-range {
    flex: 1 1 auto;
    min-width: 0;
    height: 1.6rem;
    margin: 0;
    padding: 0;
    accent-color: #2f3a3f;
    touch-action: manipulation;
}

.ippt-fontsize-rail-msg {
    flex-shrink: 0;
}

@media print {
    .ippt-fontsize {
        display: none !important;
    }
}
