/* Social media post preview: Stories, Reels, Shorts en YouTube. De feedpost staat in
   tools.css. Alle interface-elementen zijn eigen, vereenvoudigde tekeningen: een benadering,
   geen kopie van de apps. */

.pp-vert [hidden],
.pp-yt [hidden],
.pp-vert-controls[hidden] {
    display: none !important;
}

.pp-input-short {
    max-width: 10rem;
}

.pp-vert-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.25rem;
    margin-bottom: 0.75rem;
}

.pp-vert-controls .check {
    margin-bottom: 0;
}

.pp-vert-controls .hint {
    flex-basis: 100%;
    margin: 0;
}

.pp-stage.is-vertical {
    background: #e9e7e1;
}

/* Profielfoto's: eigen foto of eerste letter */
.post-avatar,
.pp-v-avatar,
.yt-avatar {
    overflow: hidden;
}

.post-avatar img,
.pp-v-avatar img,
.yt-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.post-media video.pp-m,
.post-media img.pp-m {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Verticaal: Story, Reel en Short (9:16) ---------- */

.pp-vert {
    position: relative;
    width: min(300px, 100%);
    aspect-ratio: 9 / 16;
    background: #1b1b1b;
    color: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.35;
}

/* Witte tekst blijft leesbaar op een licht beeld, zoals in de apps zelf */
.pp-v-top,
.pp-v-apptop,
.pp-v-side,
.pp-v-account,
.pp-v-caption,
.pp-v-more,
.pp-v-audio,
.pp-v-replyfield {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 0 6px rgba(0, 0, 0, 0.35);
}

.pp-v-side .pp-ic,
.pp-v-reply .pp-ic,
.pp-v-topicons .pp-ic {
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.7));
}

.pp-vert-media {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2b2b2b;
}

.pp-vert-media .pp-m {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pp-vert-empty {
    padding: 1rem;
    text-align: center;
    color: #d6d6d6;
}

.pp-vert-shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0) 18%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.55));
}

.pp-ic {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.pp-ic-flip {
    transform: scaleY(-1);
}

.pp-v-progress {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    gap: 3px;
}

.pp-v-progress span {
    flex: 1;
    height: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.45);
}

.pp-v-progress span:first-child {
    background: #ffffff;
}

