/*
 * Webmail presentation layer.
 *
 * The standalone skin changes presentation only. Mailbox,
 * message and composer state continue to be owned by Roundcube.
 */

:root {
    --wp-brand: #5668dc;
    --wp-brand-strong: #4657ca;
    --wp-brand-soft: #e7edff;
    --wp-brand-soft-hover: #dce5ff;
    --wp-canvas: #f4f7fb;
    --wp-surface: #ffffff;
    --wp-surface-soft: #f7f9fc;
    --wp-text: #11182f;
    --wp-text-soft: #61697a;
    --wp-border: #dfe4ee;
    --wp-border-strong: #cbd3e1;
    --wp-hover: #f1f4f9;
    --wp-selected: #dce8ff;
    --wp-danger: #bd263d;
    --wp-shadow: 0 1px 2px rgba(30, 38, 66, .08), 0 8px 24px rgba(30, 38, 66, .07);
    --wp-topbar-height: 64px;
    --wp-nav-width: 252px;
    --wp-radius: 18px;
    --wp-radius-small: 12px;
}

html.dark-mode {
    --wp-brand: #7c79ef;
    --wp-brand-strong: #9794ff;
    --wp-brand-soft: #2a3158;
    --wp-brand-soft-hover: #333c68;
    --wp-canvas: #111419;
    --wp-surface: #1a1e24;
    --wp-surface-soft: #21262e;
    --wp-text: #f2f4fa;
    --wp-text-soft: #adb5c5;
    --wp-border: #343a45;
    --wp-border-strong: #48505d;
    --wp-hover: #272d36;
    --wp-selected: #303c61;
    --wp-danger: #ff8497;
    --wp-shadow: 0 1px 2px rgba(0, 0, 0, .32), 0 12px 30px rgba(0, 0, 0, .24);
}

html,
body {
    background: var(--wp-canvas);
    color: var(--wp-text);
    font-family: Arial, "Segoe UI", sans-serif;
}

body,
button,
input,
select,
textarea {
    font-family: Arial, "Segoe UI", sans-serif;
}

body.webmail-enhanced:not(.task-login) {
    background: var(--wp-canvas) !important;
    overflow: hidden;
}

body.webmail-enhanced a,
body.webmail-enhanced button,
body.webmail-enhanced input,
body.webmail-enhanced select,
body.webmail-enhanced textarea {
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

body.webmail-enhanced :focus-visible {
    outline: 3px solid color-mix(in srgb, var(--wp-brand) 40%, transparent);
    outline-offset: 2px;
}

/* Pointer and scripted focus must not expose the browser's heavy black
 * default ring. Keyboard focus remains visible through the rule above. */
body.webmail-enhanced :focus:not(:focus-visible) {
    outline: 0 !important;
}

body.webmail-enhanced button::-moz-focus-inner,
body.webmail-enhanced input[type="button"]::-moz-focus-inner,
body.webmail-enhanced input[type="submit"]::-moz-focus-inner {
    border: 0;
}

/* -------------------------------------------------------------------------
 * Product shell
 * ---------------------------------------------------------------------- */

#webmail-topbar {
    align-items: center;
    background: var(--wp-canvas);
    display: grid;
    gap: 18px;
    /* The search begins exactly at the expanded navigation rail's right edge. */
    grid-template-columns: 42px calc(var(--wp-nav-width) - 90px) minmax(280px, 720px) 1fr auto;
    height: var(--wp-topbar-height);
    left: 0;
    padding: 7px 18px 7px 12px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1050;
}

.webmail-brand {
    align-items: center;
    color: var(--wp-text) !important;
    display: flex;
    font-size: 20px;
    font-weight: 700;
    gap: 12px;
    min-width: 0;
    text-decoration: none !important;
}

.webmail-brand-mark {
    align-items: center;
    background: linear-gradient(145deg, #655ee5, #514ccb);
    border-radius: 9px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 34px;
    font-size: 18px;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    letter-spacing: -.05em;
    width: 34px;
}

.webmail-brand-mark.has-image,
.webmail-login-brand-mark.has-image {
    background: transparent;
    overflow: hidden;
}

.webmail-brand-mark img,
.webmail-login-brand-mark img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.webmail-brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.webmail-icon-button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: var(--wp-text);
    cursor: pointer;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    padding: 0;
    width: 40px;
}

.webmail-icon-button:hover,
.webmail-icon-button[aria-expanded="true"] {
    background: var(--wp-hover);
}

.webmail-icon-button svg,
.webmail-nav-icon svg,
.webmail-compose svg,
.webmail-reader-actions svg {
    height: 20px;
    pointer-events: none;
    width: 20px;
}

#webmail-menu-button {
    display: inline-flex;
}

#webmail-top-search {
    align-items: center;
    background: #eaf0f8;
    border: 1px solid transparent;
    border-radius: 24px;
    display: flex;
    height: 48px;
    min-width: 0;
    padding: 0 12px 0 16px;
}

.dark-mode #webmail-top-search {
    background: #252b34;
}

#webmail-top-search:focus-within {
    background: var(--wp-surface);
    border-color: var(--wp-border);
    box-shadow: 0 2px 8px rgba(20, 29, 55, .12);
}

#webmail-top-search > svg {
    color: var(--wp-text-soft);
    flex: 0 0 20px;
    height: 20px;
    margin-right: 12px;
    width: 20px;
}

#webmail-top-search form {
    align-items: center;
    display: flex !important;
    flex: 1 1 auto;
    height: 100%;
    margin: 0 !important;
    min-width: 0;
    padding: 0 !important;
    position: static !important;
    width: auto !important;
}

#webmail-top-search input,
#webmail-top-search .no-bs {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--wp-text) !important;
    flex: 1 1 auto;
    font-size: 15px;
    height: 44px !important;
    margin: 0 !important;
    min-width: 0;
    outline: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

#webmail-top-search input::placeholder {
    color: var(--wp-text-soft);
    opacity: 1;
}

.webmail-fallback-search {
    flex: 1 1 auto;
    min-width: 0;
}

.webmail-search-options {
    margin-left: 5px;
}

.webmail-top-actions {
    align-items: center;
    display: flex;
    gap: 4px;
    justify-self: end;
    position: relative;
}

.webmail-avatar {
    background: #087c55;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    margin-left: 4px;
    overflow: hidden;
    padding: 0;
}

.webmail-avatar img {
    border-radius: inherit;
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

/* Keep the account identity visually stable while it is hovered/focused or
 * while its menu is open. Generic icon-button hover rules must not wash the
 * avatar into the pale application canvas. */
.webmail-avatar:hover,
.webmail-avatar:focus-visible,
.webmail-avatar[aria-expanded="true"] {
    background: #087c55 !important;
    color: #fff !important;
    filter: none !important;
    opacity: 1 !important;
}

.webmail-account-menu {
    background: var(--wp-surface-soft);
    border: 0;
    border-radius: 24px;
    box-shadow: 0 2px 6px rgba(30, 38, 66, .18), 0 16px 42px rgba(30, 38, 66, .18);
    min-width: min(350px, calc(100vw - 24px));
    padding: 12px;
    position: absolute;
    right: 0;
    top: 50px;
    z-index: 1200;
}

.webmail-account-menu[hidden] {
    display: none;
}

.webmail-account-menu > a {
    align-items: center;
    background: var(--wp-surface);
    border-radius: 4px;
    color: var(--wp-text) !important;
    display: flex;
    font-size: 14px;
    gap: 10px;
    margin-top: 2px;
    min-height: 46px;
    padding: 10px 16px;
    text-decoration: none !important;
}

.webmail-account-menu > a:last-child {
    border-radius: 4px 4px 18px 18px;
}

.webmail-account-menu > a:hover {
    background: var(--wp-hover);
}

.webmail-account-menu > a svg {
    height: 18px;
    width: 18px;
}

#webmail-quick-settings-scrim {
    background: rgba(17, 24, 39, .34);
    border: 0;
    inset: 0;
    padding: 0;
    position: fixed;
    z-index: 1740;
}

