/*
 * tools-v4-character-counter.css: rules only /tools/character-counter needs, on top of
 * tools-v4.css (which owns .cc-stats, .cc-sum, .cc-grid and .cc-card). Linked from the view's
 * `block extrahead` with ?v=<date>, outside the usemin build blocks. Scoped under .tv4.
 */

.tv4 #cc-input {
    min-height: 168px;
    font-size: 17px;
}

/* Label on the left, Copy and Clear on the right, above the text. */
.tv4 .cc-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.tv4 .cc-top .tv4-label {
    margin: 0 0 4px;
}

.tv4 .cc-actions {
    display: flex;
    flex: none;
    gap: 8px;
}

.tv4 .cc-capped {
    margin-top: 10px;
    color: var(--tv4-warn);
    font-size: 14px;
}

.tv4 .cc-sum .tv4-seg {
    flex: none;
}

/* Long field names ("YouTube channel description") wrap instead of pushing the count out. */
.tv4 .cc-card__net span {
    min-width: 0;
    line-height: 1.3;
}

.tv4 .cc-card__net img {
    flex: none;
}

.tv4 .cc-card__head {
    align-items: flex-start;
}

.tv4 .cc-card__count {
    padding-top: 1px;
}

.tv4 .cc-card__count b {
    font-weight: 600;
}

.tv4 .cc-card__cut {
    margin-top: 4px;
    color: var(--pn-ink-2);
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* Facts table */
.tv4 .cc-facts td:first-child {
    width: 30%;
}

.tv4 .cc-facts .tv4-net {
    white-space: normal;
}

.tv4 .cc-facts__extra {
    display: block;
    margin-top: 2px;
    color: var(--pn-ink-3);
    font-size: 13px;
}

.tv4 .cc-facts__none {
    color: var(--pn-ink-3);
}

.tv4 .tv4-facts .tv4-checked + .tv4-checked {
    margin-top: 4px;
}

@media (max-width: 767.98px) {
    /* rows="7" would make the box 200px tall: keep the cards on the first phone screen. */
    .tv4 #cc-input {
        height: 148px;
        min-height: 112px;
        font-size: 16px;
    }

    .tv4 .cc-stats {
        gap: 6px;
        margin-top: 12px;
    }

    .tv4 .cc-stats li {
        gap: 5px;
        padding: 5px 9px;
        border-radius: 8px;
        font-size: 13px;
    }

    .tv4 .cc-sum {
        margin-top: 20px;
    }

    .tv4 .cc-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .tv4 .cc-card {
        padding: 14px 14px 12px;
        border-radius: 16px;
    }

    .tv4 .cc-bar {
        margin: 10px 0 8px;
    }

    .tv4 table.cc-facts {
        min-width: 640px;
    }
}
