/* TLGAWY V64.6.17 — stable UI / private chat / visual admin / performance */

/* Private background must be resolved from a root/absolute URL set by JS/PHP. */
#private_wrap_content.tlgawy-private-custom-bg{
  background-image:linear-gradient(rgba(8,10,15,.18),rgba(8,10,15,.18)),var(--tlgawy-private-bg)!important;
  background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important;
}
/* V73: the theme gives #private_content the opaque .back_priv color. That layer
   was covering the selected feature background even though the parent had the
   correct image. Only the content layers become transparent while a custom
   background is active. */
#private_wrap_content.tlgawy-private-custom-bg #private_content,
#private_wrap_content.tlgawy-private-custom-bg #inside_wrap_private,
#private_wrap_content.tlgawy-private-custom-bg #show_private_wrap,
#private_wrap_content.tlgawy-private-custom-bg #show_private{
  background:transparent!important;background-color:transparent!important;
}

/* TLGAWY V84: legacy mobile-private block removed; v72.css is authoritative. */

/* Visual features admin: responsive tiles instead of one long narrow column. */
.tlgawy-visual-admin-page .tlgawy-admin-tabs ul{display:flex!important;flex-wrap:wrap!important;gap:5px!important}
.tlgawy-visual-admin-page .tlgawy-admin-tabs li{flex:0 0 auto!important}
.tlgawy-admin-visual-list{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))!important;gap:10px!important}
.tlgawy-admin-visual-row{margin:0!important;min-width:0!important}

/* Faster menus: keep layout/paint local and remove expensive backdrop effects. */
.float_menu,.sysmenu,#av_menu,#private_menu,#page_main_menu,#chat_left_menu,#room_options_menu,#friends_menu{
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important;will-change:auto!important;
}
.float_menu,.sysmenu,.modal_box,.empty_modal,#chat_right,#chat_left,#private_center{
  transition-duration:.07s!important;animation-duration:.09s!important;
}
#chat_right_data,#chat_left_data{scroll-behavior:auto!important}
.fmenu_item,.panel_option,.footer_item,.head_option{transition-duration:.05s!important}

/* Keep bubble previews/cards tight and side-by-side. */
.tlgawy-message-style-grid{width:100%!important;box-sizing:border-box!important}
.tlgawy-message-style-choice{width:100%!important;box-sizing:border-box!important}

/* Store rendering: contain expensive previews without affecting chat layout. */
.tlgawy-store-card{contain:layout paint style!important}
.tlgawy-store-preview img,.tlgawy-store-preview video{backface-visibility:hidden!important}


/* TLGAWY V69 — mobile composer: while the keyboard is open the bottom menu is
   hidden and the input is anchored to the bottom of the visible viewport. */
@media(max-width:900px){
 body.tlgawy-keyboard-fast #wrap_footer,
 body.tlgawy-keyboard-native #wrap_footer,
 body.tlgawy-keyboard-open #wrap_footer,
 body.tlgawy-keyboard-ios #wrap_footer{display:none!important;height:0!important;min-height:0!important;max-height:0!important;overflow:hidden!important}
 body.tlgawy-keyboard-fast #top_chat_container,
 body.tlgawy-keyboard-native #top_chat_container,
 body.tlgawy-keyboard-open #top_chat_container,
 body.tlgawy-keyboard-ios #top_chat_container{
   position:fixed!important;top:var(--tlgawy-composer-top)!important;bottom:auto!important;right:0!important;left:0!important;
   width:100%!important;margin:0!important;z-index:2147483002!important;
 }
 #content,#message_content{text-align:start!important;unicode-bidi:plaintext!important;min-width:0!important;overflow-x:auto!important;white-space:nowrap!important}
 #main_input_box,.td_input{min-width:0!important;overflow:hidden!important}
}

/* TLGAWY V69 — keep every emoji/sticker inside its picker. */
#main_emoticon,#private_emoticon{
 box-sizing:border-box!important;max-width:calc(100vw - 10px)!important;overflow:hidden!important;
}
#main_emo.emo_content,#private_emo.emo_content_priv{
 width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;
 overflow-y:auto!important;overflow-x:hidden!important;display:flex!important;flex-wrap:wrap!important;
 align-content:flex-start!important;align-items:flex-start!important;gap:3px!important;padding:6px!important;
 -webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;
}
#main_emo.emo_content > *,#private_emo.emo_content_priv > *{float:none!important;max-width:100%!important;box-sizing:border-box!important}
@media(max-width:600px){
 #main_emoticon,#private_emoticon{
   position:fixed!important;right:5px!important;left:5px!important;width:auto!important;max-width:none!important;margin:0!important;
 }
 #main_emo.emo_content,#private_emo.emo_content_priv{padding:5px!important;gap:2px!important}
 button.tlgawy-emoji-button{flex:0 0 34px!important;width:34px!important;max-width:34px!important}
 button.tlgawy-emoji-button.tlgawy-emoji-wide{flex-basis:76px!important;width:76px!important;max-width:76px!important}
}