#webmail-quick-settings-scrim[hidden],
#webmail-quick-settings[hidden] {
    display: none;
}

#webmail-quick-settings {
    background: var(--wp-surface);
    bottom: 0;
    box-shadow: -12px 0 38px rgba(17, 24, 39, .2);
    color: var(--wp-text);
    max-width: 100vw;
    overflow: auto;
    position: fixed;
    right: 0;
    top: 0;
    width: min(400px, 100vw);
    z-index: 1750;
}

#webmail-quick-settings > header {
    align-items: center;
    background: var(--wp-surface);
    border-bottom: 1px solid var(--wp-border);
    display: flex;
    justify-content: space-between;
    min-height: 64px;
    padding: 10px 18px 10px 22px;
    position: sticky;
    top: 0;
    z-index: 2;
}

#webmail-quick-settings h2 {
    font-size: 20px;
    margin: 0;
}

#webmail-quick-settings > header button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: var(--wp-text);
    cursor: pointer;
    display: inline-flex;
    font-size: 26px;
    height: 40px;
    justify-content: center;
    width: 40px;
}

#webmail-quick-settings > header button:hover {
    background: var(--wp-hover);
}

.webmail-quick-settings-body {
    display: grid;
    gap: 0;
    padding: 2px 22px 28px;
}

.webmail-quick-settings-body > section {
    border-bottom: 1px solid var(--wp-border);
    display: grid;
    gap: 12px;
    padding: 20px 0;
}

.webmail-quick-settings-body h3 {
    font-size: 14px;
    margin: 0;
}

.webmail-quick-settings-body p {
    color: var(--wp-text-soft);
    font-size: 13px;
    line-height: 1.7;
    margin: 0;
}

.webmail-quick-settings-body kbd {
    background: var(--wp-surface-soft);
    border: 1px solid var(--wp-border);
    border-radius: 5px;
    color: var(--wp-text);
    font: inherit;
    padding: 2px 6px;
}

.webmail-theme-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.webmail-theme-grid label {
    border: 2px solid var(--wp-border);
    border-radius: 12px;
    cursor: pointer;
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 8px;
    position: relative;
}

.webmail-theme-grid label.is-selected {
    background: var(--wp-selected);
    border-color: var(--wp-brand);
}

.webmail-theme-grid input {
    accent-color: var(--wp-brand);
    position: absolute;
    right: 8px;
    top: 8px;
}

.webmail-theme-grid strong {
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.webmail-theme-preview {
    background: #fff;
    border: 1px solid #cbd3e1;
    border-radius: 7px;
    display: grid;
    grid-template-columns: 28% 1fr;
    grid-template-rows: 30% 1fr;
    height: 54px;
    overflow: hidden;
}

.webmail-theme-preview i:first-child {
    background: #eaf0f8;
    grid-column: 1 / -1;
}

.webmail-theme-preview i:nth-child(2) {
    background: #dce8ff;
}

.webmail-theme-preview i:nth-child(3) {
    background: #fff;
}

.webmail-theme-preview.dark {
    background: #1a1e24;
    border-color: #48505d;
}

.webmail-theme-preview.dark i:first-child {
    background: #252b34;
}

.webmail-theme-preview.dark i:nth-child(2) {
    background: #303c61;
}

.webmail-theme-preview.dark i:nth-child(3) {
    background: #1a1e24;
}

.webmail-theme-preview.system {
    background: linear-gradient(135deg, #fff 50%, #1a1e24 50%);
}

.webmail-quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.webmail-quick-options label,
.webmail-check-line {
    align-items: center;
    color: var(--wp-text);
    display: flex;
    font-size: 13px;
    gap: 8px;
}

.webmail-quick-options input,
.webmail-check-line input {
    accent-color: var(--wp-brand);
    height: 17px;
    width: 17px;
}

.webmail-all-settings {
    align-items: center;
    background: var(--wp-brand);
    border-radius: 999px;
    color: #fff !important;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    gap: 9px;
    justify-content: center;
    margin-top: 22px;
    min-height: 44px;
    padding: 0 16px;
    text-decoration: none !important;
}

.webmail-all-settings:hover {
    background: var(--wp-brand-strong);
}

.webmail-all-settings svg {
    height: 18px;
    width: 18px;
}

#webmail-nav {
    background: var(--wp-canvas);
    bottom: 0;
    display: flex;
    flex-direction: column;
    left: 0;
    overflow: auto;
    padding: 10px 12px 18px 8px;
    position: fixed;
    top: var(--wp-topbar-height);
    width: var(--wp-nav-width);
    z-index: 1040;
}

.webmail-compose {
    align-items: center;
    background: #e0e7fb;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(31, 41, 75, .14);
    color: var(--wp-text);
    cursor: pointer;
    display: flex;
    font-size: 14px;
    gap: 14px;
    height: 56px;
    margin: 0 4px 12px 0;
    min-width: 145px;
    padding: 0 18px;
    text-align: left;
    width: 145px;
}

.dark-mode .webmail-compose {
    background: #2c355d;
}

.webmail-compose:hover {
    background: var(--wp-brand-soft-hover);
    box-shadow: 0 2px 7px rgba(31, 41, 75, .16);
}

.webmail-nav-group {
    list-style: none;
    margin: 0;
    padding: 0;
}

.webmail-nav-group + .webmail-nav-group {
    border-top: 1px solid var(--wp-border);
    margin-top: 12px;
    padding-top: 12px;
}

.webmail-nav-heading {
    align-items: center;
    color: var(--wp-text);
    display: flex;
    font-size: 14px;
    font-weight: 700;
    justify-content: space-between;
    margin: 18px 12px 8px;
}

.webmail-nav-item {
    align-items: center;
    border-radius: 0 18px 18px 0;
    color: var(--wp-text) !important;
    display: grid;
    font-size: 14px;
    gap: 12px;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    min-height: 34px;
    padding: 6px 16px;
    text-decoration: none !important;
}

.webmail-nav-item:hover {
    background: var(--wp-hover);
}

.webmail-nav-item.is-active {
    background: var(--wp-selected);
    color: #243b74 !important;
    font-weight: 700;
}

.dark-mode .webmail-nav-item.is-active {
    color: #f4f6ff !important;
}

.webmail-nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.webmail-nav-item.webmail-nav-drafts .webmail-nav-label,
.webmail-nav-item[data-mailbox="Drafts" i] .webmail-nav-label {
    font-weight: 700;
}

.webmail-nav-count {
    font-size: 12px;
    font-weight: 700;
    min-width: 16px;
    text-align: right;
}

.webmail-nav-spacer {
    flex: 1 1 auto;
    min-height: 24px;
}

.webmail-quota {
    color: var(--wp-text-soft);
    font-size: 11px;
    padding: 12px 18px 0;
}

.webmail-quota-track {
    background: var(--wp-border);
    border-radius: 999px;
    height: 4px;
    margin-bottom: 7px;
    overflow: hidden;
}

.webmail-quota-track span {
    background: var(--wp-brand);
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 6%;
}

body.webmail-enhanced:not(.task-login) > #layout {
    background: var(--wp-surface);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius) var(--wp-radius) 0 0;
    bottom: 0;
    box-shadow: none;
    height: auto !important;
    left: calc(var(--wp-nav-width) + 4px);
    min-width: 0;
    overflow: hidden;
    position: fixed;
    right: 10px;
    top: var(--wp-topbar-height);
    width: auto !important;
}

/* Gmail's mail surface is separated from the canvas by its rounded clipping
 * edge, not by an outline. Keep settings/address-book card borders intact and
 * remove the frame only from the mailbox and reader surfaces. */
body.task-mail.action-none.webmail-enhanced > #layout,
body.task-mail.action-show.webmail-enhanced > #layout {
    border: 0;
}

