/*
Theme Name: Presa România
Theme URI: https://presaromania.ro/
Author: Presa România
Description: Tema site-ului Presa România, portal de știri naționale.
Version: 2.2.3
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Text Domain: retea
License: Proprietary
Update URI: false
*/

/*
 * Only what every site needs to work: resets, the phone menu, search, article text, ads, the follow box.
 * How a site looks lives entirely in its own stylesheet (assets/skins/<skin>.css).
 */
:root { --ink: #111; --muted: #666; --line: #ddd; --paper: #fff; --red: #c00; --wrap: 1200px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.5 var(--body, Arial, sans-serif); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
h1, h2, h3, h4 { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #000; color: #fff; padding: 8px 12px; z-index: 200; }
.skip:focus { left: 8px; }
main { display: block; }

/* Logo: each site draws its own */
.logo { display: inline-flex; align-items: center; flex: none; }
.rt-logo { display: inline-flex; align-items: baseline; white-space: nowrap; line-height: 1; }

/* Menu: a row on wide screens, a drawer on phones */
.nav > ul { display: flex; flex-wrap: wrap; }
.nav li { position: relative; }
.nav a, .nav .dd-btn { display: flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; }
.dd-btn svg { width: 11px; height: 11px; transition: transform .2s; }
.dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.dd { position: absolute; top: 100%; left: 0; min-width: 200px; background: var(--paper); border: 1px solid var(--line); display: none; z-index: 120; }
.dd.open { display: block; }
.dd a { padding: 9px 12px; }
.header-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn { width: 40px; height: 40px; border: 0; background: none; display: grid; place-items: center; padding: 0; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; }
.menu-btn { display: none; }
.nav-close { display: none; }
.scrim { display: none; }

/* Search, opened from the header's search button */
.search-bar { display: none; }
.search-bar.open { display: block; }
.search-bar form { display: flex; gap: 8px; padding: 10px 0; }
.search-bar input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line); font: inherit; background: #fff; }
.btn { height: 40px; padding: 0 16px; border: 0; background: var(--ink); color: #fff; font-weight: 700; }

/* Headline ticker */
.ticker { overflow: hidden; }
.ticker .wrap { display: flex; align-items: center; gap: 12px; overflow: hidden; }
.ticker-label { flex: none; }
.ticker-track { overflow: hidden; flex: 1; }
.ticker-items { display: flex; gap: 36px; width: max-content; animation: rt-tick 70s linear infinite; }
.ticker:hover .ticker-items { animation-play-state: paused; }
.ticker-items a { white-space: nowrap; }
.ticker-items time { margin-right: 6px; }
@keyframes rt-tick { to { transform: translateX(-50%); } }

/* Photos */
.thumb { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: #e6e6e6; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.noimg { background: #e6e6e6; }

/* Ad slots, labelled the way Romanian sites label them */
.ad-slot { margin: 28px 0 0; min-height: 90px; display: grid; place-items: center; gap: 4px; overflow: hidden; }
.ad-slot::before { content: "Publicitate"; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: #999; }
.ad-slot.tall { min-height: 250px; margin: 0; }
.ad-slot.in-article { margin: 24px 0; }

/* Archives, pages and search fall back to text plus a right column */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; margin-top: 24px; }
.article h1 { font: 700 32px/1.15 var(--head, Georgia, serif); margin: 0 0 18px; }
.article .prose { max-width: 720px; font-size: 17px; line-height: 1.7; }
.archive-head { margin-bottom: 14px; }
.archive-desc { margin-top: 8px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.not-found form { display: flex; gap: 8px; margin-top: 12px; }
.not-found input[type="search"] { height: 40px; border: 1px solid var(--line); padding: 0 12px; font: inherit; }
.not-found input[type="submit"] { height: 40px; padding: 0 16px; border: 0; background: var(--ink); color: #fff; font-weight: 700; }
.section { margin-top: 32px; }
.section-head { margin-bottom: 14px; }
.side-sticky { position: sticky; top: 16px; display: grid; gap: 24px; }
.crumbs { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.unavailable { padding: 40px 0; display: grid; gap: 6px; }
.pagination { margin-top: 28px; }
.pagination .nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.page-numbers { min-width: 36px; height: 36px; padding: 0 10px; display: grid; place-items: center; border: 1px solid var(--line); font-size: 14px; }
.page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Article text */
.prose p { margin: 0 0 1.1em; }
.prose h2 { margin: 1.5em 0 .5em; line-height: 1.25; }
.prose h3 { margin: 1.3em 0 .4em; line-height: 1.3; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose img { height: auto; }
.prose figure, .prose .wp-block-image { margin: 1.4em 0; }
.prose figcaption, .prose .wp-element-caption { font-size: 13px; margin-top: 6px; opacity: .75; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .3em; }
.prose blockquote { margin: 1.3em 0; padding: 0 0 0 18px; border-left: 3px solid currentColor; font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.3em 0; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; }
.prose iframe { max-width: 100%; }
.alignleft { float: left; margin: .3em 1.3em 1em 0; max-width: 50%; }
.alignright { float: right; margin: .3em 0 1em 1.3em; max-width: 50%; }
.aligncenter { margin-left: auto; margin-right: auto; }
.tags { display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 24px; font-size: 14px; }
.tags a { text-decoration: underline; text-underline-offset: 2px; }

/* Share buttons (#share drives them) */
#share { display: flex; gap: 6px; flex-wrap: wrap; }
#share a, #share button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 36px; height: 36px; padding: 0 10px; border: 0; background: #eee; color: #111; font-size: 14px; cursor: pointer; }
#share svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
#share [hidden] { display: none; }

/* Sudwire's credit line closes the article in normal text; the AI note at its end is set very small */
p.sudwire-source, .prose p.sudwire-source { font-size: 1em; opacity: 1; color: inherit; margin-top: 1.6em; }
p.sudwire-source .sudwire-ai { font: 400 7px/1 var(--body, system-ui, sans-serif); color: #6b6b73; letter-spacing: .2px; }
p.sudwire-ai-label, .prose p.sudwire-ai-label { font: 400 11px/1.4 var(--body, system-ui, sans-serif); color: #8b8b93; opacity: 1; margin: 0 0 1.2em; }

/* Publisher line, and the note shown before a site's first story */
.rt-pub { font-size: 10px; line-height: 1.4; margin: 0; opacity: .55; letter-spacing: .02em; }
.rt-soon { padding: 48px 0 64px; display: grid; gap: 8px; max-width: 640px; }
.rt-soon b { font-size: 24px; line-height: 1.25; }

/* Clocks and small data bits */
.rt-data { display: inline-flex; gap: 6px 14px; flex-wrap: wrap; }

/* Confirmations ("link copied") */
.toast { position: fixed; left: 50%; top: 84px; transform: translate(-50%, -16px); opacity: 0; pointer-events: none; background: #111; color: #fff; padding: 10px 16px; font-size: 14px; transition: .25s; z-index: 2147483647; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Copy protection (visitors only; see inc/protect.php) */
body.no-copy { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.no-copy input, body.no-copy textarea, body.no-copy select, body.no-copy [contenteditable] { -webkit-user-select: text; user-select: text; }
body.no-copy img { -webkit-user-drag: none; }
#onesignal-bell-container.onesignal-reset.onesignal-bell-container-bottom-left,
#onesignal-bell-container.onesignal-reset.onesignal-bell-container-bottom-right { bottom: 96px !important; }

/* Facebook follow box for readers arriving from Facebook: big on articles, small elsewhere */
.fb-follow { position: fixed; z-index: 2147483600; opacity: 0; transition: opacity .25s; }
.fb-follow.on { opacity: 1; }
.fb-follow[hidden] { display: none !important; }
.fb-follow:not(.on) { pointer-events: none; }
.fb-follow-box { position: relative; background: #fff; color: #111; box-shadow: 0 16px 48px rgba(0,0,0,.3); }
.fb-follow-x { position: absolute; top: 6px; right: 8px; background: none; border: 0; font-size: 26px; line-height: 1; color: #777; padding: 4px 8px; }
.fb-follow b { display: block; font-size: 18px; line-height: 1.2; }
.fb-follow p { margin: 6px 0 14px; color: #555; line-height: 1.45; }
.fb-follow-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; background: #1877f2; color: #fff; font-weight: 700; }
.fb-follow-btn svg { width: 20px; height: 20px; fill: currentColor; }
.fb-follow-later { background: none; border: 0; color: #666; padding: 8px; }
html.fb-follow-open { overflow: hidden; }
.fb-follow--big { inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.7); }
.fb-follow--big .fb-follow-box { width: min(440px, 100%); padding: 32px 26px 20px; text-align: center; }
.fb-follow--big .fb-follow-logo { width: 64px; height: 64px; margin: 0 auto 14px; }
.fb-follow--big b { font-size: 22px; }
.fb-follow--big .fb-follow-btn { width: 100%; min-height: 48px; }
.fb-follow--big .fb-follow-later { display: block; margin: 10px auto 0; }
.fb-follow--small { left: 16px; bottom: 100px; width: min(350px, calc(100vw - 32px)); }
.fb-follow--small .fb-follow-box { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px 14px 10px; }
.fb-follow--small .fb-follow-ico { width: 40px; height: 40px; background: #1877f2; color: #fff; display: grid; place-items: center; }
.fb-follow--small .fb-follow-ico svg { width: 22px; height: 22px; fill: currentColor; }
.fb-follow--small b { font-size: 16px; margin-right: 18px; }
.fb-follow--small p { font-size: 14px; margin: 4px 0 10px; }
.fb-follow--small .fb-follow-btn { min-height: 36px; font-size: 14px; padding: 0 12px; }
@media (max-width: 600px) { .fb-follow--small { left: 12px; right: 12px; width: auto; bottom: 92px; } }
.locked-note { padding: 96px 0; text-align: center; }

/* Phones and tablets */
@media (max-width: 960px) {
  .menu-btn { display: grid; }
  .nav { position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw); background: #fff; color: #111; z-index: 300; padding: 64px 0 24px; overflow-y: auto; transform: translateX(100%); transition: transform .25s; box-shadow: -8px 0 24px rgba(0,0,0,.18); }
  .nav.open { transform: none; }
  .nav > ul { display: block; }
  .nav > ul > li { border-bottom: 1px solid #eee; }
  .nav a, .nav .dd-btn { width: 100%; justify-content: space-between; padding: 14px 20px; font-size: 16px; color: #111; }
  .nav-close { display: grid; position: absolute; top: 10px; right: 10px; color: #111; }
  .dd { position: static; border: 0; padding: 0 0 6px 14px; }
  /* Under sticky headers (z 100), whose stacking context holds the drawer */
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 90; }
  .scrim.open { display: block; }
  .two-col, .grid-4 { grid-template-columns: 1fr; }
  .side-sticky { position: static; }
}
@media (max-width: 640px) {
  .alignleft, .alignright { float: none; margin: 1em 0; max-width: 100%; }
}
