/* Family Book — Create Post composer visibility + live URL previews */
.home-composer-modal #wallHomeText,
.home-composer-modal .wall-compose-main textarea#wallHomeText{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-height:118px!important;
  resize:none!important;
  box-sizing:border-box!important;
  margin:10px 0 12px!important;
  padding:15px 16px!important;
  border:1px solid rgba(104,126,111,.48)!important;
  border-radius:16px!important;
  background:#f7f4ed!important;
  color:#20251f!important;
  font:inherit!important;
  font-size:1rem!important;
  line-height:1.5!important;
  outline:none!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45)!important;
}
.home-composer-modal #wallHomeText::placeholder{color:#777d76!important;opacity:1!important}
.home-composer-modal #wallHomeText:focus{
  border-color:#7fb395!important;
  box-shadow:0 0 0 3px rgba(127,179,149,.15)!important;
}
html[data-theme="dark"] .home-composer-modal #wallHomeText,
html[data-theme="dark"] .home-composer-modal .wall-compose-main textarea#wallHomeText{
  background:#111812!important;
  border-color:#3c4a40!important;
  color:#f3ecdd!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
html[data-theme="dark"] .home-composer-modal #wallHomeText::placeholder{color:#8f968e!important}
html[data-theme="dark"] .home-composer-modal #wallHomeText:focus{
  border-color:#80b99a!important;
  box-shadow:0 0 0 3px rgba(128,185,154,.13)!important;
}

/* Keep the composer inside its modal even when a pasted URL is very long. */
.home-composer-modal-card,
.home-composer-modal-body,
.home-composer-modal .wall-composer,
.home-composer-modal .wall-compose-main{
  max-width:100%!important;
  box-sizing:border-box!important;
  overflow-x:hidden!important;
}
.home-composer-modal .wall-composer{
  grid-template-columns:auto minmax(0,1fr)!important;
}
.home-composer-modal .wall-compose-main{
  min-width:0!important;
  width:100%!important;
}

.fb-composer-link-preview[hidden]{display:none!important}
.fb-composer-link-preview{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  margin:-2px 0 14px;
  overflow:hidden!important;
}
.fb-composer-link-shell{
  position:relative;
  width:100%;
  max-width:100%;
  min-width:0;
}
.fb-composer-link-card{
  display:block;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--cream);
  color:inherit;
  text-decoration:none;
}
.fb-composer-link-remove{
  position:absolute;
  top:10px;
  right:10px;
  z-index:4;
  width:40px;
  height:40px;
  margin:0;
  padding:0;
  border:1px solid rgba(255,255,255,.24);
  border-radius:50%;
  background:rgba(15,19,16,.84);
  color:#fff;
  display:grid;
  place-items:center;
  font:700 27px/1 Arial,sans-serif;
  cursor:pointer;
  box-shadow:0 4px 14px rgba(0,0,0,.28);
  -webkit-tap-highlight-color:transparent;
}
.fb-composer-link-remove:hover,
.fb-composer-link-remove:focus-visible{background:rgba(15,19,16,.96);outline:2px solid rgba(128,185,154,.72);outline-offset:2px}
.fb-composer-link-media{position:relative;width:100%;max-width:100%;aspect-ratio:16/9;background:#101310;overflow:hidden}
.fb-composer-link-media img{display:block;width:100%;height:100%;object-fit:cover}
.fb-composer-link-play{position:absolute;inset:50% auto auto 50%;width:48px;height:48px;transform:translate(-50%,-50%);border-radius:50%;background:rgba(0,0,0,.68);display:grid;place-items:center;box-shadow:0 6px 20px rgba(0,0,0,.28)}
.fb-composer-link-play:after{content:"";width:0;height:0;border-top:8px solid transparent;border-bottom:8px solid transparent;border-left:13px solid #fff;margin-left:3px}
.fb-composer-link-copy{display:flex;align-items:center;gap:10px;padding:10px 12px;min-width:0;max-width:100%;overflow:hidden}
.fb-composer-link-copy>span:first-child{width:32px;height:32px;flex:0 0 32px;border-radius:9px;background:rgba(49,92,67,.12);display:grid;place-items:center;color:var(--green);font-weight:900}
.fb-composer-link-copy>span:last-child{min-width:0;max-width:100%;display:flex;flex-direction:column;gap:2px;overflow:hidden}
.fb-composer-link-copy strong{font-size:.82rem;line-height:1.2}
.fb-composer-link-copy small{display:block;max-width:100%;font-size:.68rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-theme="dark"] .fb-composer-link-card{background:#1d251e;border-color:#3b473e}
html[data-theme="dark"] .fb-composer-link-copy strong{color:#f1eadf}
html[data-theme="dark"] .fb-composer-link-copy small{color:#aca499}
html[data-theme="dark"] .fb-composer-link-copy>span:first-child{background:#27372d;color:#b9d7a9}

/* Visible composer actions */
.home-composer-modal .wall-compose-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  flex-wrap:wrap!important;
}
.home-composer-modal .wall-compose-actions>small{margin-right:auto}
.home-composer-cancel{
  min-height:44px!important;
  padding:10px 16px!important;
  border-radius:13px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  border:1px solid rgba(104,126,111,.48)!important;
  background:transparent!important;
  color:inherit!important;
  font-weight:800!important;
}
.home-composer-cancel svg{width:16px;height:16px}
html[data-theme="dark"] .home-composer-cancel{
  border-color:#3c4a40!important;
  color:#e8e0d3!important;
  background:#151d16!important;
}
html[data-theme="dark"] .home-composer-cancel:hover{background:#1d271f!important}

@media(max-width:700px){
  .home-composer-modal #wallHomeText,
  .home-composer-modal .wall-compose-main textarea#wallHomeText{
    min-height:116px!important;
    margin-top:12px!important;
    padding:14px!important;
    border-radius:14px!important;
  }
  .fb-composer-link-card{border-radius:14px}
  .fb-composer-link-media{max-height:190px!important}
  .fb-composer-link-remove{top:8px;right:8px;width:42px;height:42px;font-size:28px}
  .home-composer-modal-card{overflow-y:auto!important;overflow-x:hidden!important}
  .home-composer-modal .wall-compose-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:10px!important;
    margin-top:12px!important;
  }
  .home-composer-modal .wall-compose-actions>small{display:none!important}
  .home-composer-modal .wall-compose-actions .home-composer-cancel,
  .home-composer-modal .wall-compose-actions #wallHomePost{
    width:100%!important;
    min-height:48px!important;
    margin:0!important;
  }
}
