/*
 * tools-v4-linkedin-preview.css: /tools/linkedin-post-preview (linkedin_post_preview.pug).
 * The feed cards copy LinkedIn's proportions (a 552px card, 14px text on 20px lines, a 375px phone), not its brand:
 * no LinkedIn logo or colours inside the card. Builds on tools-v4.css. Bump ?v= on every edit.
 */
.tv4 .lp {
    position: relative;
}

.tv4 .lp-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.tv4 .lp-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.tv4 #lp-input {
    min-height: 124px;
    font-size: 16px;
    line-height: 1.5;
}

.tv4 .lp-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.tv4 .lp-stats li {
    min-width: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--pn-surface-warm);
}

.tv4 .lp-stats span {
    display: block;
    color: var(--pn-ink-3);
    font-size: 13px;
    line-height: 1.3;
}

.tv4 .lp-stats b {
    display: block;
    margin-top: 2px;
    color: var(--pn-ink);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.3;
}

.tv4 .lp-stats b span {
    display: inline;
    color: inherit;
    font-size: inherit;
}

.tv4 .lp-stats small {
    color: var(--pn-ink-3);
    font-size: 14px;
    font-weight: 400;
}

.tv4 .lp-stats em {
    display: block;
    margin-top: 2px;
    color: var(--pn-ink-2);
    font-size: 13px;
    font-style: normal;
    line-height: 1.35;
}

.tv4 .lp-stats li.is-over b,
.tv4 .lp-stats li.is-over em,
.tv4 .lp-stats li.is-warn em {
    color: var(--tv4-bad);
}

.tv4 .lp-stats li.is-ok em {
    color: var(--tv4-ok);
}

.tv4 .lp-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 24px;
    margin-top: 20px;
}

.tv4 .lp-picker {
    min-width: 0;
    max-width: 100%;
}

/* Wide screens show both cards, so the device switch is only for narrow ones. */
.tv4 .lp-picker--device {
    display: none;
}

.tv4 .lp-previews {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    margin-top: 16px;
    padding: 24px;
    border-radius: 20px;
    background: #eef0f3;
}

.tv4 .lp-card {
    flex: none;
    width: 552px;
    max-width: 100%;
    margin: 0;
    padding: 12px 0 0;
    border: 1px solid #dfe1e5;
    border-radius: 10px;
    background: #ffffff;
    color: #1d1d1f;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.tv4 .lp-phone {
    flex: none;
    width: 375px;
    max-width: 100%;
    padding: 10px 0 0;
    border: 6px solid #1b1b1b;
    border-radius: 34px;
    background: #f3f2ef;
    overflow: hidden;
}

.tv4 .lp-phone .lp-card {
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.tv4 .lp-card__head {
    display: flex;
    gap: 10px;
    padding: 0 16px;
}

.tv4 .lp-card__avatar {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.tv4 .lp-card__name {
    color: #1d1d1f;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.tv4 .lp-card__headline,
.tv4 .lp-card__time {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #66676b;
    font-size: 12px;
    line-height: 16px;
}

.tv4 .lp-card__time svg {
    margin-left: 2px;
}

.tv4 .lp-text {
    margin: 10px 0 0;
    padding: 0 16px;
    color: #1d1d1f;
    font-size: 14px;
    line-height: 20px;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* The hidden copy of the text the script measures (padding off: its width is the text column). */
.tv4 .lp-meter {
    position: absolute;
    top: 0;
    left: -10000px;
    max-width: none;
    margin: 0;
    padding: 0;
    visibility: hidden;
    pointer-events: none;
}

.tv4 .lp-hook {
    padding: 1px 0;
    border-radius: 3px;
    background: #fff1b8;
    color: inherit;
    box-shadow: 0 0 0 2px #fff1b8;
}

.tv4 .lp-more {
    color: #66676b;
    font-weight: 600;
}

.tv4 .lp-img {
    position: relative;
    width: 100%;
    margin-top: 10px;
    overflow: hidden;
    aspect-ratio: 1.91 / 1;
    background: #d9dde3;
}

.tv4 .lp-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tv4 .lp-img__chip {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.75);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
}

.tv4 .lp-acts {
    display: flex;
    justify-content: space-around;
    margin-top: 8px;
    padding: 4px 8px;
    border-top: 1px solid #e8e8e8;
}

.tv4 .lp-acts li {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 6px;
    color: #5e5e5e;
    font-size: 13px;
    font-weight: 600;
}

.tv4 .lp-acts svg {
    width: 18px;
    height: 18px;
}

.tv4 .lp-note {
    margin-top: 16px;
}

/* Facts table and the links sentence (tv4Links in _kit.pug). */
.tv4 table.lp-facts tbody th {
    color: var(--pn-ink);
    font-weight: 500;
    text-align: left;
}

.tv4 .tv4-links {
    max-width: 760px;
    margin-top: 20px;
    color: var(--pn-ink-2);
    font-size: 16px;
    line-height: 1.6;
}

.tv4 .tv4-links a {
    color: var(--pn-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 1080px) {
    .tv4 .lp-picker--device {
        display: block;
    }

    .tv4 .lp-previews {
        justify-content: center;
    }

    .tv4 .lp-previews[data-show="desktop"] .lp-phone,
    .tv4 .lp-previews[data-show="mobile"] > .lp-card--desktop {
        display: none;
    }
}

@media (max-width: 640px) {
    .tv4 .lp-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .tv4 .lp-previews {
        margin-left: -8px;
        margin-right: -8px;
        padding: 12px 8px;
    }

    .tv4 .lp-phone {
        border-width: 4px;
        border-radius: 26px;
    }

    .tv4 .lp-acts span {
        display: none;
    }
}

/* The site's phone rules raise paragraph text to 15px on 24px lines; the feed copy must keep LinkedIn's 14px on
 * 20px lines at every width, or the measured cut would change with the visitor's screen. */
html body main#hero.tv4 .lp-text {
    font-size: 14px !important;
    line-height: 20px !important;
}

html body main#hero.tv4 .lp-card__name {
    font-size: 14px !important;
    line-height: 20px !important;
}

html body main#hero.tv4 .lp-card__headline,
html body main#hero.tv4 .lp-card__time {
    font-size: 12px !important;
    line-height: 16px !important;
}