/* Bubble cards remain clickable. Store-only cards open the store rather than
   becoming a dead/disabled control. */
.tlgawy-message-style-choice{cursor:pointer!important;touch-action:manipulation!important}
.tlgawy-message-style-choice.is-locked{opacity:.72!important;filter:none!important;cursor:pointer!important}
.tlgawy-message-style-choice.is-saving{pointer-events:none!important;opacity:.65!important}


/* V69 bubble administration — readable cards instead of cramped controls. */
#tlgawy_msg_style_admin.tlgawy-message-style-admin-grid{
 display:grid!important;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))!important;gap:12px!important;margin-top:12px!important;
}
#tlgawy_msg_style_admin .tlgawy-msg-style-admin{
 display:grid!important;grid-template-columns:100px minmax(0,1fr)!important;grid-template-areas:"preview fields" "save save"!important;
 gap:10px 12px!important;align-items:center!important;padding:14px!important;margin:0!important;border-radius:14px!important;
}
#tlgawy_msg_style_admin .tlgawy-admin-media{grid-area:preview!important;width:96px!important;height:82px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important}
#tlgawy_msg_style_admin .tlgawy-admin-visual-fields{grid-area:fields!important;display:grid!important;grid-template-columns:1fr!important;gap:7px!important;min-width:0!important}
#tlgawy_msg_style_admin .tlgawy-admin-visual-fields>b{font-size:14px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
#tlgawy_msg_style_admin .tlgawy-admin-visual-fields select{width:100%!important;min-width:0!important;height:38px!important}
#tlgawy_msg_style_admin .tlgawy-admin-visual-fields label{display:flex!important;align-items:center!important;gap:7px!important;min-height:34px!important}
#tlgawy_msg_style_admin .tlgawy-msg-save{grid-area:save!important;width:100%!important;height:38px!important;margin:0!important}
@media(max-width:600px){
 #tlgawy_msg_style_admin.tlgawy-message-style-admin-grid{grid-template-columns:1fr!important}
 #tlgawy_msg_style_admin .tlgawy-msg-style-admin{grid-template-columns:86px minmax(0,1fr)!important}
 #tlgawy_msg_style_admin .tlgawy-admin-media{width:82px!important;height:76px!important}
}

/* V73 one-tap private conversation rows. */
.gprivate{touch-action:manipulation!important;-webkit-tap-highlight-color:transparent!important;cursor:pointer}


/* TLGAWY V76 — advanced message-style administration. */
#tlgawy_msg_style_admin .msg-admin-label{display:grid!important;grid-template-columns:minmax(92px,.75fr) minmax(0,1.25fr)!important;align-items:center!important;gap:8px!important;font-size:11px!important}
#tlgawy_msg_style_admin .msg-admin-label>span,#tlgawy_msg_style_admin .msg-store-price-row span{font-weight:800!important;color:#475569!important}
#tlgawy_msg_style_admin .msg-admin-check{padding:5px 7px!important;border:1px solid #e2e8f0!important;border-radius:8px!important;background:#f8fafc!important;font-size:11px!important}
#tlgawy_msg_style_admin .msg-store-price-row{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important;padding:7px!important;border-radius:9px!important;background:#f1f5f9!important}
#tlgawy_msg_style_admin .msg-store-price-row label{display:grid!important;gap:4px!important;font-size:10px!important}
#tlgawy_msg_style_admin .msg-store-price-row input,#tlgawy_msg_style_admin .msg-store-price-row select{height:36px!important;width:100%!important}
#tlgawy_msg_style_admin .tlgawy-msg-style-admin:not(.store-enabled) .msg-store-price-row{opacity:.52!important}
@media(max-width:600px){#tlgawy_msg_style_admin .msg-admin-label{grid-template-columns:1fr!important;gap:3px!important}}

/* Target-only guest registration card inserted into the public transcript. */
.tlgawy-guest-registration-local{margin:8px 10px!important;padding:10px 12px!important;border:1px solid #60a5fa!important;border-radius:12px!important;background:#eff6ff!important;color:#0f172a!important;box-shadow:none!important;list-style:none!important;direction:rtl!important}
.tlgawy-guest-registration-local .tgr-title{font-weight:900!important;color:#1d4ed8!important;margin-bottom:5px!important}.tlgawy-guest-registration-local .tgr-note{font-size:11px!important;color:#475569!important;margin-top:5px!important}.tlgawy-guest-registration-local code{display:inline-block!important;direction:ltr!important;unicode-bidi:embed!important;background:#fff!important;border:1px solid #bfdbfe!important;border-radius:6px!important;padding:2px 6px!important;font-family:monospace!important;font-size:12px!important}

/* TLGAWY V84: V78/V79/V80 private geometry removed. */