@media (min-width: 901px) {
    body.webmail-nav-collapsed #webmail-nav {
        align-items: center;
        overflow-x: visible;
        padding-inline: 8px;
        width: 72px;
    }

    body.webmail-nav-collapsed .webmail-compose {
        justify-content: center;
        min-width: 52px;
        padding: 0;
        width: 52px;
    }

    body.webmail-nav-collapsed .webmail-compose span,
    body.webmail-nav-collapsed .webmail-nav-label,
    body.webmail-nav-collapsed .webmail-nav-count,
    body.webmail-nav-collapsed .webmail-nav-heading,
    body.webmail-nav-collapsed .webmail-quota {
        display: none;
    }

    body.webmail-nav-collapsed .webmail-nav-group {
        width: 100%;
    }

    body.webmail-nav-collapsed .webmail-nav-item {
        border-radius: 999px;
        grid-template-columns: 24px;
        justify-content: center;
        margin-inline: auto;
        padding-inline: 5px;
        width: 52px;
    }

    body.webmail-nav-collapsed.webmail-enhanced:not(.task-login) > #layout {
        left: 76px;
    }
}

body.webmail-density-compact .webmail-nav-item {
    min-height: 30px;
    padding-block: 4px;
}

body.webmail-density-compact.task-mail.action-none.webmail-enhanced #messagelist tr.message,
body.webmail-density-compact.task-mail.action-none.webmail-enhanced #messagelist td,
body.webmail-density-compact.task-mail.action-none.webmail-enhanced #messagelist td.flag,
body.webmail-density-compact.task-mail.action-none.webmail-enhanced #messagelist td.subject,
body.webmail-density-compact.task-mail.action-none.webmail-enhanced #messagelist td.fromto,
body.webmail-density-compact.task-mail.action-none.webmail-enhanced #messagelist td.date,
body.webmail-density-compact.task-mail.action-none.webmail-enhanced #messagelist td.attachment {
    height: 38px;
    min-height: 38px;
}

body.webmail-density-compact .wp-row-actions {
    height: 34px;
    top: 1px;
}

body.webmail-density-compact .wp-row-action {
    height: 30px;
    min-width: 30px;
}

body.webmail-enhanced #layout-menu {
    display: none !important;
}

body.webmail-enhanced #layout > .listbox,
body.webmail-enhanced #layout > #layout-content {
    background: var(--wp-surface);
    border-color: var(--wp-border);
    color: var(--wp-text);
}

body.webmail-enhanced .header,
body.webmail-enhanced .footer,
body.webmail-enhanced .listbox .header,
body.webmail-enhanced .listbox .footer {
    background-color: var(--wp-surface);
    border-color: var(--wp-border);
    color: var(--wp-text);
}

body.webmail-enhanced .toolbar a.button,
body.webmail-enhanced .toolbar .dropbutton > a.button,
body.webmail-enhanced .footer a.button {
    color: var(--wp-text);
}

body.webmail-enhanced .toolbar a.button:hover,
body.webmail-enhanced .toolbar .dropbutton > a.button:hover,
body.webmail-enhanced .footer a.button:hover {
    background-color: var(--wp-hover);
    border-radius: 999px;
}

body.webmail-enhanced .btn-primary,
body.webmail-enhanced .floating-action-buttons a.button {
    background-color: var(--wp-brand);
    border-color: var(--wp-brand);
}

body.webmail-enhanced .btn-primary:hover,
body.webmail-enhanced .floating-action-buttons a.button:hover {
    background-color: var(--wp-brand-strong);
    border-color: var(--wp-brand-strong);
}

/* -------------------------------------------------------------------------
 * Login
 * ---------------------------------------------------------------------- */

body.task-login.webmail-enhanced {
    align-items: center;
    background: #eff4fa;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 72px 20px 28px;
}

.dark-mode body.task-login.webmail-enhanced {
    background: var(--wp-canvas);
}

body.task-login.webmail-enhanced::before {
    content: none;
    display: none;
}

body.task-login.webmail-enhanced::after {
    content: none;
    display: none;
}

body.task-login.webmail-enhanced #layout {
    display: block;
    height: auto !important;
    position: static;
    width: auto;
}

body.task-login.webmail-enhanced #layout-content {
    background: var(--wp-surface);
    border: 1px solid var(--wp-border);
    border-radius: 16px;
    box-shadow: var(--wp-shadow);
    display: block !important;
    max-width: none;
    min-height: 0;
    padding: 36px;
    position: static;
    width: 430px;
}

body.task-login.webmail-enhanced #logo {
    display: none;
}

body.task-login.webmail-enhanced #login-form {
    margin: 0;
    max-width: none;
    top: 0 !important;
    width: 100%;
}

#webmail-login-copy {
    margin-bottom: 18px;
    text-align: center;
}

.webmail-login-brand {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 0 0 24px;
}

.webmail-login-brand-mark {
    align-items: center;
    background: var(--wp-brand);
    border-radius: 10px;
    color: #fff;
    display: inline-flex;
    font-size: 17px;
    font-weight: 800;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.webmail-login-brand-name {
    color: var(--wp-text);
    font-size: 21px;
    font-weight: 750;
    letter-spacing: -.02em;
}

.webmail-login-eyebrow {
    color: var(--wp-brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    margin-bottom: 18px;
    text-transform: uppercase;
}

#webmail-login-title {
    color: var(--wp-text);
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -.025em;
    line-height: 1.18;
    margin: 0 0 16px;
}

.webmail-login-description {
    color: var(--wp-text-soft);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

body.task-login.webmail-enhanced #login-form table,
body.task-login.webmail-enhanced #login-form tbody,
body.task-login.webmail-enhanced #login-form tr,
body.task-login.webmail-enhanced #login-form td {
    display: block;
    width: 100%;
}

body.task-login.webmail-enhanced #login-form td.title {
    color: var(--wp-text);
    font-size: 13px;
    font-weight: 700;
    height: auto;
    margin: 0 0 6px;
    padding: 0;
    display: block !important;
    position: static;
    text-align: left;
}

body.task-login.webmail-enhanced #login-form td.input {
    margin: 0 0 14px;
    padding: 0;
}

body.task-login.webmail-enhanced #login-form .input-group-prepend {
    display: none;
}

body.task-login.webmail-enhanced #login-form .input-group {
    display: block;
}

body.task-login.webmail-enhanced #login-form input.form-control {
    background: var(--wp-surface);
    border: 1px solid var(--wp-border-strong);
    border-radius: 9px !important;
    box-shadow: none;
    color: var(--wp-text);
    font-size: 14px;
    height: 46px;
    padding: 0 13px;
    width: 100% !important;
    flex: 0 0 100%;
}

body.task-login.webmail-enhanced #login-form input.form-control:focus {
    border-color: var(--wp-brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp-brand) 18%, transparent);
}

body.task-login.webmail-enhanced #rcmloginsubmit {
    background: var(--wp-brand);
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    height: 42px;
    margin-top: 0;
    width: 100%;
}

body.task-login.webmail-enhanced #rcmloginsubmit:hover {
    background: var(--wp-brand-strong);
}

body.task-login.webmail-enhanced #login-footer {
    color: var(--wp-text-soft);
    font-size: 11px;
    margin-top: 14px;
    text-align: center;
}

/* -------------------------------------------------------------------------
 * Mailbox list
 * ---------------------------------------------------------------------- */

body.task-mail.action-none.webmail-enhanced #layout-sidebar,
body.task-mail.action-none.webmail-enhanced #layout-content {
    display: none !important;
}

body.task-mail.action-none.webmail-enhanced #layout-list {
    border: 0;
    border-top-left-radius: var(--wp-radius);
    display: flex !important;
    flex: 1 1 auto;
    height: 100%;
    left: 0 !important;
    max-width: none !important;
    position: absolute;
    right: 0 !important;
    top: 0 !important;
    width: 100% !important;
}

