/* JoyJoy V499 — Shieldy message composer and full-width live preview. */

@media (min-width:1451px){
  body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-event-workspace{
    grid-template-columns:minmax(0,1.18fr) minmax(520px,.82fr)!important;
    gap:22px!important;
  }

  body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview{
    position:sticky!important;
    top:14px!important;
    align-self:start!important;
    width:100%!important;
    max-height:none!important;
    overflow:visible!important;
    scrollbar-gutter:auto!important;
  }

  body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-preview-card{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:16px!important;
    overflow:visible!important;
  }

  body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-lolka-card-preview{
    width:100%!important;
    max-width:620px!important;
    margin-inline:auto!important;
  }
}

body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .shieldy-lolka-card-topbar{
  min-height:52px!important;
  padding:10px 12px!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .shieldy-lolka-card-platform img{
  width:34px!important;
  height:34px!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .welcome-preview-message-stack{
  padding:12px!important;
  gap:10px!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .welcome-preview-message-block{
  padding:12px!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .welcome-message-author img{
  width:38px!important;
  height:38px!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .welcome-message-author strong{
  font-size:13px!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .welcome-message-author small{
  font-size:10px!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .shieldy-preview-plain-text{
  font-size:12px!important;
  line-height:1.48!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .welcome-mention-preview{
  font-size:10px!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .shieldy-welcome-image-card{
  min-height:210px!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .shieldy-welcome-image-content{
  gap:7px!important;
  padding:20px 22px!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .welcome-card-avatar-wrap{
  width:70px!important;
  height:70px!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .shieldy-welcome-image-card h4{
  font-size:16px!important;
  line-height:1.3!important;
  overflow-wrap:anywhere!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .shieldy-welcome-image-card p{
  font-size:11px!important;
  line-height:1.42!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .shieldy-welcome-member-line,
body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview .welcome-preview-footer{
  font-size:10px!important;
}

/* Console-style advanced Embed editor. */
#sh-interaction-view-welcome .welcome-native-embed-advanced{
  margin-top:2px!important;
  border:1px solid var(--account-border,var(--gh-border))!important;
  border-radius:12px!important;
  background:var(--account-surface-soft,var(--gh-subtle))!important;
  overflow:hidden!important;
}
#sh-interaction-view-welcome .welcome-native-embed-advanced>summary{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  min-height:48px!important;
  padding:12px 14px!important;
  cursor:pointer!important;
  color:var(--account-text,var(--theme-text))!important;
  font-weight:900!important;
  list-style:none!important;
}
#sh-interaction-view-welcome .welcome-native-embed-advanced>summary::-webkit-details-marker{display:none!important}
#sh-interaction-view-welcome .welcome-native-embed-advanced>summary::after{
  content:"⌄"!important;
  color:var(--account-muted,var(--gh-muted))!important;
  transition:transform .18s ease!important;
}
#sh-interaction-view-welcome .welcome-native-embed-advanced[open]>summary::after{transform:rotate(180deg)!important}
#sh-interaction-view-welcome .welcome-native-embed-advanced-body{
  display:grid!important;
  gap:12px!important;
  padding:14px!important;
  border-top:1px solid var(--account-border,var(--gh-border))!important;
}
#sh-interaction-view-welcome .welcome-native-embed-advanced-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
}
#sh-interaction-view-welcome .welcome-native-embed-field-row{
  display:grid!important;
  grid-template-columns:minmax(150px,.45fr) minmax(0,1fr) auto!important;
  gap:10px!important;
  align-items:end!important;
}
#sh-interaction-view-welcome .welcome-native-embed-field-row>.field{margin:0!important}
#sh-interaction-view-welcome .welcome-native-embed-field-inline{
  min-height:42px!important;
  margin:0 0 1px!important;
  padding:8px 10px!important;
  border:1px solid var(--account-border,var(--gh-border))!important;
  border-radius:9px!important;
  background:var(--account-surface,var(--gh-card))!important;
}
#sh-interaction-view-welcome .welcome-native-embed-option-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}

/* Rich native Embed preview. */
#sh-interaction-view-welcome .welcome-native-embed-shell{
  gap:9px!important;
  padding:13px 13px 12px 16px!important;
}
#sh-interaction-view-welcome .welcome-native-embed-author{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  min-width:0!important;
}
#sh-interaction-view-welcome .welcome-native-embed-author img{
  width:22px!important;
  height:22px!important;
  border-radius:50%!important;
  object-fit:cover!important;
}
#sh-interaction-view-welcome .welcome-native-embed-author strong{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:10px!important;
  color:#f2f5f8!important;
}
#sh-interaction-view-welcome .welcome-native-embed-copy-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:10px!important;
  align-items:start!important;
}
#sh-interaction-view-welcome .welcome-native-embed-copy{
  display:grid!important;
  gap:7px!important;
  min-width:0!important;
}
#sh-interaction-view-welcome .welcome-native-embed-copy>[data-preview-native-embed-title]{
  font-size:13px!important;
  line-height:1.35!important;
  color:#fff!important;
}
#sh-interaction-view-welcome .welcome-native-embed-copy>[data-preview-native-embed-description]{
  margin:0!important;
  color:#cbd3df!important;
  font-size:11px!important;
  line-height:1.45!important;
  white-space:pre-wrap!important;
}
#sh-interaction-view-welcome .welcome-native-embed-thumbnail{
  width:72px!important;
  height:72px!important;
  border-radius:8px!important;
  object-fit:cover!important;
}
#sh-interaction-view-welcome .welcome-native-embed-preview-fields{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:8px!important;
}
#sh-interaction-view-welcome .welcome-native-embed-preview-fields.has-inline-fields{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
#sh-interaction-view-welcome .welcome-native-embed-preview-field{
  display:grid!important;
  gap:2px!important;
  min-width:0!important;
}
#sh-interaction-view-welcome .welcome-native-embed-preview-field strong{
  color:#f2f5f8!important;
  font-size:10px!important;
}
#sh-interaction-view-welcome .welcome-native-embed-preview-field span{
  color:#b9c2cf!important;
  font-size:9px!important;
  line-height:1.38!important;
  white-space:pre-wrap!important;
}
#sh-interaction-view-welcome .welcome-native-embed-footer-row{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  min-width:0!important;
  color:#8994a4!important;
  font-size:9px!important;
}
#sh-interaction-view-welcome .welcome-native-embed-footer-row img{
  width:18px!important;
  height:18px!important;
  border-radius:50%!important;
  object-fit:cover!important;
}
#sh-interaction-view-welcome .welcome-native-embed-footer-row small{
  min-width:0!important;
  color:inherit!important;
  font-size:inherit!important;
}
#sh-interaction-view-welcome .welcome-native-embed-footer-row time::before{content:"•";margin-right:6px!important}
#sh-interaction-view-welcome .welcome-native-embed-button{
  justify-self:start!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:31px!important;
  padding:6px 10px!important;
  border:1px solid #465365!important;
  border-radius:7px!important;
  background:#28313d!important;
  color:#eef3f8!important;
  text-decoration:none!important;
  font-size:10px!important;
  font-weight:900!important;
}

