/* TALKCHAT_R20A35_YETKILERIM_MODAL_THEME
   UI-only: Yetkilerim centered modal + room observer light/dark parity.
   Existing permission, socket, history and presence behavior are unchanged. */

#tc-myperm-portal .tc-myperm-modal-backdrop{
  position:fixed!important;
  inset:0!important;
  z-index:2147481200!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  width:100vw!important;
  height:100dvh!important;
  padding:24px!important;
  background:rgba(15,23,42,.24)!important;
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
}

#tc-myperm-portal .tc-myperm-modal-card{
  --tc-myperm-bg:#ffffff;
  --tc-myperm-soft:#f8fafc;
  --tc-myperm-text:#1f2937;
  --tc-myperm-muted:#64748b;
  --tc-myperm-border:#e2e8f0;
  position:relative!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  transform:none!important;
  float:none!important;
  width:min(860px,calc(100vw - 48px))!important;
  min-width:0!important;
  max-width:860px!important;
  height:auto!important;
  min-height:0!important;
  max-height:84dvh!important;
  margin:0!important;
  border:1px solid var(--tc-myperm-border)!important;
  border-radius:18px!important;
  overflow:auto!important;
  overscroll-behavior:contain;
  background:var(--tc-myperm-bg)!important;
  color:var(--tc-myperm-text)!important;
  box-shadow:0 24px 70px rgba(15,23,42,.24)!important;
}

#tc-myperm-portal .tc-myperm-modal-card .msref-menu-user{
  position:sticky!important;
  top:0!important;
  z-index:6!important;
  min-height:auto!important;
  background:var(--tc-myperm-bg)!important;
  color:var(--tc-myperm-text)!important;
  border-bottom:1px solid var(--tc-myperm-border)!important;
}

#tc-myperm-portal .tc-myperm-modal-card .msref-menu-user-copy small,
#tc-myperm-portal .tc-myperm-modal-card .msref-menu-section>h4{
  color:var(--tc-myperm-muted)!important;
}

#tc-myperm-portal .tc-myperm-modal-card .msref-menu-section{
  background:transparent!important;
  color:var(--tc-myperm-text)!important;
}

#tc-myperm-portal .tc-myperm-modal-card .msref-menu-section>div{
  background:var(--tc-myperm-bg)!important;
  border-color:var(--tc-myperm-border)!important;
}

#tc-myperm-portal .tc-myperm-modal-card .msref-menu-section hr{
  border-color:var(--tc-myperm-border)!important;
}

#tc-myperm-portal .tc-myperm-modal-card [data-myperm-action]{
  color:var(--tc-myperm-text);
}

#tc-myperm-portal .tc-myperm-modal-card [data-myperm-action]:hover{
  background:var(--tc-myperm-soft)!important;
}

#tc-room-observer{
  --tc-observer-bg:#ffffff;
  --tc-observer-head:#f8fafc;
  --tc-observer-body:#ffffff;
  --tc-observer-text:#1f2937;
  --tc-observer-muted:#64748b;
  --tc-observer-border:#dbe4ec;
  --tc-observer-row-border:#e5e7eb;
  --tc-observer-hover:#f8fafc;
  --tc-observer-shadow:0 14px 40px rgba(15,23,42,.18);
  color:var(--tc-observer-text)!important;
  scrollbar-color:#aab6c2 transparent;
}

#tc-room-observer [data-observer-head]{
  color:var(--tc-observer-text)!important;
  border-bottom:1px solid var(--tc-observer-border)!important;
}

#tc-room-observer [data-observer-messages]{
  color:var(--tc-observer-text)!important;
}

#tc-room-observer [data-observer-message]{
  border-bottom-color:var(--tc-observer-row-border)!important;
}

#tc-room-observer [data-observer-message]:hover{
  background:var(--tc-observer-hover);
}

#tc-room-observer [data-observer-close]{
  color:var(--tc-observer-text)!important;
  border-radius:8px;
}

#tc-room-observer [data-observer-close]:hover{
  background:var(--tc-observer-hover)!important;
}

