/*
 * ÇandName CSS modülü: Okuma araçları
 * Yazı sayfasındaki okuma süresi / yazı boyutu / paylaşım çubuğu ve içindekiler listesi.
 * Bu dosya diğer CSS dosyalarından bağımsızdır; hata yalnızca bu alanı etkiler.
 * Yükleme sırası: inc/assets.php
 */

.reader-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 24px; padding: 10px 0; border-block: 1px solid var(--line); color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.entry-thumb + .reader-bar { margin-top: -8px; }
.reader-font, .reader-share { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.reader-share { position: relative; }
.reader-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-inline-start: auto; }
.reader-quick { display: inline-flex; align-items: center; gap: 6px; }
.reader-font button, .reader-share .share-toggle {
	display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
	background: var(--surface, #fff); color: var(--ink); font: inherit; font-weight: 600; line-height: 1; cursor: pointer; text-decoration: none;
}
.reader-font button:hover, .reader-share .share-toggle:hover, .reader-share.is-open .share-toggle { border-color: var(--green); color: var(--green); }
.reader-font button:disabled { opacity: 0.4; cursor: default; }

.entry-content .toc { background: var(--surface, #fff); border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: 4px; padding: 16px 22px; margin-bottom: 1.8em; font-size: calc(16px * var(--fs, 1)); line-height: 1.5; }
.toc-title { margin: 0 0 8px; font-family: var(--serif); font-weight: 700; font-size: calc(18px * var(--fs, 1)); color: var(--ink); }
.entry-content .toc ul { list-style: none; margin: 0; padding: 0; }
/* Tree: every deeper level is indented, with a guide line and a small branch to each item. */
.toc li { position: relative; margin: 6px 0; }
.entry-content .toc ul ul { margin: 4px 0 0 0.5em; padding-inline-start: 1.1em; border-inline-start: 1px solid var(--line); }
.toc ul ul > li::before { content: ""; position: absolute; inset-inline-start: -1.1em; top: 0.8em; width: 0.8em; border-top: 1px solid var(--line); }
.toc .toc-gap { margin: 0; }
.toc .toc-gap::before { display: none; }
.toc .toc-l1 > a, .toc .toc-l2 > a { font-weight: 600; }
.toc ul ul li { font-size: 0.95em; }
.toc ul ul ul li { font-size: 0.92em; }
.entry-content .toc a { text-decoration: none; }
.entry-content .toc a:hover { text-decoration: underline; }
.entry-content h1[id], .entry-content h2[id], .entry-content h3[id], .entry-content h4[id], .entry-content h5[id], .entry-content h6[id] { scroll-margin-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Phones: font buttons and share icons stay on one line. */
@media (max-width: 600px) {
	.reader-bar { gap: 8px 10px; }
	.reader-font, .reader-share { gap: 5px; }
	.reader-font button { padding: 0 10px; }
	.share-panel { width: min(320px, calc(100vw - 24px)); }
	.reader-share .share-toggle { width: 32px; height: 32px; }
}
/* Share: one pill button + popup with all platforms. */
.reader-share .share-toggle { justify-content: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; }
.share-toggle svg, .share-toggle i { width: 16px; height: 16px; font-size: calc(15px * var(--fs, 1)); }
.reader-share svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.share-panel { position: absolute; z-index: 60; top: calc(100% + 8px); inset-inline-end: 0; width: 340px; max-width: calc(100vw - 24px); padding: 10px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16); display: flex; flex-direction: column; gap: 6px; }
.share-panel[hidden], .share-native[hidden] { display: none; }
.share-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.share-item, .share-copy, .share-native { display: flex; align-items: center; color: var(--ink); background: transparent; border: 0; font: inherit; font-size: calc(12px * var(--fs, 1)); font-weight: 500; text-decoration: none; cursor: pointer; border-radius: 6px; position: relative; }
.share-item { flex-direction: column; justify-content: center; gap: 6px; padding: 8px 2px; text-align: center; min-width: 0; }
.share-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-item i { font-size: calc(20px * var(--fs, 1)); line-height: 1; }
.share-item svg { width: 22px; height: 22px; }
.share-copy, .share-native { gap: 10px; padding: 9px 10px; font-size: calc(13px * var(--fs, 1)); border: 1px solid var(--line); justify-content: flex-start; }
.share-copy svg, .share-native svg { width: 16px; height: 16px; }
.share-item:hover, .share-copy:hover, .share-native:hover { background: var(--mint, #e6efe9); }
.share-copy.is-copied { border-color: var(--green); color: var(--green); }
.share-copy.is-copied::after { content: attr(data-copied); margin-inline-start: auto; font-weight: 600; }
.share-facebook { color: #1877f2; }
.share-x { color: var(--ink); }
.share-whatsapp { color: #1fa855; }
.share-telegram { color: #229ed9; }
.share-linkedin { color: #0a66c2; }
.share-reddit { color: #ff4500; }
.share-pinterest { color: #e60023; }
.share-bluesky { color: #1185fe; }
.share-threads { color: var(--ink); }
.share-tumblr { color: #36465d; }
.share-vk { color: #0077ff; }
.share-email { color: var(--muted); }
.share-item span { color: var(--ink); }

@media print { .reader-bar, .toc, .theme-toggle { display: none; } }