@media (max-width:1450px){
  body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-event-workspace{
    grid-template-columns:minmax(0,1fr)!important;
  }
  body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-inline-preview{
    position:relative!important;
    top:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body[data-account-page="bots"] #sh-interaction-view-welcome .welcome-preview-card{
    max-width:none!important;
  }
  body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-lolka-card-preview{
    max-width:620px!important;
    margin-inline:auto!important;
  }
}
@media (max-width:760px){
  #sh-interaction-view-welcome .welcome-native-embed-advanced-grid,
  #sh-interaction-view-welcome .welcome-native-embed-option-grid,
  #sh-interaction-view-welcome .welcome-native-embed-field-row{
    grid-template-columns:1fr!important;
  }
  #sh-interaction-view-welcome .welcome-native-embed-field-inline{margin:0!important}
  #sh-interaction-view-welcome .welcome-native-embed-thumbnail{width:58px!important;height:58px!important}
}
#sh-interaction-view-welcome .welcome-native-embed-field-inline input[type="checkbox"]{
  width:18px!important;
  height:18px!important;
  margin:0!important;
  accent-color:var(--account-accent,#2da44e)!important;
}
#sh-interaction-view-welcome .welcome-native-embed-field-inline{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  white-space:nowrap!important;
}
#sh-interaction-view-welcome .welcome-native-embed-button{pointer-events:none!important}