html.dark #tc-myperm-portal .tc-myperm-modal-backdrop,
html[data-theme="dark"] #tc-myperm-portal .tc-myperm-modal-backdrop{
  background:rgba(2,8,15,.46)!important;
}

html.dark #tc-myperm-portal .tc-myperm-modal-card,
html[data-theme="dark"] #tc-myperm-portal .tc-myperm-modal-card{
  --tc-myperm-bg:#111c28;
  --tc-myperm-soft:#1b2a38;
  --tc-myperm-text:#edf4fa;
  --tc-myperm-muted:#a5b6c5;
  --tc-myperm-border:#304253;
  box-shadow:0 24px 70px rgba(0,0,0,.48)!important;
}

html.dark #tc-room-observer,
html[data-theme="dark"] #tc-room-observer{
  --tc-observer-bg:#101923;
  --tc-observer-head:#081622;
  --tc-observer-body:#050c12;
  --tc-observer-text:#edf4fa;
  --tc-observer-muted:#9fb0bf;
  --tc-observer-border:#304253;
  --tc-observer-row-border:#263746;
  --tc-observer-hover:#142331;
  --tc-observer-shadow:0 14px 40px rgba(0,0,0,.40);
  scrollbar-color:#52687a transparent;
}

@media (max-width:767px){
  #tc-myperm-portal .tc-myperm-modal-backdrop{
    padding:8px!important;
  }

  #tc-myperm-portal .tc-myperm-modal-card{
    width:94vw!important;
    max-width:94vw!important;
    height:88dvh!important;
    max-height:88dvh!important;
    border-radius:16px!important;
  }
}

/* /TALKCHAT_R20A35_YETKILERIM_MODAL_THEME */


/* TALKCHAT_R20A35R1_MODAL_PORTAL_QUIZ_FIX */
#tc-myperm-portal{position:fixed!important;inset:0!important;z-index:2147481200!important;width:100vw!important;height:100dvh!important;pointer-events:auto!important;font-family:inherit}
#tc-myperm-portal .tc-myperm-modal-backdrop{pointer-events:auto!important}
#tc-myperm-portal .tc-myperm-modal-card{pointer-events:auto!important}
#tc-room-observer .tc-observer-quiz-message{color:var(--tc-observer-text)!important}
#tc-room-observer .tc-observer-quiz-message .quiz-ref-question,
#tc-room-observer .tc-observer-quiz-message .quiz-ref-question-card,
#tc-room-observer .tc-observer-quiz-message .quiz-ref-line{max-width:100%!important;box-sizing:border-box}
#tc-room-observer .tc-observer-quiz-message .quiz-ref-question{margin:0!important}
#tc-room-observer .tc-observer-quiz-message .quiz-ref-avatar{flex:0 0 auto}
#tc-room-observer .tc-observer-quiz-fallback{opacity:.82}
/* /TALKCHAT_R20A35R1_MODAL_PORTAL_QUIZ_FIX */