body.task-mail.action-none.webmail-enhanced #layout-list > .header {
    background: var(--wp-surface) !important;
    border-bottom: 1px solid var(--wp-border);
    border-top-left-radius: inherit;
    flex: 0 0 52px;
    min-height: 52px;
    padding: 4px 12px;
}

body.task-mail.action-none.webmail-enhanced #messagelist-header {
    align-items: center;
    background: var(--wp-surface) !important;
    display: flex;
    gap: 3px;
    justify-content: flex-start;
}

body.task-mail.action-none.webmail-enhanced #messagelist-header > .header-title,
body.task-mail.action-none.webmail-enhanced #messagelist-header > .task-menu-button,
body.task-mail.action-none.webmail-enhanced #messagelist-header > .back-sidebar-button,
body.task-mail.action-none.webmail-enhanced #messagelist-header > .toolbar-list-button,
body.task-mail.action-none.webmail-enhanced #messagelist-header > .toolbar-menu-button {
    display: none !important;
}

body.task-mail.action-none.webmail-enhanced #toolbar-list-menu {
    align-items: center;
    display: flex !important;
    float: none !important;
    inset: auto !important;
    margin: 0 !important;
    order: 1;
    position: static !important;
    width: auto !important;
}

body.task-mail.action-none.webmail-enhanced #toolbar-list-menu {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    height: 42px !important;
    min-width: 0 !important;
    padding: 0 !important;
}

body.task-mail.action-none.webmail-enhanced #toolbar-list-menu > li {
    flex: 0 0 40px !important;
    height: 40px !important;
    width: 40px !important;
}

body.task-mail.action-none.webmail-enhanced #toolbar-list-menu > li > a {
    height: 40px !important;
    line-height: 40px !important;
    margin: 0 !important;
    width: 40px !important;
}

body.task-mail.action-none.webmail-enhanced #messagelist-header > .refresh {
    float: none !important;
    height: 40px !important;
    line-height: 40px !important;
    margin: 0 !important;
    order: 2;
    position: static !important;
    width: 40px !important;
}

body.task-mail.action-none.webmail-enhanced #messagelist-header .inner,
body.task-mail.action-show.webmail-enhanced #layout-content > .header .inner {
    display: none !important;
}

body.task-mail.action-none.webmail-enhanced #layout-list > .searchbar {
    display: none !important;
}

body.task-mail.action-none.webmail-enhanced #layout-list > .footer {
    border-top: 1px solid var(--wp-border);
    min-height: 42px;
}

body.task-mail.action-none.webmail-enhanced .messagelist-container {
    background: var(--wp-surface);
    flex: 1 1 auto;
    overflow: auto;
}

body.task-mail.action-none.webmail-enhanced #messagelist-fixedcopy {
    display: none !important;
}

body.task-mail.action-none.webmail-enhanced #messagelist {
    border-collapse: collapse;
    color: var(--wp-text);
    display: table;
    table-layout: fixed;
    width: 100% !important;
}

body.task-mail.action-none.webmail-enhanced #messagelist > thead {
    display: none;
}

body.task-mail.action-none.webmail-enhanced #messagelist > tbody {
    display: table-row-group;
}

body.task-mail.action-none.webmail-enhanced #messagelist tr.message {
    background: var(--wp-surface);
    border-bottom: 1px solid var(--wp-border);
    box-shadow: none;
    color: var(--wp-text);
    display: grid;
    grid-template-columns: 46px 38px 34px minmax(150px, 22%) minmax(0, 1fr) 28px 90px;
    height: 44px;
    min-height: 44px;
    position: relative;
    cursor: pointer;
}

body.task-mail.action-none.webmail-enhanced #messagelist tr.message:hover {
    background: var(--wp-hover);
    box-shadow: none;
}

body.task-mail.action-none.webmail-enhanced #messagelist tr.message.selected,
body.task-mail.action-none.webmail-enhanced #messagelist tr.message.focused {
    background: var(--wp-selected);
}

body.task-mail.action-none.webmail-enhanced #messagelist tr.message:focus,
body.task-mail.action-none.webmail-enhanced #messagelist tr.message:focus-visible,
body.task-mail.action-none.webmail-enhanced #messagelist tr.message.focused > td,
body.task-mail.action-none.webmail-enhanced #messagelist td.subject:focus,
body.task-mail.action-none.webmail-enhanced #messagelist td.subject:focus-visible,
body.task-mail.action-none.webmail-enhanced #messagelist td.subject a:active {
    border-color: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
}

body.task-mail.action-none.webmail-enhanced #messagelist td {
    background: transparent !important;
    border: 0;
    color: inherit;
    height: 44px;
    line-height: 44px;
    padding: 0;
}

body.task-mail.action-none.webmail-enhanced #messagelist td.selection {
    align-items: center;
    display: flex;
    grid-column: 1;
    justify-content: center;
}

body.task-mail.action-none.webmail-enhanced #messagelist input[type="checkbox"] {
    accent-color: var(--wp-brand);
    cursor: pointer;
    height: 18px;
    width: 18px;
}

body.task-mail.action-none.webmail-enhanced #messagelist td.flag > span::before {
    color: var(--wp-text-soft);
    content: "☆";
    display: block;
    font-family: Arial, sans-serif;
    font-size: 22px;
    line-height: 1;
}

body.task-mail.action-none.webmail-enhanced #messagelist td.flag > span.flagged::before {
    color: #f2a61b;
    content: "★";
}

body.task-mail.action-none.webmail-enhanced #messagelist td.flag > span::after {
    display: none !important;
}

body.task-mail.action-none.webmail-enhanced #toolbar-list-menu a.select::before {
    border: 2px solid currentColor;
    border-radius: 2px;
    box-sizing: border-box;
    content: "" !important;
    height: 17px;
    margin: 0 auto;
    width: 17px;
}

body.task-mail.action-none.webmail-enhanced #messagelist td.flag {
    align-items: center;
    display: flex;
    grid-column: 2;
    grid-row: 1;
    height: 44px;
    justify-content: center;
    line-height: 1;
    position: static;
    width: auto;
}

body.task-mail.action-none.webmail-enhanced #messagelist td.threads,
body.task-mail.action-none.webmail-enhanced #messagelist td.status,
body.task-mail.action-none.webmail-enhanced #messagelist td.size {
    display: none !important;
}

body.task-mail.action-none.webmail-enhanced #messagelist td.subject {
    align-items: center;
    display: flex;
    grid-column: 5;
    grid-row: 1;
    height: 44px;
    line-height: normal;
    min-width: 0;
    overflow: hidden;
    padding: 0 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.task-mail.action-none.webmail-enhanced #messagelist td.fromto {
    align-items: center;
    color: var(--wp-text);
    display: flex !important;
    font-size: 14px;
    grid-column: 4;
    grid-row: 1;
    min-width: 0;
    overflow: hidden;
    padding-right: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: auto !important;
}

body.task-mail.action-none.webmail-enhanced #messagelist td.fromto > * {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.task-mail.action-none.webmail-enhanced #messagelist td.subject a {
    color: var(--wp-text);
    display: block;
    font-size: 14px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 auto;
    width: auto;
}

body.task-mail.action-none.webmail-enhanced #messagelist td.subject > .msgicon {
    display: none;
}

body.task-mail.action-none.webmail-enhanced #messagelist td.date {
    align-items: center;
    color: var(--wp-text-soft);
    display: flex !important;
    font-size: 12px;
    grid-column: 7;
    grid-row: 1;
    justify-content: flex-end;
    padding-right: 14px;
    text-align: right;
    white-space: nowrap;
    width: auto !important;
}

body.task-mail.action-none.webmail-enhanced #messagelist td.attachment {
    align-items: center;
    color: var(--wp-text-soft);
    display: flex !important;
    grid-column: 6;
    grid-row: 1;
    justify-content: center;
    width: auto !important;
}

body.task-mail.action-none.webmail-enhanced #messagelist td.subject a {
    color: inherit;
    text-decoration: none;
}