.pp-v-top {
    position: absolute;
    top: 18px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pp-v-time {
    opacity: 0.75;
}

.pp-v-topicons {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.pp-v-topicons .pp-ic {
    width: 18px;
    height: 18px;
}

.pp-v-apptop {
    position: absolute;
    top: 12px;
    left: 12px;
    font-weight: 700;
    font-size: 16px;
}

.pp-v-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #8a8a8a;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.pp-v-name {
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pp-v-side {
    position: absolute;
    right: 8px;
    bottom: 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.pp-v-side span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.pp-v-side small {
    font-size: 10px;
}

.pp-v-bottom {
    position: absolute;
    left: 10px;
    right: 56px;
    bottom: 12px;
}

.pp-v-account {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.pp-v-follow {
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    flex: 0 0 auto;
}

.pp-v-caption {
    margin-top: 6px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.pp-v-caption.is-clamped {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pp-v-caption.is-placeholder {
    opacity: 0.75;
}

.pp-v-caption .post-link {
    color: inherit;
    font-weight: 600;
}

.pp-v-more {
    font: inherit;
    font-weight: 600;
    color: #ffffff;
    background: none;
    border: 0;
    padding: 2px 0;
    min-height: 24px;
    cursor: pointer;
}

.pp-v-more:hover {
    text-decoration: underline;
}

.pp-v-more:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.pp-v-audio {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.pp-v-audio .pp-ic {
    width: 12px;
    height: 12px;
}

.pp-v-reply {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pp-v-replyfield {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
}

/* Wat bij welke plaatsing hoort */
.pp-vert.is-story .pp-v-side,
.pp-vert.is-story .pp-v-apptop,
.pp-vert.is-story .pp-v-account,
.pp-vert.is-story .pp-v-caption,
.pp-vert.is-story .pp-v-more,
.pp-vert.is-story .pp-v-audio,
.pp-vert:not(.is-story) .pp-v-progress,
.pp-vert:not(.is-story) .pp-v-top,
.pp-vert:not(.is-story) .pp-v-reply,
.pp-vert:not(.is-youtube) .pp-v-dislike,
.pp-vert.is-youtube .pp-v-apptop,
.pp-vert.is-youtube .pp-v-audio {
    display: none;
}

.pp-vert.is-story .pp-v-bottom {
    right: 10px;
}

.pp-vert.is-youtube .pp-v-follow {
    background: #ffffff;
    color: #0f0f0f;
    border-color: #ffffff;
    border-radius: 999px;
    padding: 2px 10px;
}

.pp-vert.is-youtube .pp-v-caption {
    font-weight: 500;
    font-size: 14px;
}

/* Safe zones: rode vlakken waar de interface over het beeld kan vallen */
.pp-vert-safe {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.pp-safe {
    position: absolute;
    background: rgba(220, 38, 38, 0.3);
}

.pp-safe-top {
    top: 0;
    left: 0;
    right: 0;
    height: var(--st, 14%);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.9);
}

.pp-safe-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--sb, 35%);
    border-top: 1px dashed rgba(255, 255, 255, 0.9);
}

.pp-safe-left {
    top: var(--st, 14%);
    bottom: var(--sb, 35%);
    left: 0;
    width: var(--sl, 6%);
}

.pp-safe-right {
    top: var(--st, 14%);
    bottom: var(--sb, 35%);
    right: 0;
    width: var(--sr, 6%);
}

.pp-safe b {
    position: absolute;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
}

.pp-safe b:empty {
    display: none;
}

.pp-safe-top b {
    left: 6px;
    bottom: 4px;
}

.pp-safe-bottom b {
    left: 6px;
    top: 4px;
}

.pp-safe-right b {
    right: 2px;
    top: 4px;
    writing-mode: vertical-rl;
    padding: 5px 1px;
}

/* ---------- YouTube: zoekresultaat en videopagina ---------- */

.pp-yt {
    width: 100%;
    max-width: 640px;
    background: #ffffff;
    color: #0f0f0f;
    border: 1px solid #dfe1e5;
    border-radius: 8px;
    padding: 12px;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

.pp-yt.is-mobiel {
    max-width: 360px;
}

.pp-yt-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #606060;
    margin: 0 0 6px;
}

.pp-yt-label + .yt-watch {
    margin-top: 0;
}

.yt-result {
    display: grid;
    grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.pp-yt.is-mobiel .yt-result {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.yt-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.yt-thumb.is-empty::after {
    content: "Thumbnail";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #606060;
    font-size: 12px;
}

.yt-thumb .pp-m {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-dur {
    position: absolute;
    right: 6px;
    bottom: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    padding: 1px 4px;
    border-radius: 4px;
}

.yt-title {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.pp-yt.is-mobiel .yt-title {
    font-size: 14px;
}

.yt-title.is-placeholder,
.yt-wtitle.is-placeholder,
.yt-desc.is-placeholder {
    color: #8a8a8a;
}

.yt-meta,
.yt-channel,
.yt-snippet,
.yt-dmeta {
    font-size: 12px;
    color: #606060;
}

.yt-meta {
    margin-top: 4px;
}

.yt-channel {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.yt-snippet {
    margin-top: 8px;
    overflow-wrap: anywhere;
}

.yt-snippet.is-clamped,
.yt-desc.is-clamped {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pp-yt.is-mobiel .yt-snippet {
    display: none;
}

.yt-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #c9c9c9;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex: 0 0 auto;
}

.yt-avatar--l {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

/* Op de videopagina staat de duur in de spelerbalk, niet als label op het beeld */
.yt-player .yt-dur {
    display: none;
}

.yt-player .yt-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 40px;
    margin: -20px 0 0 -28px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.yt-play .pp-ic {
    fill: currentColor;
    stroke: none;
    width: 26px;
    height: 26px;
}

.yt-wtitle {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 10px;
    overflow-wrap: anywhere;
}

.pp-yt.is-mobiel .yt-wtitle {
    font-size: 16px;
}

.yt-channelrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.yt-channelname {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.yt-channelname b {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yt-channelname small {
    font-size: 12px;
    color: #606060;
}

.yt-subscribe {
    margin-left: auto;
    background: #0f0f0f;
    color: #ffffff;
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 500;
    flex: 0 0 auto;
}

.yt-descbox {
    margin-top: 12px;
    background: #f2f2f2;
    border-radius: 12px;
    padding: 10px 12px;
}

.yt-dmeta {
    color: #0f0f0f;
    font-weight: 600;
    margin-bottom: 2px;
}

.yt-desc {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.yt-desc .post-link {
    color: #065fd4;
    font-weight: 400;
}

.yt-more {
    font: inherit;
    font-weight: 600;
    color: #0f0f0f;
    background: none;
    border: 0;
    padding: 2px 0;
    min-height: 24px;
    cursor: pointer;
}

.yt-more:hover {
    text-decoration: underline;
}