/* TALKCHAT_R20A35R2_YETKILERIM_3COL_HARD_ISOLATION */
#tc-myperm-portal{position:fixed!important;inset:0!important;z-index:2147483000!important;width:100vw!important;height:100dvh!important;pointer-events:auto!important}
#tc-myperm-portal .tc-myperm-overlay{position:absolute!important;inset:0!important;display:grid!important;place-items:center!important;width:100%!important;height:100%!important;box-sizing:border-box!important;padding:34px!important;overflow:hidden!important;background:rgba(15,23,42,.28)!important;backdrop-filter:blur(2px)!important;-webkit-backdrop-filter:blur(2px)!important;pointer-events:auto!important}
#tc-myperm-portal .tc-myperm-window{--tc-myperm-bg:#fff;--tc-myperm-soft:#f8fafc;--tc-myperm-text:#1f2937;--tc-myperm-muted:#64748b;--tc-myperm-border:#dfe6ee;position:relative!important;inset:auto!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;float:none!important;transform:none!important;display:flex!important;flex-direction:column!important;width:min(1180px,calc(100vw - 68px))!important;min-width:0!important;max-width:1180px!important;height:min(760px,calc(100dvh - 68px))!important;min-height:420px!important;max-height:760px!important;margin:0!important;padding:0!important;overflow:hidden!important;border:1px solid var(--tc-myperm-border)!important;border-radius:18px!important;background:var(--tc-myperm-bg)!important;color:var(--tc-myperm-text)!important;box-shadow:0 28px 90px rgba(15,23,42,.30)!important;pointer-events:auto!important;font-family:inherit!important}
#tc-myperm-portal .tc-myperm-window>.msref-menu-user{position:relative!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;flex:0 0 auto!important;min-height:64px!important;box-sizing:border-box!important;display:flex!important;align-items:center!important;gap:10px!important;padding:10px 16px!important;background:var(--tc-myperm-bg)!important;color:var(--tc-myperm-text)!important;border-bottom:1px solid var(--tc-myperm-border)!important;z-index:2!important}
#tc-myperm-portal .tc-myperm-window>.msref-menu-scroll{position:relative!important;flex:1 1 auto!important;min-height:0!important;width:100%!important;max-width:none!important;box-sizing:border-box!important;overflow:auto!important;overscroll-behavior:contain!important;background:var(--tc-myperm-soft)!important;color:var(--tc-myperm-text)!important}
#tc-myperm-portal .tc-myperm-window-home>.msref-menu-scroll{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-rows:max-content!important;align-content:start!important;gap:16px!important;padding:18px!important}
#tc-myperm-portal .tc-myperm-window-detail>.msref-menu-scroll{display:block!important;padding:18px!important}
#tc-myperm-portal .tc-myperm-window .msref-menu-section{position:relative!important;inset:auto!important;min-width:0!important;width:auto!important;margin:0!important;padding:0!important;background:transparent!important;color:var(--tc-myperm-text)!important}
#tc-myperm-portal .tc-myperm-window .msref-menu-section>h4{margin:0 0 7px 3px!important;color:var(--tc-myperm-muted)!important;font-size:11px!important;font-weight:700!important;letter-spacing:.04em!important}
#tc-myperm-portal .tc-myperm-window .msref-menu-section>div{overflow:hidden!important;border:1px solid var(--tc-myperm-border)!important;border-radius:13px!important;background:var(--tc-myperm-bg)!important;box-shadow:0 1px 2px rgba(15,23,42,.04)!important}
#tc-myperm-portal .tc-myperm-window .msref-menu-section>div>button,#tc-myperm-portal .tc-myperm-window [data-myperm-action]{box-sizing:border-box!important;width:100%!important;min-width:0!important;color:var(--tc-myperm-text)!important}
#tc-myperm-portal .tc-myperm-window .msref-menu-section hr{border-color:var(--tc-myperm-border)!important}
#tc-myperm-portal .tc-myperm-window [data-myperm-action]:hover{background:#f1f5f9!important}
html[data-theme="dark"] #tc-myperm-portal .tc-myperm-overlay,html.dark #tc-myperm-portal .tc-myperm-overlay{background:rgba(2,8,15,.52)!important}
html[data-theme="dark"] #tc-myperm-portal .tc-myperm-window,html.dark #tc-myperm-portal .tc-myperm-window{--tc-myperm-bg:#111c28;--tc-myperm-soft:#0d1722;--tc-myperm-text:#edf4fa;--tc-myperm-muted:#9fb0bf;--tc-myperm-border:#304253;box-shadow:0 28px 90px rgba(0,0,0,.48)!important}
html[data-theme="dark"] #tc-myperm-portal .tc-myperm-window [data-myperm-action]:hover,html.dark #tc-myperm-portal .tc-myperm-window [data-myperm-action]:hover{background:#1b2a38!important}
@media(max-width:980px){#tc-myperm-portal .tc-myperm-window-home>.msref-menu-scroll{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:767px){#tc-myperm-portal .tc-myperm-overlay{padding:8px!important}#tc-myperm-portal .tc-myperm-window{width:94vw!important;max-width:94vw!important;height:88dvh!important;min-height:0!important;max-height:88dvh!important;border-radius:16px!important}#tc-myperm-portal .tc-myperm-window-home>.msref-menu-scroll{grid-template-columns:1fr!important;gap:12px!important;padding:12px!important}#tc-myperm-portal .tc-myperm-window-detail>.msref-menu-scroll{padding:12px!important}}
/* /TALKCHAT_R20A35R2_YETKILERIM_3COL_HARD_ISOLATION */


/* TALKCHAT_R20A35R3R2_YETKILERIM_FULL_ISOLATED_MODAL
   Critical geometry is inline in JS so global profile/drawer CSS cannot override it.
   Remaining legacy section markup in detail screens is neutralized only inside tcperm-body. */
#tc-myperm-portal .tcperm-row:hover{background:rgba(127,127,127,.09)!important}
#tc-myperm-portal .tcperm-head button:hover{background:rgba(127,127,127,.10)!important}
#tc-myperm-portal .tcperm-body::-webkit-scrollbar{width:8px}
#tc-myperm-portal .tcperm-body::-webkit-scrollbar-thumb{background:rgba(127,127,127,.35);border-radius:999px}
#tc-myperm-portal .tcperm-body::-webkit-scrollbar-track{background:transparent}

#tc-myperm-portal .tcperm-body .msref-menu-section{
  position:relative!important;
  inset:auto!important;
  display:block!important;
  min-width:0!important;
  width:auto!important;
  max-width:none!important;
  height:auto!important;
  margin:0 0 14px!important;
  padding:0!important;
  background:transparent!important;
  color:inherit!important;
  transform:none!important;
  float:none!important;
}
#tc-myperm-portal .tcperm-body .msref-menu-section>h4{
  margin:0 0 7px 3px!important;
  padding:0!important;
  font-size:11px!important;
  font-weight:700!important;
  letter-spacing:.04em!important;
  opacity:.66!important;
}
#tc-myperm-portal .tcperm-body .msref-menu-section>div{
  position:relative!important;
  inset:auto!important;
  display:block!important;
  width:auto!important;
  max-width:none!important;
  overflow:hidden!important;
  border:1px solid rgba(127,127,127,.24)!important;
  border-radius:13px!important;
  background:rgba(255,255,255,.035)!important;
}
@media (max-width:767px){
  #tc-myperm-portal .tcperm-dialog{width:94vw!important;max-width:94vw!important;height:88dvh!important;max-height:88dvh!important}
}
/* /TALKCHAT_R20A35R3R2_YETKILERIM_FULL_ISOLATED_MODAL */


