/* Share adds a quoted post between Create Post's writing area and options. */
.share-post-page [data-pencil-name="title bar"] { position: absolute; inset: 0 0 auto; height: 80px; }

@media (max-width: 1400px) {
  .share-post-page [data-pencil-name="title bar"] { height: calc(60px + env(safe-area-inset-top)); }
  .share-post-page [data-pencil-name="write post"] { height: clamp(120px, 22svh, 220px); }
  .share-post-page .export-166 { grid-row: 3; display: flex; flex-direction: column; gap: 8px; width: 100%; height: auto; padding: 10px; }
  .share-post-page .export-47 { order: -1; position: relative; inset: auto; width: 100%; padding: 0; }
  .share-post-page .export-245 { width: 44px; height: 44px; flex-shrink: 0; }
  .share-post-page .export-157 { inset: 0; width: 100%; height: 100%; }
  .share-post-page .export-85 { position: relative; inset: auto; width: 100%; display: grid; grid-template-columns: clamp(64px, 20vw, 100px) minmax(0, 1fr); gap: 12px; padding: 10px 0 0; }
  .share-post-page .export-182 { grid-area: 1 / 2; width: 100%; height: auto; min-width: 0; overflow-wrap: anywhere; }
  .share-post-page .export-154 { grid-area: 1 / 1; position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 99.955 / 64; }
  .share-post-page :is(.export-197, .export-179) { white-space: normal; overflow-wrap: anywhere; }
  .share-post-page [data-pencil-name="Add post"] { grid-row: 4; }
  .share-post-page [data-pencil-name="Genre of post"] { grid-row: 5; }
  .share-post-page [data-pencil-name="Post button"] { grid-row: 6; }
}

@media (min-width: 601px) and (max-width: 1400px) {
  .share-post-page [data-pencil-name="title bar"] { position: fixed; z-index: 20; }
  .share-post-page [data-pencil-name="title bar"] > :is(.export-199, .export-319) { position: absolute; }
}

@media (max-width: 600px) {
  .share-post-page [data-pencil-name="title bar"] { position: fixed; z-index: 20; }
  .share-post-page [data-pencil-name="title bar"]::after { content: ""; position: absolute; inset: 100% max(12px, env(safe-area-inset-left), env(safe-area-inset-right)) auto; border-top: 0.5px solid #fff; pointer-events: none; }
  .share-post-page .export-106 { border-top-color: transparent; }
}

/* The image-free variant keeps Friends Share's layout without a thumbnail column. */
@media (max-width: 1400px) {
  .image-free-share-page .export-85 { display: block; }
  .image-free-share-page [data-pencil-name="Selection public or friends"] path { fill: #d9d9d9; }
}

/* Keep this export's original desktop dimensions and Share action position. */
@media (min-width: 1401px) {
  .image-free-share-page .export-166 { height: 241px; }
  .image-free-share-page .export-182 { position: static; width: 546px; height: 132px; }
  .image-free-share-page .export-24 { top: 642px; }
}