body.task-mail.action-none.webmail-enhanced #messagelist td.subject a:focus,
body.task-mail.action-none.webmail-enhanced #messagelist td.subject a:focus-visible {
    box-shadow: none !important;
    outline: 0 !important;
}

body.task-mail.action-none.webmail-enhanced #messagelist tr.message:focus-within {
    background: var(--wp-hover);
}

body.task-mail.action-none.webmail-enhanced #messagelist tr.unread td.fromto,
body.task-mail.action-none.webmail-enhanced #messagelist tr.unread td.subject,
body.task-mail.action-none.webmail-enhanced #messagelist tr.unread td.date {
    color: var(--wp-text);
    font-weight: 700;
}

body.task-mail.action-none.webmail-enhanced #messagelist tbody:empty::after {
    color: var(--wp-text-soft);
    content: "Nincs megjeleníthető levél";
    display: block;
    font-size: 15px;
    padding: 80px 24px;
    text-align: center;
}

body.task-mail.action-none.webmail-enhanced #messagelist + .listing-info {
    display: none !important;
}

/* -------------------------------------------------------------------------
 * Message reader
 * ---------------------------------------------------------------------- */

body.task-mail.action-show.webmail-enhanced #layout-sidebar,
body.task-mail.action-show.webmail-enhanced #layout-list {
    display: none !important;
}

body.task-mail.action-show.webmail-enhanced #layout-content {
    border: 0;
    display: flex !important;
    height: 100%;
    left: 0 !important;
    position: absolute;
    right: 0 !important;
    top: 0 !important;
    width: 100% !important;
}

body.task-mail.action-show.webmail-enhanced #layout-content > .header {
    align-items: center;
    background: var(--wp-surface) !important;
    border-bottom: 1px solid var(--wp-border);
    display: block;
    flex: 0 0 52px;
    min-height: 52px;
    padding: 4px 12px;
    text-align: left !important;
}

body.task-mail.action-show.webmail-enhanced #layout-content > .header > .header-title {
    display: none !important;
}

body.task-mail.action-show.webmail-enhanced #toolbar-menu {
    display: flex !important;
    float: none !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    position: static !important;
    width: auto !important;
}

body.task-mail.action-show.webmail-enhanced #layout-content > .header > a.button,
body.task-mail.action-show.webmail-enhanced #layout-content > .header > .dropbutton {
    float: none !important;
    margin-left: 0 !important;
    margin-right: 2px !important;
    position: static !important;
}

body.task-mail.action-show.webmail-enhanced #layout-content > .content {
    background: var(--wp-surface);
    color: var(--wp-text);
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 24px 18px 64px;
}

body.task-mail.action-show.webmail-enhanced #message-header {
    box-sizing: border-box;
    margin: 0;
    max-width: none;
    width: 100%;
}

body.task-mail.action-show.webmail-enhanced #message-header h2.subject {
    color: var(--wp-text);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -.015em;
    line-height: 1.28;
    margin: 0 0 22px 58px;
    padding: 0;
}

body.task-mail.action-show.webmail-enhanced #message-header h2.subject .extwin {
    float: right;
}

body.task-mail.action-show.webmail-enhanced #message-header > .header {
    align-items: flex-start;
    background: transparent;
    border: 0;
    display: flex;
    margin-bottom: 18px;
    min-height: 58px;
    padding: 0;
}

body.task-mail.action-show.webmail-enhanced #message-header .contactphoto {
    background: var(--wp-brand);
    border: 0;
    border-radius: 50%;
    flex: 0 0 44px;
    filter: none !important;
    height: 44px;
    margin: 0 14px 0 0;
    object-fit: cover;
    opacity: 1 !important;
    padding: 0;
    position: relative;
    visibility: visible !important;
    width: 44px;
    z-index: 2;
}

body.task-mail.action-show.webmail-enhanced #message-header .contactphoto:hover {
    background: var(--wp-brand) !important;
    filter: none !important;
    opacity: 1 !important;
}

body.task-mail.action-show.webmail-enhanced #message-header .header-content {
    flex: 1 1 auto;
    min-width: 0;
}

body.task-mail.action-show.webmail-enhanced #message-header .header-summary {
    color: var(--wp-text-soft);
    font-size: 13px;
    line-height: 1.45;
    margin: 3px 0 0;
}

body.task-mail.action-show.webmail-enhanced #message-header .header-summary .rcmContactAddress {
    color: var(--wp-text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

body.task-mail.action-show.webmail-enhanced #message-header .header-headers,
body.task-mail.action-show.webmail-enhanced #message-header .header-links {
    color: var(--wp-text-soft);
    display: none !important;
    font-size: 12px;
}

body.task-mail.action-show.webmail-enhanced #message-header .header-links a.plain,
body.task-mail.action-show.webmail-enhanced #message-header .header-links a.html {
    display: none !important;
}

/* A Gmail-style popout keeps the reader toolbar and conversation, but omits
 * every application-shell surface. The class is added server-side to avoid a
 * flash of the full layout while the new window is opening. */
body.task-mail.action-show.webmail-enhanced.wp-reader-popout {
    background: var(--wp-surface);
}

body.task-mail.action-show.webmail-enhanced.wp-reader-popout #webmail-topbar,
body.task-mail.action-show.webmail-enhanced.wp-reader-popout #webmail-nav,
body.task-mail.action-show.webmail-enhanced.wp-reader-popout #wp-nav-scrim {
    display: none !important;
}

body.task-mail.action-show.webmail-enhanced.wp-reader-popout > #layout {
    border-radius: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
}

body.task-mail.action-show.webmail-enhanced.wp-reader-popout #layout-content > .content {
    padding: 24px 22px 48px;
}

body.task-mail.action-show.webmail-enhanced #message-content {
    box-sizing: border-box;
    display: block;
    margin: 0;
    max-width: none;
    min-height: 0;
    padding: 0 0 14px 58px;
    width: 100%;
}

body.task-mail.action-show.webmail-enhanced #message-content .leftcol:empty,
body.task-mail.action-show.webmail-enhanced #message-content .leftcol:not(:has(.attachmentslist li)) {
    display: none;
}

body.task-mail.action-show.webmail-enhanced #message-content .rightcol {
    border: 0;
    float: none;
    margin: 0;
    max-height: none !important;
    overflow: visible !important;
    padding: 0;
    width: 100%;
}

body.task-mail.action-show.webmail-enhanced #messagebody,
body.task-mail.action-show.webmail-enhanced .message-htmlpart,
body.task-mail.action-show.webmail-enhanced .message-part,
body.task-mail.action-show.webmail-enhanced .rcmBody {
    color: var(--wp-text);
    font-size: 14px;
    line-height: 1.65;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    width: 100% !important;
}

body.task-mail.action-show.webmail-enhanced #messagebody iframe {
    max-height: none !important;
    min-height: 220px;
    overflow: visible !important;
    width: 100% !important;
}

.dark-mode body.task-mail.action-show.webmail-enhanced #messagebody .message-htmlpart,
.dark-mode body.task-mail.action-show.webmail-enhanced #messagebody .rcmBody {
    background: #ffffff !important;
    color: #11182f !important;
}

.dark-mode body.task-mail.action-show.webmail-enhanced #messagebody .message-htmlpart {
    border-radius: 8px;
    padding: 12px !important;
}

.dark-mode body.task-mail.action-show.webmail-enhanced #messagebody .rcmBody h1,
.dark-mode body.task-mail.action-show.webmail-enhanced #messagebody .rcmBody h2,
.dark-mode body.task-mail.action-show.webmail-enhanced #messagebody .rcmBody h3,
.dark-mode body.task-mail.action-show.webmail-enhanced #messagebody .rcmBody p,
.dark-mode body.task-mail.action-show.webmail-enhanced #messagebody .rcmBody span,
.dark-mode body.task-mail.action-show.webmail-enhanced #messagebody .rcmBody strong {
    color: inherit !important;
}

