
/* MHA Messaging Centre plugin: header utility + notification overlay only. */
.mha-mc-header-tools{display:inline-flex;align-items:center;gap:7px;margin-right:7px}
.mha-mc-icon-btn{position:relative;width:40px;height:40px;border:1px solid rgba(25,54,93,.16);border-radius:10px;background:#fff;color:#173b70;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;cursor:pointer;box-shadow:0 1px 2px rgba(16,36,64,.04)}
.mha-mc-icon-btn:hover{background:#f5f8fc;color:#0f3264}.mha-mc-icon-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.mha-mc-badge{position:absolute;right:-5px;top:-6px;min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:#d92d20;color:#fff;font-size:10px;font-weight:800;line-height:19px;text-align:center;border:2px solid #fff;box-sizing:content-box}.mha-mc-badge[hidden]{display:none!important}
.mha-mc-panel{position:fixed;z-index:100000;width:min(390px,calc(100vw - 24px));max-height:520px;background:#fff;border:1px solid #dfe6ef;border-radius:14px;box-shadow:0 18px 50px rgba(17,39,70,.22);overflow:hidden}
.mha-mc-panel[hidden]{display:none!important}.mha-mc-panel-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid #e8edf4;background:#f8fafc}.mha-mc-panel-head strong{font-size:15px;color:#172033}.mha-mc-panel-head button{border:0;background:transparent;font-size:22px;color:#657286;cursor:pointer}
.mha-mc-panel-list{max-height:360px;overflow:auto}.mha-mc-notice{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #edf1f5;background:#fff;padding:13px 16px;cursor:pointer}.mha-mc-notice:hover{background:#f8fbff}.mha-mc-notice strong,.mha-mc-notice span,.mha-mc-notice small{display:block}.mha-mc-notice strong{font-size:14px;color:#172033;margin-bottom:4px}.mha-mc-notice span{font-size:13px;color:#506078;line-height:1.35}.mha-mc-notice small{font-size:11px;color:#8793a5;margin-top:6px}.mha-mc-notice--urgent strong{color:#b42318}.mha-mc-panel-empty{padding:25px 16px;text-align:center;color:#748196;font-size:13px}.mha-mc-panel-footer{display:flex;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:1px solid #e8edf4;background:#fbfcfe}.mha-mc-panel-footer button{border:0;background:transparent;color:#174a86;font-size:12px;font-weight:700;cursor:pointer}
.mha-mc-modal-backdrop{position:fixed;inset:0;z-index:100010;background:rgba(12,24,42,.5);display:flex;align-items:center;justify-content:center;padding:18px}.mha-mc-modal-backdrop[hidden]{display:none!important}.mha-mc-modal{width:min(620px,100%);max-height:calc(100vh - 36px);overflow:auto;background:#fff;border-radius:16px;box-shadow:0 22px 65px rgba(0,0,0,.25)}.mha-mc-modal-top{padding:18px 20px 10px;display:flex;gap:14px;justify-content:space-between}.mha-mc-modal-title{font-size:21px;line-height:1.2;color:#172033;margin:0}.mha-mc-modal-close{width:35px;height:35px;border:0;border-radius:8px;background:#f2f5f8;color:#526176;font-size:22px;cursor:pointer}.mha-mc-modal-meta{padding:0 20px 14px;font-size:12px;color:#8390a2}.mha-mc-modal-body{padding:0 20px 22px;white-space:pre-wrap;font-size:15px;line-height:1.6;color:#26364d}.mha-mc-modal-actions{display:flex;justify-content:flex-end;gap:10px;padding:14px 20px 20px;border-top:1px solid #edf1f5}.mha-mc-modal-actions a,.mha-mc-modal-actions button{border-radius:8px;padding:10px 15px;font-weight:700;font-size:13px;text-decoration:none;cursor:pointer}.mha-mc-action{background:#174a86;color:#fff;border:1px solid #174a86}.mha-mc-done{background:#fff;color:#35455e;border:1px solid #ccd5e1}
.mha-mc-history-title{padding:13px 16px;border-bottom:1px solid #edf1f5;font-size:12px;font-weight:800;color:#657286;text-transform:uppercase;letter-spacing:.04em}
@media(max-width:780px){.mha-mc-icon-btn{width:36px;height:36px}.mha-mc-header-tools{gap:5px;margin-right:3px}}


/*
 * Messaging Centre access:
 * the envelope is NEVER visible while hidden, even if a theme/header rule
 * gives icon buttons display:inline-flex.
 */
[data-mha-messaging-envelope][hidden],
[data-mha-mc-envelope][hidden]{
    display:none!important;
}


/*
 * Access-safe default:
 * the shared-header Messaging envelope starts hidden on every front-end page.
 * The plugin JS explicitly reveals it only after the current session is
 * confirmed as Superuser or MHA Admin.
 */
[data-mha-messaging-envelope]{
    display:none!important;
}
[data-mha-messaging-envelope][data-mha-mc-authorised="1"]{
    display:inline-flex!important;
}


.mc-preview-selectbar{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    padding:10px 12px;
    border-bottom:1px solid #e4eaf2;
    background:#f8fafc;
}
.mc-preview-selectbar[hidden]{display:none!important}
.mc-mini-btn{
    border:1px solid #c7d2e3;
    background:#fff;
    color:#0b3d78;
    border-radius:7px;
    padding:6px 10px;
    font-size:12px;
    font-weight:700;
    cursor:pointer;
}
.mc-mini-btn:hover{background:#eef4fb}
.mc-selected-summary{
    margin-left:auto;
    font-size:12px;
    font-weight:700;
    color:#526276;
}
.mc-recipient-selectable{
    display:flex!important;
    align-items:flex-start;
    gap:10px;
    cursor:pointer;
}
.mc-recipient-check{
    width:17px;
    height:17px;
    margin-top:3px;
    flex:0 0 auto;
}
.mc-recipient-body{
    min-width:0;
    display:flex;
    flex-direction:column;
}


/* V1.0.10 Recipient Preview checkbox layout fix */
#mha-messaging-centre .mc-recipient-list{
    overflow-y:auto;
    overflow-x:hidden;
}
#mha-messaging-centre label.mc-recipient-selectable{
    display:flex!important;
    align-items:flex-start!important;
    gap:10px!important;
    width:100%!important;
    margin:0!important;
    box-sizing:border-box!important;
    text-transform:none!important;
    letter-spacing:normal!important;
}
#mha-messaging-centre input.mc-recipient-check{
    width:17px!important;
    min-width:17px!important;
    max-width:17px!important;
    height:17px!important;
    min-height:17px!important;
    padding:0!important;
    margin:2px 0 0 0!important;
    flex:0 0 17px!important;
}
#mha-messaging-centre .mc-recipient-body{
    display:flex!important;
    flex:1 1 auto!important;
    min-width:0!important;
    width:auto!important;
    max-width:calc(100% - 27px)!important;
    flex-direction:column!important;
}