/* TALKCHAT_R20A35R4R2_OBSERVER_UI_POLISH */
#tc-myperm-portal .tcperm-observer-room-section{display:block!important;min-width:0!important;margin:0!important;padding:0!important}
#tc-myperm-portal .tcperm-observer-room-section>h4{margin:0 0 10px 2px!important;padding:0!important;font-size:11px!important;font-weight:700!important;letter-spacing:.04em!important;color:#64748b!important}
#tc-myperm-portal .tcperm-observer-room-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;width:100%!important;min-width:0!important}
#tc-myperm-portal .tcperm-observer-room-card{appearance:none!important;display:grid!important;grid-template-columns:44px minmax(0,1fr) 30px!important;align-items:center!important;gap:12px!important;width:100%!important;min-width:0!important;min-height:76px!important;box-sizing:border-box!important;margin:0!important;padding:12px 14px!important;border:1px solid #dfe6ee!important;border-radius:13px!important;background:#fff!important;color:#1f2937!important;text-align:left!important;cursor:pointer!important;box-shadow:0 1px 2px rgba(15,23,42,.04)!important;transition:border-color .16s ease,background .16s ease,transform .16s ease!important}
#tc-myperm-portal .tcperm-observer-room-card:hover{background:#f8fafc!important;border-color:#b9c8d7!important;transform:translateY(-1px)!important}
#tc-myperm-portal .tcperm-observer-room-icon{display:grid!important;place-items:center!important;width:40px!important;height:40px!important;border-radius:12px!important;background:#eef6fc!important;color:#3979a7!important}
#tc-myperm-portal .tcperm-observer-room-icon .material-symbols-outlined{font-size:21px!important}
#tc-myperm-portal .tcperm-observer-room-copy{display:flex!important;flex-direction:column!important;min-width:0!important;gap:5px!important}
#tc-myperm-portal .tcperm-observer-room-copy>b{display:block!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:14px!important;line-height:1.25!important}
#tc-myperm-portal .tcperm-observer-room-copy>small{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:6px!important;color:#64748b!important;font-size:11px!important}
#tc-myperm-portal .tcperm-observer-room-arrow{justify-self:end!important;color:#8091a2!important;font-size:20px!important}
#tc-myperm-portal .tcperm-observer-room-empty{display:grid!important;place-items:center!important;min-height:130px!important;border:1px dashed #cbd5e1!important;border-radius:13px!important;color:#64748b!important;background:#fff!important}