.dark-mode body.task-mail.action-show.webmail-enhanced #messagebody .rcmBody a {
    color: #145fce !important;
}

.webmail-reader-actions {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    gap: 10px;
    margin: 24px 0 0;
    max-width: none;
    padding-left: 58px;
    width: 100%;
}

.webmail-reader-actions button {
    align-items: center;
    background: var(--wp-surface);
    border: 1px solid var(--wp-border-strong);
    border-radius: 999px;
    color: var(--wp-text);
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    gap: 9px;
    height: 40px;
    padding: 0 18px;
}

.webmail-reader-actions button:hover {
    background: var(--wp-hover);
}

.webmail-quote {
    margin: 18px 0;
}

.webmail-quote-divider {
    align-items: center;
    display: flex;
    gap: 10px;
    margin: 12px 0;
}

.webmail-quote-divider::before,
.webmail-quote-divider::after {
    background: var(--wp-border);
    content: "";
    flex: 1 1 auto;
    height: 1px;
}

.webmail-quote-toggle {
    background: #e4e7ed;
    border: 0;
    border-radius: 999px;
    color: #646b78;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 20px;
    min-width: 34px;
    padding: 0 8px;
}

.dark-mode .webmail-quote-toggle {
    background: #343a44;
    color: #d6dbe5;
}

.webmail-quote blockquote {
    border-left: 2px solid var(--wp-border-strong);
    color: var(--wp-text-soft);
    margin: 12px 0 0;
    padding-left: 14px;
}

/* -------------------------------------------------------------------------
 * Composer
 * ---------------------------------------------------------------------- */

body.task-mail.action-compose.webmail-enhanced #layout-sidebar {
    display: none !important;
}

body.task-mail.action-compose.webmail-enhanced #layout-content {
    border: 0;
    display: flex !important;
    height: 100%;
    left: 0 !important;
    position: absolute;
    right: 0 !important;
    top: 0 !important;
    width: 100% !important;
}

body.task-mail.action-compose.webmail-enhanced #layout-content > .header {
    border-bottom: 1px solid var(--wp-border);
    flex: 0 0 52px;
    min-height: 52px;
}

body.task-mail.action-compose.webmail-enhanced #layout-content > .content {
    background: var(--wp-surface);
    color: var(--wp-text);
    flex: 1 1 auto;
    overflow: auto;
    padding: 18px 30px 80px;
}

body.task-mail.action-compose.webmail-enhanced #compose-content {
    margin: 0 auto;
    max-width: 1180px;
}

body.task-mail.action-compose.webmail-enhanced .form-group,
body.task-mail.action-compose.webmail-enhanced .form-control,
body.task-mail.action-compose.webmail-enhanced .recipient-input {
    border-color: var(--wp-border);
}

body.task-mail.action-compose.webmail-enhanced .form-control,
body.task-mail.action-compose.webmail-enhanced .recipient-input {
    background: var(--wp-surface);
    color: var(--wp-text);
}

body.task-mail.action-compose.webmail-enhanced #composebody {
    background: var(--wp-surface);
    border-color: var(--wp-border);
    color: var(--wp-text);
    min-height: 360px;
}

body.task-mail.action-compose.webmail-enhanced .mce-container,
body.task-mail.action-compose.webmail-enhanced .tox .tox-editor-container,
body.task-mail.action-compose.webmail-enhanced .tox .tox-toolbar,
body.task-mail.action-compose.webmail-enhanced .tox .tox-toolbar__primary {
    background: var(--wp-surface) !important;
    border-color: var(--wp-border) !important;
}

/* -------------------------------------------------------------------------
 * Address book and settings
 * ---------------------------------------------------------------------- */

body.task-addressbook.webmail-enhanced #layout,
body.task-settings.webmail-enhanced #layout {
    display: grid;
    grid-template-columns: 250px minmax(300px, 34%) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
}

#webmail-page-heading {
    align-items: center;
    background: var(--wp-surface);
    border-bottom: 1px solid var(--wp-border);
    display: flex;
    grid-column: 1 / -1;
    grid-row: 1;
    justify-content: space-between;
    min-height: 108px;
    padding: 18px 30px;
}

.webmail-page-eyebrow {
    color: var(--wp-brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

#webmail-page-heading h1 {
    color: var(--wp-text);
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -.035em;
    line-height: 1.1;
    margin: 0;
}

.webmail-page-action {
    align-items: center;
    background: var(--wp-brand);
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    gap: 7px;
    height: 42px;
    padding: 0 20px;
}

.webmail-page-action:hover {
    background: var(--wp-brand-strong);
}

body.task-addressbook.webmail-enhanced #layout-sidebar,
body.task-settings.webmail-enhanced #layout-sidebar,
body.task-addressbook.webmail-enhanced #layout-list,
body.task-settings.webmail-enhanced #layout-list,
body.task-addressbook.webmail-enhanced #layout-content,
body.task-settings.webmail-enhanced #layout-content {
    display: flex !important;
    height: 100% !important;
    left: auto !important;
    min-width: 0;
    position: relative !important;
    right: auto !important;
    top: auto !important;
    max-width: none !important;
    width: 100% !important;
}

body.task-addressbook.webmail-enhanced #layout-sidebar,
body.task-addressbook.webmail-enhanced #layout-list,
body.task-addressbook.webmail-enhanced #layout-content,
body.task-settings.webmail-enhanced #layout-sidebar,
body.task-settings.webmail-enhanced #layout-list,
body.task-settings.webmail-enhanced #layout-content {
    grid-row: 2;
}

body.task-addressbook.webmail-enhanced #layout-sidebar,
body.task-settings.webmail-enhanced #layout-sidebar,
body.task-addressbook.webmail-enhanced #layout-list,
body.task-settings.webmail-enhanced #layout-list {
    border-right: 1px solid var(--wp-border);
}

body.task-addressbook.webmail-enhanced .listing li,
body.task-settings.webmail-enhanced .listing li,
body.task-addressbook.webmail-enhanced .listing tr,
body.task-settings.webmail-enhanced .listing tr {
    background: transparent;
    border-color: var(--wp-border);
    color: var(--wp-text);
}

body.task-addressbook.webmail-enhanced .listing li:hover,
body.task-settings.webmail-enhanced .listing li:hover,
body.task-addressbook.webmail-enhanced .listing tr:hover,
body.task-settings.webmail-enhanced .listing tr:hover {
    background: var(--wp-hover);
}

body.task-addressbook.webmail-enhanced .listing .selected,
body.task-settings.webmail-enhanced .listing .selected {
    background: var(--wp-selected) !important;
    color: var(--wp-text) !important;
}

body.task-addressbook.webmail-enhanced #layout-content > .content,
body.task-settings.webmail-enhanced #layout-content > .content {
    background: var(--wp-surface);
    color: var(--wp-text);
    padding: 22px 26px;
}

body.task-settings.webmail-enhanced fieldset,
body.task-addressbook.webmail-enhanced fieldset {
    background: var(--wp-surface-soft);
    border: 1px solid var(--wp-border);
    border-radius: 14px;
    margin-bottom: 16px;
    padding: 18px;
}

body.webmail-enhanced .form-control,
body.webmail-enhanced .custom-select,
body.webmail-enhanced select,
body.webmail-enhanced textarea {
    background-color: var(--wp-surface);
    border-color: var(--wp-border-strong);
    color: var(--wp-text);
}

/* -------------------------------------------------------------------------
 * Menus, dialogs and state surfaces
 * ---------------------------------------------------------------------- */

body.webmail-enhanced .popupmenu,
body.webmail-enhanced .popover,
body.webmail-enhanced .modal-content,
body.webmail-enhanced .ui-dialog {
    background: var(--wp-surface);
    border: 1px solid var(--wp-border);
    border-radius: 14px;
    box-shadow: var(--wp-shadow);
    color: var(--wp-text);
}

body.webmail-enhanced .popupmenu .listing li,
body.webmail-enhanced .popupmenu .listing a {
    background: transparent;
    color: var(--wp-text);
}

