/* TALKCHAT_R19C12R9R14R2_DESKTOP_CONTEXT_MENU_VISUAL_FIX
   Desktop-only context-menu readability and overlap cleanup.
   Functional r14 actions remain unchanged.
*/

@media (min-width:768px){
  .desktop-chat-context-menu{
    width:252px!important;
    max-height:min(82vh,570px)!important;
    padding:7px!important;
    overflow-y:auto!important;

    background:#ffffff!important;
    color:#172033!important;
    border:1px solid #cfd8e3!important;
    border-radius:11px!important;
    box-shadow:
      0 18px 46px rgba(15,23,42,.18),
      0 3px 10px rgba(15,23,42,.08)!important;

    font-family:Roboto,Arial,sans-serif!important;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
  }

  .desktop-chat-context-title{
    min-height:42px!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    padding:0 10px!important;
    margin:0 0 5px!important;

    background:#f8fafc!important;
    border:1px solid #e3e9f0!important;
    border-radius:8px!important;

    color:#111827!important;
    opacity:1!important;
  }

  .desktop-chat-context-title .material-symbols-outlined{
    flex:0 0 auto!important;
    font-size:18px!important;
    color:#168de0!important;
    font-variation-settings:"FILL" 0,"wght" 550,"GRAD" 0,"opsz" 20!important;
  }

  .desktop-chat-context-title b{
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;

    color:#111827!important;
    font-size:13px!important;
    line-height:1.2!important;
    font-weight:800!important;
    letter-spacing:0!important;
    opacity:1!important;
  }

  .desktop-chat-context-menu>button{
    min-height:39px!important;
    height:39px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:12px!important;

    padding:0 10px 0 11px!important;
    margin:1px 0!important;

    background:#ffffff!important;
    color:#253247!important;
    border:1px solid transparent!important;
    border-radius:8px!important;

    font-family:Roboto,Arial,sans-serif!important;
    font-size:12.5px!important;
    line-height:1!important;
    font-weight:600!important;
    opacity:1!important;
  }

  .desktop-chat-context-menu>button>span:first-child{
    min-width:0!important;
    flex:1 1 auto!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;

    color:#253247!important;
    font-size:12.5px!important;
    line-height:1.2!important;
    font-weight:600!important;
    opacity:1!important;
  }

  .desktop-chat-context-menu>button>.material-symbols-outlined{
    flex:0 0 auto!important;
    color:#5b6b7f!important;
    font-size:18px!important;
    line-height:1!important;
    font-variation-settings:"FILL" 0,"wght" 500,"GRAD" 0,"opsz" 20!important;
    opacity:1!important;
  }

  .desktop-chat-context-menu>button:hover,
  .desktop-chat-context-menu>button:focus-visible{
    background:#edf6ff!important;
    color:#0b69aa!important;
    border-color:#cce7fb!important;
    outline:0!important;
  }

  .desktop-chat-context-menu>button:hover>span:first-child,
  .desktop-chat-context-menu>button:focus-visible>span:first-child{
    color:#0b69aa!important;
  }

  .desktop-chat-context-menu>button:hover>.material-symbols-outlined,
  .desktop-chat-context-menu>button:focus-visible>.material-symbols-outlined{
    color:#168de0!important;
  }

  .desktop-chat-context-separator{
    height:1px!important;
    margin:6px 5px!important;
    background:#dfe6ee!important;
    opacity:1!important;
  }

  /* r14 status modal: match the stronger light-mode typography too. */
  .desktop-system-status-card{
    color:#172033!important;
  }
  .desktop-system-status-card>header>strong{
    color:#111827!important;
    font-size:13px!important;
    font-weight:800!important;
  }
  .system-status-row{
    font-size:12px!important;
  }
  .system-status-row span{
    color:#64748b!important;
    font-weight:500!important;
  }
  .system-status-row b{
    color:#172033!important;
    font-weight:750!important;
  }
}

/* Explicit dark mode: never inherit the light colors above. */
@media (min-width:768px){
  html[data-theme="dark"] .desktop-chat-context-menu{
    background:#151f2b!important;
    color:#e8eef5!important;
    border-color:#2f3c4b!important;
    box-shadow:0 20px 50px rgba(0,0,0,.45)!important;
  }

  html[data-theme="dark"] .desktop-chat-context-title{
    background:#111922!important;
    border-color:#2b3745!important;
    color:#eef3f8!important;
  }

  html[data-theme="dark"] .desktop-chat-context-title b{
    color:#eef3f8!important;
  }

  html[data-theme="dark"] .desktop-chat-context-menu>button{
    background:#151f2b!important;
    color:#d8e1ea!important;
  }

  html[data-theme="dark"] .desktop-chat-context-menu>button>span:first-child{
    color:#d8e1ea!important;
  }

  html[data-theme="dark"] .desktop-chat-context-menu>button>.material-symbols-outlined{
    color:#98a9bb!important;
  }

  html[data-theme="dark"] .desktop-chat-context-menu>button:hover,
  html[data-theme="dark"] .desktop-chat-context-menu>button:focus-visible{
    background:#203044!important;
    border-color:#304a63!important;
    color:#61baff!important;
  }

  html[data-theme="dark"] .desktop-chat-context-menu>button:hover>span:first-child,
  html[data-theme="dark"] .desktop-chat-context-menu>button:focus-visible>span:first-child,
  html[data-theme="dark"] .desktop-chat-context-menu>button:hover>.material-symbols-outlined,
  html[data-theme="dark"] .desktop-chat-context-menu>button:focus-visible>.material-symbols-outlined{
    color:#61baff!important;
  }

  html[data-theme="dark"] .desktop-chat-context-separator{
    background:#2b3745!important;
  }
}

/* Mobile context/long-press behavior is intentionally untouched. */