/* Keep programmatically hidden preview/editor parts hidden despite rich-layout display rules. */
#sh-interaction-view-welcome :is(
  .welcome-native-embed-advanced,
  .welcome-native-embed-author,
  .welcome-native-embed-thumbnail,
  .welcome-native-embed-preview-fields,
  .welcome-native-embed-footer-row,
  .welcome-native-embed-footer-row img,
  .welcome-native-embed-footer-row time,
  .welcome-native-embed-button
)[hidden]{display:none!important}

#sh-interaction-view-welcome .welcome-field-label-with-counter{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
}
#sh-interaction-view-welcome .welcome-field-counter{
  flex:0 0 auto!important;
  color:var(--account-muted,var(--gh-muted))!important;
  font-size:11px!important;
  font-weight:800!important;
}
#sh-interaction-view-welcome .welcome-field-counter.is-near-limit{
  color:#b66a00!important;
}
html[data-theme="dark"] #sh-interaction-view-welcome .welcome-field-counter.is-near-limit{
  color:#e3b341!important;
}


/* V504: preview is a direct Shieldy message, without the decorative Lolka window. */
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504{
  display:grid!important;
  gap:10px!important;
  width:100%!important;
  max-width:620px!important;
  margin-inline:auto!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 .welcome-preview-message-stack{
  display:grid!important;
  gap:10px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 .welcome-preview-message-block{
  display:grid!important;
  gap:8px!important;
  padding:14px!important;
  border:1px solid #333c49!important;
  border-radius:13px!important;
  background:#20252e!important;
  color:#eef3f8!important;
  box-shadow:0 8px 22px rgba(16,28,44,.12)!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 .welcome-preview-message-block[hidden]{display:none!important}
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 .welcome-message-author{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 .welcome-message-author img{
  width:38px!important;
  height:38px!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 :is(.shieldy-preview-plain-text,.welcome-mention-preview){
  max-width:none!important;
  margin-left:47px!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 .shieldy-preview-plain-text[hidden],
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 .welcome-mention-preview[hidden]{display:none!important}
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 [data-preview-primary-card-slot],
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 [data-preview-secondary-card-slot]{
  width:auto!important;
  max-width:none!important;
  margin:2px 0 0 47px!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 .welcome-preview-secondary-message [data-preview-secondary-card-slot]{
  margin-left:0!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 .welcome-native-embed-shell{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  overflow:hidden!important;
}
/* Exact 2:1 generated card: background and content fill the same canvas. */
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 .welcome-native-embed-image-slot .shieldy-welcome-image-card{
  position:relative!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  aspect-ratio:2 / 1!important;
  margin:4px 0 0!important;
  overflow:hidden!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 .shieldy-welcome-image-card .welcome-banner-preview{
  position:absolute!important;
  inset:0!important;
  z-index:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  background-size:cover!important;
  background-position:center!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 .shieldy-welcome-image-card .shieldy-welcome-image-content{
  position:absolute!important;
  inset:0!important;
  z-index:1!important;
  min-height:0!important;
  padding:16px 20px!important;
  justify-content:center!important;
  overflow:hidden!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 .shieldy-welcome-image-card :is(h4,p,.shieldy-welcome-member-line,.welcome-preview-footer){
  overflow-wrap:anywhere!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 .shieldy-welcome-image-card h4{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  overflow:hidden!important;
}
body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 .shieldy-welcome-image-card p{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:3!important;
  overflow:hidden!important;
}
@media(max-width:620px){
  body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 :is(.shieldy-preview-plain-text,.welcome-mention-preview),
  body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 [data-preview-primary-card-slot],
  body[data-account-page="bots"] #sh-interaction-view-welcome .shieldy-direct-message-preview-v504 [data-preview-secondary-card-slot]{
    margin-left:0!important;
  }
}