body.webmail-enhanced .popupmenu .listing a:hover,
body.webmail-enhanced .popupmenu .listing a:focus {
    background: var(--wp-hover);
}

body.webmail-enhanced #messagestack .alert,
body.webmail-enhanced .ui.alert {
    border-radius: 12px;
}

/* Gmail-like transient status surface. Roundcube remains authoritative for
   the message lifecycle; this only relocates its alerts to a non-blocking
   bottom-left stack. */
body.webmail-enhanced #messagestack {
    bottom: 16px !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
    left: 16px !important;
    max-width: calc(100vw - 32px);
    pointer-events: none;
    position: fixed !important;
    right: auto !important;
    top: auto !important;
    width: min(420px, calc(100vw - 32px));
    z-index: 2400 !important;
}

body.webmail-enhanced #messagestack .alert {
    background: #202124 !important;
    border: 0 !important;
    border-radius: 4px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28) !important;
    color: #fff !important;
    margin: 0 !important;
    min-height: 48px;
    padding: 14px 48px 14px 24px !important;
    pointer-events: auto;
}

body.webmail-enhanced #messagestack .alert a,
body.webmail-enhanced #messagestack .alert button,
body.webmail-enhanced #messagestack .alert .close {
    color: #8ab4f8 !important;
}

body.webmail-enhanced .spinner-border,
body.webmail-enhanced .loading {
    color: var(--wp-brand);
}

body.webmail-framed {
    background: var(--wp-surface);
    color: var(--wp-text);
    overflow: auto;
    padding: 18px 22px;
}

body.webmail-framed #layout,
body.webmail-framed #layout-content {
    background: var(--wp-surface);
    color: var(--wp-text);
}

/* -------------------------------------------------------------------------
 * Responsive behaviour
 * ---------------------------------------------------------------------- */

@media (max-width: 900px) {
    :root {
        --wp-nav-width: 72px;
    }

    #webmail-topbar {
        gap: 8px;
        grid-template-columns: 42px minmax(0, 1fr) auto;
        padding: 7px 10px;
    }

    #webmail-menu-button {
        display: inline-flex;
        grid-column: 1;
    }

    #webmail-topbar .webmail-brand {
        display: none;
    }

    #webmail-topbar > span[aria-hidden="true"] {
        display: none;
    }

    #webmail-top-search {
        grid-column: 2;
    }

    .webmail-top-actions {
        grid-column: 3;
        grid-row: 1;
    }

    .webmail-top-actions .webmail-theme {
        display: none;
    }

    #webmail-nav {
        align-items: center;
        box-shadow: none;
        overflow-x: visible;
        padding-inline: 8px;
        transition: width .2s ease, box-shadow .2s ease;
        width: 72px;
        z-index: 1100;
    }

    body.webmail-nav-open #webmail-nav {
        align-items: stretch;
        box-shadow: 8px 0 28px rgba(16, 24, 43, .16);
        overflow: auto;
        padding: 10px 12px 18px 8px;
        width: 244px;
    }

    .webmail-compose {
        justify-content: center;
        min-width: 52px;
        padding: 0;
        width: 52px;
    }

    .webmail-compose span,
    .webmail-nav-label,
    .webmail-nav-count,
    .webmail-nav-heading,
    .webmail-quota {
        display: none;
    }

    .webmail-nav-group {
        width: 100%;
    }

    .webmail-nav-item {
        border-radius: 999px;
        grid-template-columns: 24px;
        justify-content: center;
        margin-inline: auto;
        padding-inline: 5px;
        width: 52px;
    }

    body.webmail-nav-open .webmail-compose {
        justify-content: flex-start;
        min-width: 145px;
        padding: 0 18px;
        width: 145px;
    }

    body.webmail-nav-open .webmail-compose span,
    body.webmail-nav-open .webmail-nav-label,
    body.webmail-nav-open .webmail-nav-count {
        display: inline;
    }

    body.webmail-nav-open .webmail-nav-heading {
        display: flex;
    }

    body.webmail-nav-open .webmail-quota {
        display: block;
    }

    body.webmail-nav-open .webmail-nav-item {
        border-radius: 0 18px 18px 0;
        grid-template-columns: 24px minmax(0, 1fr) auto;
        justify-content: initial;
        margin-inline: 0;
        padding-inline: 16px;
        width: 100%;
    }

    body.webmail-enhanced:not(.task-login) > #layout {
        left: 76px;
        right: 0;
        border-left: 0;
        border-radius: 0;
    }

    body.task-addressbook.webmail-enhanced #layout,
    body.task-settings.webmail-enhanced #layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    body.task-addressbook.webmail-enhanced #layout-content,
    body.task-settings.webmail-enhanced #layout-content {
        display: none !important;
    }

    body.task-addressbook.webmail-enhanced #layout-content.selected,
    body.task-settings.webmail-enhanced #layout-content.selected {
        display: flex !important;
        grid-column: 1 / -1;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    body.webmail-enhanced .floating-action-buttons {
        display: none !important;
    }
}

@media (max-width: 600px) {
    :root {
        --wp-nav-width: 244px;
        --wp-topbar-height: 56px;
    }

    #webmail-nav {
        align-items: stretch;
        box-shadow: 8px 0 28px rgba(16, 24, 43, .16);
        overflow: auto;
        padding: 10px 12px 18px 8px;
        transform: translateX(-105%);
        transition: transform .2s ease;
        width: 244px;
    }

    body.webmail-nav-open #webmail-nav {
        transform: translateX(0);
        width: 244px;
    }

    .webmail-compose,
    body.webmail-nav-open .webmail-compose {
        justify-content: flex-start;
        min-width: 145px;
        padding: 0 18px;
        width: 145px;
    }

    .webmail-compose span,
    .webmail-nav-label,
    .webmail-nav-count,
    .webmail-nav-heading,
    .webmail-quota {
        display: initial;
    }

    .webmail-nav-heading {
        display: flex;
    }

    .webmail-quota {
        display: block;
    }

    .webmail-nav-item,
    body.webmail-nav-open .webmail-nav-item {
        border-radius: 0 18px 18px 0;
        grid-template-columns: 24px minmax(0, 1fr) auto;
        justify-content: initial;
        margin-inline: 0;
        padding-inline: 16px;
        width: 100%;
    }

    body.webmail-enhanced:not(.task-login) > #layout {
        left: 0;
    }

    #webmail-quick-settings {
        width: 100vw;
    }

    #webmail-topbar {
        height: var(--wp-topbar-height);
    }

    #webmail-top-search {
        height: 40px;
    }

    #webmail-top-search input,
    .webmail-search-placeholder {
        font-size: 13px;
        height: 38px !important;
    }

    .webmail-avatar {
        height: 36px;
        width: 36px;
    }

    body.task-login.webmail-enhanced {
        align-items: flex-start;
        padding: 90px 16px 24px;
    }

    body.task-login.webmail-enhanced #layout,
    body.task-login.webmail-enhanced #layout-content {
        width: 100%;
    }

    body.task-login.webmail-enhanced #layout-content {
        padding: 28px 22px;
    }

    body.task-mail.action-none.webmail-enhanced #messagelist tr.message {
        grid-template-columns: 40px 34px 28px minmax(0, 1fr) 72px;
        grid-template-rows: 32px 32px;
        height: 64px;
    }

    body.task-mail.action-none.webmail-enhanced #messagelist td {
        height: 64px;
    }

    body.task-mail.action-none.webmail-enhanced #messagelist td.flags {
        height: 64px;
    }

    body.task-mail.action-none.webmail-enhanced #messagelist td.flag {
        grid-row: 1 / 3;
    }

    body.task-mail.action-none.webmail-enhanced #messagelist td.fromto {
        grid-column: 4;
        grid-row: 1;
        height: 32px;
        padding-top: 7px;
    }

    body.task-mail.action-none.webmail-enhanced #messagelist td.subject {
        grid-column: 4 / 6;
        grid-row: 2;
        height: 32px;
        padding: 0 10px 7px 0;
    }

    body.task-mail.action-none.webmail-enhanced #messagelist td.date {
        grid-column: 5;
        grid-row: 1;
        height: 32px;
        padding: 7px 10px 0 0;
    }

    body.task-mail.action-none.webmail-enhanced #messagelist td.attachment {
        display: none !important;
    }

    body.task-mail.action-show.webmail-enhanced #layout-content > .content {
        padding: 18px 16px 40px;
    }

    body.task-mail.action-show.webmail-enhanced #message-header h2.subject {
        font-size: 20px;
        margin-left: 0;
        margin-bottom: 18px;
    }

    body.task-mail.action-show.webmail-enhanced #message-content,
    .webmail-reader-actions {
        padding-left: 0;
    }

    body.task-mail.action-compose.webmail-enhanced #webmail-topbar,
    body.task-mail.action-compose.webmail-enhanced #webmail-nav {
        display: none;
    }

    body.task-mail.action-compose.webmail-enhanced > #layout {
        border: 0;
        inset: 0;
    }

    body.task-mail.action-compose.webmail-enhanced #layout-content > .header {
        min-height: 56px;
    }

    body.task-mail.action-compose.webmail-enhanced #layout-content > .content {
        padding: 10px 14px 72px;
    }

    body.task-mail.action-compose.webmail-enhanced #composebody {
        min-height: 350px;
    }

    body.task-addressbook.webmail-enhanced #layout,
    body.task-settings.webmail-enhanced #layout {
        display: block;
    }

    body.task-addressbook.webmail-enhanced #layout-sidebar,
    body.task-settings.webmail-enhanced #layout-sidebar,
    body.task-addressbook.webmail-enhanced #layout-list,
    body.task-settings.webmail-enhanced #layout-list {
        border: 0;
        width: 100% !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
