/* WhatsApp Status v62 — in-story sender picker and native-style quoted status cards. */
#story-viewer .wa59-story-more{
  margin-left:auto;
  width:40px;height:40px;
  border:0;background:transparent;color:#fff;
  display:grid;place-items:center;padding:0;
}
#story-viewer .wa59-story-more svg{width:22px;height:22px}
#story-viewer .story-header #story-close{margin-left:0!important}

.wa59-story-menu{
  position:absolute;
  top:calc(var(--status-h,47px) + 58px);
  right:12px;
  z-index:30;
  width:190px;
  padding:6px;
  border-radius:14px;
  background:rgba(30,30,32,.97);
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
}
.wa59-story-menu button{
  width:100%;min-height:42px;border:0;border-radius:9px;
  background:transparent;color:#fff;text-align:left;
  padding:0 12px;font:inherit;font-size:14px;
}
.wa59-story-menu #wa59-delete-story{color:#ff453a}
.wa59-story-menu button:active{background:rgba(255,255,255,.08)}

.wa59-story-reply{
  position:absolute;
  left:12px;right:12px;
  bottom:calc(12px + env(safe-area-inset-bottom,0px));
  z-index:20;
  display:grid;
  grid-template-columns:40px minmax(0,1fr) 44px;
  gap:8px;
  align-items:center;
}
.wa59-story-reply input{
  width:100%;height:44px;box-sizing:border-box;
  border:1px solid rgba(255,255,255,.55);
  border-radius:999px;
  background:rgba(0,0,0,.28);
  color:#fff;
  padding:0 16px;
  font:inherit;font-size:14px;
  outline:none;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
.wa59-story-reply input::placeholder{color:rgba(255,255,255,.72)}
.wa59-story-reply button{
  border:0;border-radius:50%;
  display:grid;place-items:center;padding:0;
}
.wa59-story-reply .wa59-story-reply-sender{
  width:40px;height:40px;
  background:rgba(0,0,0,.28);
  box-shadow:0 0 0 1px rgba(255,255,255,.5);
  overflow:hidden;
}
.wa59-story-reply .wa59-story-reply-sender>.avatar{
  width:40px!important;height:40px!important;min-width:40px!important;
  border-radius:50%!important;font-size:12px!important;
}
.wa59-story-reply .wa59-story-reply-send{
  width:44px;height:44px;
  background:#25d366;color:#fff;
}
.wa59-story-reply .wa59-story-reply-send svg{width:20px;height:20px}
#story-viewer.wa59-has-reply .story-caption{bottom:82px!important}
#story-viewer.wa59-has-reply .story-tap-zone{bottom:66px}

/* Reply-to-status card inside the resulting WhatsApp message bubble. */
.wa59-status-quoted{
  width:100%;
  min-width:0;
  box-sizing:border-box;
  min-height:56px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 56px;
  gap:8px;
  align-items:stretch;
  margin:0 0 6px;
  padding:0;
  border:0;
  border-left:3px solid var(--wa59-status-color,#25d366);
  border-radius:7px;
  overflow:hidden;
  background:rgba(0,0,0,.055);
  color:inherit;
  text-align:left;
  font:inherit;
}
:root[data-theme="dark"] .wa59-status-quoted{background:rgba(255,255,255,.07)}
.wa59-status-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:7px 5px 7px 9px;
}
.wa59-status-copy strong{
  color:var(--wa59-status-color,#25d366);
  font-size:12.5px;line-height:16px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.wa59-status-copy small{
  margin-top:3px;
  min-width:0;
  display:flex;
  align-items:center;
  gap:5px;
  color:var(--text-sub);
  font-size:12px;line-height:15px;
  white-space:nowrap;
}
.wa59-status-dot{opacity:.8}
.wa59-status-media-icon{
  width:17px;height:17px;flex:0 0 17px;
  display:inline-grid;place-items:center;
  color:var(--text-sub);
}
.wa59-status-media-icon svg{width:17px;height:17px;display:block}
.wa59-status-preview{
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.wa59-status-thumb{
  width:56px;height:56px;
  overflow:hidden;background:#111;
}
.wa59-status-thumb img{
  width:100%;height:100%;object-fit:cover;display:block;
}
.bubble:has(> .wa59-status-quoted){min-width:min(240px,72vw)}


/* Sender chooser inside the status viewer. */
#story-viewer .wa59-story-reply-sender:active{
  transform:scale(.96);
}
#story-viewer .wa59-story-reply-sender img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
}


/* v62: sender picker lives inside the story viewer, above the story itself. */
#story-viewer .wa62-story-sheet-layer{
  position:absolute;
  inset:0;
  z-index:80;
  display:flex;
  align-items:flex-end;
  justify-content:center;
}
#story-viewer .wa62-story-sheet-scrim{
  position:absolute;
  inset:0;
  border:0;
  background:rgba(0,0,0,.34);
  padding:0;
}
#story-viewer .wa62-story-sheet{
  position:relative;
  z-index:1;
  width:100%;
  max-height:min(72%,620px);
  overflow:auto;
  box-sizing:border-box;
  padding:8px 14px calc(16px + env(safe-area-inset-bottom,0px));
  border-radius:26px 26px 0 0;
  background:#f2f2f7;
  color:#111;
  box-shadow:0 -10px 34px rgba(0,0,0,.28);
}
#story-viewer .wa62-story-sheet-handle{
  width:38px;
  height:5px;
  margin:0 auto 14px;
  border-radius:999px;
  background:#c7c7cc;
}
#story-viewer .wa62-story-sheet-title{
  margin:0 0 10px;
  text-align:center;
  font-size:17px;
  line-height:22px;
  font-weight:700;
}
#story-viewer .wa62-story-sheet-list{
  display:flex;
  flex-direction:column;
}
#story-viewer .wa62-story-sheet-row{
  min-height:58px;
  display:grid;
  grid-template-columns:42px minmax(0,1fr) 28px;
  gap:10px;
  align-items:center;
  padding:6px 4px;
  border:0;
  border-bottom:1px solid rgba(60,60,67,.12);
  background:transparent;
  color:#111;
  text-align:left;
  font:inherit;
}
#story-viewer .wa62-story-sheet-row:last-child{
  border-bottom:0;
}
#story-viewer .wa62-story-sheet-row:active{
  background:rgba(60,60,67,.08);
}
#story-viewer .wa62-story-sheet-row>.avatar{
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  border-radius:50%!important;
  font-size:13px!important;
}
#story-viewer .wa62-story-sheet-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:16px;
  font-weight:500;
}
#story-viewer .wa62-story-sheet-check{
  justify-self:center;
  color:#24c875;
  font-size:22px;
  font-weight:700;
  opacity:0;
}
#story-viewer .wa62-story-sheet-check.is-selected{
  opacity:1;
}
#story-viewer.wa62-sheet-open .story-tap-zone{
  pointer-events:none;
}
