/*
 * Package C (seo): article freshness line, click-to-play Aparat poster.
 * Loaded after ui-fixes.css by src/Base/SeoUiAssets.php. Plain CSS on purpose:
 * the Tailwind build cannot be re-run as part of a deploy.
 */

/* ------------------------------------------------------------ Freshness line */

/* Four items (section, publish, update, reading time) used to be a single
   nowrap flex row with two of them hidden on phones. All four now show
   everywhere and wrap into two tidy rows below 1024px. */
.arz-entry-meta { flex-wrap: wrap; row-gap: .5rem; }
.arz-entry-meta__item { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; max-width: 100%; }
/* Dates and the pill never break; the section name may (some are a full sentence). */
.arz-entry-meta__item time, .arz-entry-meta__item > span { white-space: nowrap; }
.arz-entry-meta__item time { font-variant-numeric: tabular-nums; cursor: help; }
@media (max-width: 1023px) {
    .arz-entry-meta { column-gap: 1.25rem; }
    /* Two per row on narrow phones: section + publish, update + reading time. */
    .arz-entry-meta__item { flex: 0 1 auto; }
}
@media (max-width: 420px) {
    .arz-entry-meta { font-size: .95em; column-gap: 1rem; }
}

.arz-fresh-pill {
    display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; margin-inline-start: .25rem;
    border-radius: 999px; font-size: .8em; line-height: 1; font-weight: 600;
    background: #e6f8f1; color: #0f7a55; white-space: nowrap;
}
html.dark-mode .arz-fresh-pill {
    background: rgb(var(--arz-c-primary-tint, 12 42 34));
    color: rgb(var(--arz-c-primary-strong, 84 234 187));
}

/* ------------------------------------------------------------ Aparat poster */

/* The Aparat embed used to be a render-blocking <script> in the article body.
   Now a poster with a play button; the iframe is injected on click. */
.arz-video { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: .75rem; background: #0f1218; }
.arz-video__btn {
    position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0;
    background: transparent; cursor: pointer; display: block;
}
.arz-video__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.arz-video__play {
    position: absolute; top: 50%; left: 50%; width: 72px; height: 72px; transform: translate(-50%, -50%);
    border-radius: 50%; background: rgba(15, 18, 24, .72); color: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .35); transition: transform .2s ease, background-color .2s ease;
}
.arz-video__play svg { width: 30px; height: 30px; margin-inline-start: 4px; }
.arz-video__btn:hover .arz-video__play,
.arz-video__btn:focus-visible .arz-video__play { transform: translate(-50%, -50%) scale(1.08); background: #16a37a; }
.arz-video__btn:focus-visible { outline: 3px solid #16a37a; outline-offset: 2px; }
.arz-video__label {
    position: absolute; right: 12px; bottom: 10px; padding: 4px 10px; border-radius: 6px;
    background: rgba(15, 18, 24, .72); color: #fff; font-size: 13px; line-height: 1.6;
}
.arz-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.arz-video--playing .arz-video__btn { display: none; }
.arz-video--fallback .arz-video__poster { object-fit: contain; background: #1a1f2a; padding: 10%; }