html[data-theme="dark"] #tc-myperm-portal .tcperm-observer-room-section>h4,
html.dark #tc-myperm-portal .tcperm-observer-room-section>h4{color:#9fb0bf!important}
html[data-theme="dark"] #tc-myperm-portal .tcperm-observer-room-card,
html.dark #tc-myperm-portal .tcperm-observer-room-card{background:#162330!important;color:#edf4fa!important;border-color:#304253!important;box-shadow:0 1px 2px rgba(0,0,0,.14)!important}
html[data-theme="dark"] #tc-myperm-portal .tcperm-observer-room-card:hover,
html.dark #tc-myperm-portal .tcperm-observer-room-card:hover{background:#1b2a38!important;border-color:#456078!important}
html[data-theme="dark"] #tc-myperm-portal .tcperm-observer-room-icon,
html.dark #tc-myperm-portal .tcperm-observer-room-icon{background:#203446!important;color:#77b8e8!important}
html[data-theme="dark"] #tc-myperm-portal .tcperm-observer-room-copy>small,
html.dark #tc-myperm-portal .tcperm-observer-room-copy>small{color:#9fb0bf!important}
html[data-theme="dark"] #tc-myperm-portal .tcperm-observer-room-arrow,
html.dark #tc-myperm-portal .tcperm-observer-room-arrow{color:#9fb0bf!important}
html[data-theme="dark"] #tc-myperm-portal .tcperm-observer-room-empty,
html.dark #tc-myperm-portal .tcperm-observer-room-empty{background:#162330!important;color:#9fb0bf!important;border-color:#304253!important}

#tc-room-observer{background:var(--tc-observer-bg,#fff)!important;color:var(--tc-observer-text,#1f2937)!important;border-color:var(--tc-observer-border,#dbe4ec)!important;box-shadow:var(--tc-observer-shadow,0 18px 48px rgba(15,23,42,.20))!important}
#tc-room-observer [data-observer-head]{background:var(--tc-observer-head,#f8fafc)!important;color:var(--tc-observer-text,#1f2937)!important;border-bottom:1px solid var(--tc-observer-border,#dbe4ec)!important}
#tc-room-observer [data-observer-messages]{background:var(--tc-observer-body,#fff)!important;color:var(--tc-observer-text,#1f2937)!important}
#tc-room-observer [data-observer-messages]::-webkit-scrollbar{width:8px}
#tc-room-observer [data-observer-messages]::-webkit-scrollbar-thumb{background:rgba(127,127,127,.34);border-radius:999px}
#tc-room-observer[data-observer-theme="dark"] [data-observer-messages]{color:#edf4fa!important}

@media (max-width:767px){
  #tc-myperm-portal .tcperm-observer-room-grid{grid-template-columns:1fr!important;gap:10px!important}
  #tc-myperm-portal .tcperm-observer-room-card{min-height:70px!important;padding:10px 12px!important}
}
/* /TALKCHAT_R20A35R4R2_OBSERVER_UI_POLISH */