/* Public account creation is exposed only when the signed-in tenant snapshot
   says that global and per-domain registration are both enabled. */
.webmail-registration-link,
.webmail-recovery-link {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  display: block;
  margin: 0.85rem auto;
  color: var(--webmail-primary, #4f63d9);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.webmail-registration-link:hover,
.webmail-registration-link:focus-visible,
.webmail-recovery-link:hover,
.webmail-recovery-link:focus-visible {
  text-decoration: underline;
}

body.webmail-registration-open {
  overflow: hidden !important;
}

body.task-login.webmail-enhanced #login-footer {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

body.task-login.webmail-enhanced #login-footer .webmail-registration-link,
body.task-login.webmail-enhanced #login-footer .webmail-recovery-link {
  align-items: center;
  align-self: stretch;
  background: #fff;
  border: 1px solid var(--wp-brand);
  border-radius: 999px;
  color: var(--wp-brand);
  display: flex;
  font-size: 14px;
  font-weight: 750;
  justify-content: center;
  margin: 0;
  min-height: 42px;
  padding: 0 18px;
  text-decoration: none;
}

body.task-login.webmail-enhanced #login-footer .webmail-registration-link:hover,
body.task-login.webmail-enhanced #login-footer .webmail-registration-link:focus-visible,
body.task-login.webmail-enhanced #login-footer .webmail-recovery-link:hover,
body.task-login.webmail-enhanced #login-footer .webmail-recovery-link:focus-visible {
  background: color-mix(in srgb, var(--wp-brand) 8%, #fff);
  text-decoration: none;
}

.webmail-login-security-text {
  display: block;
  margin-top: .35rem;
}

.webmail-registration-modal[hidden] {
  display: none !important;
}

.webmail-registration-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 10000;
}

.webmail-registration-backdrop {
  background: rgba(15, 23, 42, .58);
  border: 0;
  cursor: default;
  inset: 0;
  position: absolute;
}

.webmail-registration-panel {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .28);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 0 28px 28px;
  position: relative;
  width: min(720px, 100%);
  z-index: 1;
}

.webmail-registration-panel > header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--wp-border);
  display: flex;
  justify-content: space-between;
  margin: 0 -28px 24px;
  padding: 20px 28px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.webmail-registration-panel > header h2 {
  color: var(--wp-text);
  font-size: 24px;
  margin: 0;
}

.webmail-registration-close {
  align-items: center;
  background: #f1f3f4;
  border: 0;
  border-radius: 50%;
  color: var(--wp-text);
  cursor: pointer;
  display: flex;
  font-size: 25px;
  height: 38px;
  justify-content: center;
  line-height: 1;
  width: 38px;
}

.webmail-registration-content.is-loading {
  opacity: .65;
  pointer-events: none;
}

.webmail-registration-loading,
.registration-empty,
.registration-error {
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.webmail-registration-loading,
.registration-empty {
  background: #f7f9fc;
  color: var(--wp-text-soft);
}

.registration-error {
  background: #fef3f2;
  color: #b42318;
  margin-bottom: 18px;
}

.registration-embed form {
  display: grid;
  gap: 19px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.registration-embed .wide {
  grid-column: 1 / -1;
}

.registration-address {
  background: #f7f9fc;
  border: 1px solid var(--wp-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px;
}

.registration-address span,
.recaptcha-disclosure,
.request-reference {
  color: var(--wp-text-soft);
  font-size: 12px;
}

.registration-address strong {
  color: var(--wp-text);
  font-size: 17px;
}

.recaptcha-disclosure {
  margin: -4px 0 0;
}

.registration-embed label {
  color: var(--wp-text);
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 750;
  gap: 7px;
  min-width: 0;
}

.registration-embed label small {
  color: var(--wp-text-soft);
  font-weight: 400;
}

.registration-embed input,
.registration-embed select {
  background: #fff;
  border: 1px solid #bdc9db;
  border-radius: 10px;
  color: var(--wp-text);
  font: inherit;
  height: 46px;
  padding: 0 12px;
  width: 100%;
}

.registration-embed input:focus,
.registration-embed select:focus {
  border-color: var(--wp-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp-brand) 18%, transparent);
  outline: 0;
}

.registration-embed .address-row {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.25fr);
}

.registration-embed .at {
  font-size: 21px;
  padding-bottom: 10px;
}

.registration-availability {
  font-size: 12px;
  margin: -10px 0 0;
  min-height: 18px;
}

.registration-availability.is-checking { color: var(--wp-text-soft); }
.registration-availability.is-available { color: #067647; }
.registration-availability.is-unavailable { color: #b42318; }

.registration-embed .password-row {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

.registration-primary {
  align-items: center;
  background: var(--wp-brand);
  border: 0;
  border-radius: 999px;
  color: #fff !important;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 750;
  justify-content: center;
  padding: 13px 22px;
  text-decoration: none !important;
}

.registration-primary:disabled {
  cursor: wait;
  opacity: .65;
}

.registration-success {
  color: var(--wp-text-soft);
  padding: 12px 0;
  text-align: center;
}

.registration-success .success-mark {
  align-items: center;
  background: #079455;
  border-radius: 16px;
  color: #fff;
  display: flex;
  font-size: 25px;
  font-weight: 800;
  height: 54px;
  justify-content: center;
  margin: 0 auto;
  width: 54px;
}

.registration-success h2 {
  color: var(--wp-text);
  margin: 18px 0 8px;
}

.registration-success .created-address {
  color: var(--wp-text);
  font-size: 19px;
  font-weight: 800;
}

@media (max-width: 650px) {
  .webmail-registration-modal { padding: 8px; }
  .webmail-registration-panel { max-height: calc(100vh - 16px); padding: 0 18px 22px; }
  .webmail-registration-panel > header { margin: 0 -18px 20px; padding: 16px 18px; }
  .registration-embed .password-row,
  .registration-embed form { grid-template-columns: 1fr; }
  .registration-embed .address-row { gap: 7px; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr); }
  .registration-embed .wide { grid-column: auto; }
}
