/* =========================================================
   Header message envelope shortcode: [elan_message_icon]
   Safe scoped UI. Does not change existing notification bell.
========================================================= */
.elan-header-msg{
    --ehm-primary:#0067ed;
    --ehm-primary-dark:#0054c7;
    --ehm-soft:#eef5ff;
    --ehm-border:#e5e7eb;
    --ehm-border-blue:#d7e7ff;
    --ehm-text:#111827;
    --ehm-muted:#6b7280;
    --ehm-bg:#ffffff;
    --ehm-shadow:0 18px 55px rgba(16,24,40,.16);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:20px;
    height:20px;
    padding:0!important;
    margin:0;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    color:var(--ehm-primary)!important;
    line-height:1;
    font-family:Roboto,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
    vertical-align:middle;
}
.elan-header-msg--white,
.elan-header-msg.white{
    --ehm-primary:#ffffff;
    --ehm-primary-dark:#ffffff;
    color:#ffffff!important;
}
.elan-header-msg,
.elan-header-msg *{box-sizing:border-box}
.elan-header-msg__trigger{
    all:unset;
    box-sizing:border-box;
    position:relative;
    width:20px!important;
    height:20px!important;
    min-width:20px!important;
    min-height:20px!important;
    max-width:20px!important;
    max-height:20px!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    outline:0;
    background:transparent!important;
    box-shadow:none!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    color:var(--ehm-primary)!important;
    cursor:pointer;
    line-height:1!important;
    transition:color .18s ease,opacity .18s ease,transform .18s ease;
    -webkit-appearance:none;
    appearance:none;
}
.elan-header-msg__trigger:hover,
.elan-header-msg.is-open .elan-header-msg__trigger{
    background:transparent!important;
    box-shadow:none!important;
    color:var(--ehm-primary-dark)!important;
    opacity:.92;
    transform:translateY(-1px);
}
.elan-header-msg--white .elan-header-msg__trigger:hover,
.elan-header-msg.white .elan-header-msg__trigger:hover,
.elan-header-msg--white.is-open .elan-header-msg__trigger,
.elan-header-msg.white.is-open .elan-header-msg__trigger{
    color:#ffffff!important;
    opacity:.86;
}
.elan-header-msg__trigger:focus-visible{
    outline:2px solid rgba(0,103,237,.24)!important;
    outline-offset:4px;
    border-radius:999px!important;
}
.elan-header-msg__icon{
    display:block!important;
    flex:0 0 auto;
    width:18px!important;
    height:18px!important;
    color:currentColor!important;
}
.elan-header-msg__badge{
    position:absolute;
    top:-8px;
    right:-10px;
    min-width:16px;
    height:16px;
    padding:0 4px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    background:#ef4444;
    color:#fff;
    font-size:9px;
    line-height:1;
    font-weight:600;
    border:2px solid #fff;
    pointer-events:none;
    box-shadow:0 6px 16px rgba(239,68,68,.28);
}
.elan-header-msg__backdrop{
    position:fixed;
    inset:0;
    z-index:999996;
    background:rgba(15,23,42,.36);
    backdrop-filter:blur(4px);
    opacity:0;
    pointer-events:none;
    transition:opacity .2s ease;
}
.elan-header-msg__drawer{
    position:fixed;
    top:0;
    right:0;
    z-index:999997;
    width:min(384px,calc(100vw - 18px));
    height:100vh;
    height:100dvh;
    display:flex;
    flex-direction:column;
    background:#fff;
    color:var(--ehm-text);
    box-shadow:var(--ehm-shadow);
    border-left:1px solid var(--ehm-border);
    transform:translateX(105%);
    transition:transform .24s cubic-bezier(.2,.8,.2,1);
    overflow:hidden;
    line-height:1.5;
}
.elan-header-msg.is-open .elan-header-msg__backdrop{
    opacity:1;
    pointer-events:auto;
}
.elan-header-msg.is-open .elan-header-msg__drawer{transform:translateX(0)}
body.elan-header-msg-lock{overflow:hidden}
.elan-header-msg__drawer-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:18px 20px;
    border-bottom:1px solid var(--ehm-border);
    background:linear-gradient(180deg,#fff,var(--ehm-soft));
}
.elan-header-msg__drawer-head h3{
    margin:0 0 3px!important;
    color:var(--ehm-text)!important;
    font-size:18px!important;
    line-height:1.2!important;
    font-weight:600!important;
}
.elan-header-msg__drawer-head p{
    margin:0!important;
    color:var(--ehm-muted)!important;
    font-size:13px!important;
    line-height:1.35!important;
}
.elan-header-msg__close{
    all:unset;
    box-sizing:border-box;
    width:34px;
    height:34px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f3f6fb;
    color:#374151;
    cursor:pointer;
    font-size:24px;
    line-height:1;
    font-weight:400;
    transition:background .15s ease,color .15s ease;
}
.elan-header-msg__close:hover{background:#e8f0ff;color:var(--ehm-primary)}
.elan-header-msg__guest,
.elan-header-msg__empty{
    margin:auto 22px;
    text-align:center;
    color:var(--ehm-muted);
}
.elan-header-msg__guest-icon{
    width:68px;
    height:68px;
    margin:0 auto 16px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:22px;
    background:var(--ehm-soft);
    color:var(--ehm-primary);
}
.elan-header-msg__guest h4,
.elan-header-msg__empty strong{
    display:block;
    margin:0 0 8px!important;
    color:var(--ehm-text)!important;
    font-size:18px!important;
    line-height:1.25!important;
    font-weight:600!important;
}
.elan-header-msg__guest p,
.elan-header-msg__empty p{
    margin:0 auto 18px!important;
    max-width:300px;
    color:var(--ehm-muted)!important;
    font-size:14px!important;
    line-height:1.55!important;
}
.elan-header-msg__summary{
    margin:16px 18px 10px;
    padding:14px;
    display:flex;
    gap:12px;
    align-items:center;
    border:1px solid var(--ehm-border-blue);
    border-radius:16px;
    background:linear-gradient(180deg,#fff,var(--ehm-soft));
}
.elan-header-msg__summary>span{
    width:44px;
    height:44px;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--ehm-primary);
    color:#fff;
    font-weight:600;
    font-size:17px;
}
.elan-header-msg__summary strong{display:block;color:var(--ehm-text);font-size:14px;font-weight:600}
.elan-header-msg__summary p{margin:2px 0 0!important;color:var(--ehm-muted)!important;font-size:12px!important;line-height:1.35!important}
.elan-header-msg__list{
    overflow:auto;
    padding:6px 12px 12px;
    -webkit-overflow-scrolling:touch;
}
.elan-header-msg__item{
    position:relative;
    display:flex;
    gap:11px;
    align-items:center;
    padding:12px 10px;
    border-radius:14px;
    text-decoration:none!important;
    color:var(--ehm-text)!important;
    border:1px solid transparent;
    transition:background .15s ease,border-color .15s ease;
}
.elan-header-msg__item:hover{
    background:#f8fbff;
    border-color:var(--ehm-border-blue);
}
.elan-header-msg__item.is-unread{background:#fbfdff;border-color:var(--ehm-border-blue)}
.elan-header-msg__avatar{
    position:relative;
    width:42px;
    height:42px;
    flex:0 0 42px;
    border-radius:50%;
    overflow:hidden;
    background:#f3f4f6;
    border:1px solid var(--ehm-border);
}
.elan-header-msg__avatar img{width:100%;height:100%;object-fit:cover;display:block}
.elan-header-msg__item-body{min-width:0;display:block;flex:1}
.elan-header-msg__item-top{display:flex;gap:10px;align-items:center;justify-content:space-between;min-width:0}
.elan-header-msg__item-top strong{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:var(--ehm-text);
    font-size:13.5px;
    line-height:1.25;
    font-weight:600;
}
.elan-header-msg__item-top em{flex:0 0 auto;color:#9ca3af;font-size:11px;font-style:normal;font-weight:600}
.elan-header-msg__item-label,
.elan-header-msg__preview{
    display:block;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:12px;
    line-height:1.35;
}
.elan-header-msg__item-label{margin-top:2px;color:var(--ehm-primary);font-weight:600}
.elan-header-msg__preview{margin-top:2px;color:var(--ehm-muted)}
.elan-header-msg__mini-badge{
    min-width:20px;
    height:20px;
    padding:0 6px;
    border-radius:999px;
    background:var(--ehm-primary);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:11px;
    line-height:1;
    font-weight:600;
}
.elan-header-msg__foot{
    margin-top:auto;
    padding:14px 18px 18px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    border-top:1px solid var(--ehm-border);
    background:#fff;
}
.elan-header-msg__primary,
.elan-header-msg__secondary,
.elan-header-msg__empty a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:10px 14px;
    border-radius:12px;
    text-decoration:none!important;
    font-size:13px;
    font-weight:600;
    text-align:center;
}
.elan-header-msg__primary{background:var(--ehm-primary);color:#fff!important}
.elan-header-msg__primary:hover{background:var(--ehm-primary-dark);color:#fff!important}
.elan-header-msg__secondary,
.elan-header-msg__empty a{background:var(--ehm-soft);color:var(--ehm-primary)!important;border:1px solid var(--ehm-border-blue)}
.elan-header-msg__secondary:hover,
.elan-header-msg__empty a:hover{background:#e5f0ff;color:var(--ehm-primary-dark)!important}
@media(max-width:768px){
    .elan-header-msg__trigger{width:38px;height:38px;border-radius:11px}
    .elan-header-msg__drawer{width:min(360px,calc(100vw - 14px))}
}
@media(max-width:480px){
    .elan-header-msg__drawer{width:calc(100vw - 10px)}
    .elan-header-msg__drawer-head{padding:16px}
    .elan-header-msg__summary{margin:12px 12px 6px;padding:12px}
    .elan-header-msg__list{padding:4px 8px 10px}
    .elan-header-msg__item{padding:11px 8px;border-radius:12px}
    .elan-header-msg__foot{padding:12px;grid-template-columns:1fr;gap:8px}
}
@media(prefers-reduced-motion:reduce){
    .elan-header-msg__trigger,.elan-header-msg__backdrop,.elan-header-msg__drawer,.elan-header-msg__item{transition:none!important}
}


/* Header-only theme shield extracted from elanlar-polish-v43.css. */
.elan-header-msg,.elan-header-msg *,.elan-header-msg *::before,.elan-header-msg *::after{box-sizing:border-box}
.elan-header-msg{font-family:Roboto,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;color:#111827!important;line-height:1.4!important}
.elan-header-msg :where(button,a){font:inherit!important;text-transform:none!important;letter-spacing:normal!important}
.elan-header-msg :where(button){-webkit-appearance:none!important;appearance:none!important}
.elan-header-msg__trigger{box-shadow:none!important}
.elan-header-msg__drawer{border-color:#e3eaf4!important;box-shadow:-18px 0 54px rgba(15,23,42,.16)!important}
.elan-header-msg__primary{background:#0067ed!important;color:#fff!important}
.elan-header-msg__secondary{color:#0067ed!important}
