/* ==========================================================================
   Dilekçe Örnekleri — liste, detay (A4 önizleme) ve yazdırma stilleri
   ========================================================================== */

/* ---------- Dosya türü simgesi ---------- */
.doc-icon { width: 46px; height: 54px; flex-shrink: 0; border-radius: 10px; display: inline-grid; place-items: center; font-size: 1.45rem; background: var(--brand-50); color: var(--brand-600); }
.doc-icon-sm { width: 34px; height: 40px; font-size: 1.05rem; border-radius: 8px; }
.doc-icon-lg { width: 60px; height: 70px; font-size: 1.9rem; border-radius: 12px; }
.doc-icon-word { background: #e8effa; color: #2b579a; }
.doc-icon-pdf { background: #fdecea; color: #b42318; }
.doc-icon-excel { background: #e6f4ec; color: #1d6f42; }
.doc-icon-text { background: var(--brand-50); color: var(--brand-600); }
.doc-icon-file { background: #f2f4f7; color: #475467; }

/* ---------- Kategori menüsü ---------- */
.doc-nav-title { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
@media (max-width: 991.98px) { .doc-cat-nav { position: static; } }
.doc-count-badge { background: var(--brand-50); color: var(--brand-700); font-weight: 600; font-size: .75rem; }
.side-nav .list-group-item.active .doc-count-badge { background: rgba(255, 255, 255, .18); color: #fff; }
.doc-chip-nav { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.doc-chip-nav::-webkit-scrollbar { display: none; }
.doc-chip-nav .chip { flex-shrink: 0; white-space: nowrap; }
.doc-count { display: inline-block; min-width: 1.5em; padding: 0 .4em; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: .75rem; text-align: center; }
.chip.active .doc-count { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- Arama ve sonuç bilgisi ---------- */
.doc-search .input-group-text { background: var(--surface); border-color: #d4dbe5; color: var(--muted); border-radius: 10px 0 0 10px; }
.doc-search .form-control { border-left: 0; }
.doc-search .btn { border-radius: 0 10px 10px 0; }
.doc-result-info { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.doc-result-info strong { color: var(--ink); }

/* ---------- Liste ---------- */
.doc-list { display: grid; gap: 12px; }
.doc-item { display: flex; align-items: flex-start; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; transition: border-color .15s ease, box-shadow .15s ease; }
.doc-item:hover { border-color: var(--brand-100); box-shadow: var(--shadow); }
.doc-item-body { flex: 1 1 auto; min-width: 0; }
.doc-item-title { font-size: 1.04rem; line-height: 1.35; margin: 2px 0 4px; }
.doc-item-title a { color: var(--brand-900); }
.doc-item-title a:hover { color: var(--brand-600); }
.doc-item-desc { color: var(--ink-2); font-size: .9rem; margin: 0 0 8px; overflow-wrap: anywhere; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-size: .8rem; }
.doc-meta .badge { font-size: .76rem; }
.doc-meta a.badge:hover { text-decoration: none; background: var(--brand-100); }
.doc-meta i { margin-right: 3px; }
.doc-item-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; min-width: 170px; }
.doc-item-actions .btn { text-align: left; white-space: nowrap; }
@media (max-width: 767.98px) {
  .doc-item { flex-wrap: wrap; padding: 14px; gap: 12px; }
  .doc-item-body { flex-basis: calc(100% - 58px); }
  .doc-item-actions { flex-direction: row; flex-wrap: wrap; width: 100%; min-width: 0; }
  .doc-item-actions .btn { flex: 1 1 auto; text-align: center; }
}

/* ---------- Detay ---------- */
.doc-lead { font-size: 1.02rem; color: var(--ink-2); margin-bottom: 14px; }
.doc-lead p:last-child { margin-bottom: 0; }
.doc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.doc-btn-meta { font-weight: 400; opacity: .8; }
.doc-ph-toggle[aria-pressed="false"] { opacity: .75; }
.doc-hint { color: var(--muted); font-size: .85rem; margin: 12px 0 0; }
.doc-hint i { color: var(--brand-500); }
.doc-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 8px 0 0; font-size: .9rem; }
.doc-facts dt { color: var(--muted); font-weight: 500; }
.doc-facts dd { margin: 0; color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.doc-detail .feed-list > li { align-items: center; padding: 9px 0; }
.doc-file-card { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 20px; }
.doc-file-card-body { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }

/* A4 kâğıt önizleme */
.doc-paper-wrap { background: #e9edf2; border-radius: var(--radius); padding: clamp(10px, 3vw, 32px); }
.doc-paper {
  background: #fff; color: #000; max-width: 800px; margin: 0 auto;
  padding: clamp(22px, 7vw, 72px) clamp(16px, 7vw, 76px);
  font-family: "Times New Roman", Times, "Liberation Serif", serif; font-size: 12pt; line-height: 1.6;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .12), 0 12px 32px rgba(14, 42, 71, .12);
  min-height: 420px; overflow-wrap: break-word; overflow-x: auto;
}
.doc-paper p { margin: 0 0 .85em; }
.doc-paper h2, .doc-paper h3, .doc-paper h4 { color: #000; font-family: inherit; font-size: 1em; font-weight: 700; text-align: center; letter-spacing: 0; margin: 0 0 1em; }
.doc-paper ul, .doc-paper ol { padding-left: 1.4em; margin: 0 0 .85em; }
.doc-paper li { margin-bottom: .2em; }
.doc-paper table { width: 100%; border-collapse: collapse; margin: 0 0 1em; }
.doc-paper td, .doc-paper th { border: 1px solid #333; padding: 5px 8px; vertical-align: top; }
.doc-paper th { background: transparent; text-align: left; }
.doc-paper table.doc-table-plain td, .doc-paper table.doc-table-plain th { border: 0; padding: 2px 8px; }
.doc-paper a { color: inherit; text-decoration: underline; }
.doc-paper .doc-ph { background: #fff1b8; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.doc-paper.ph-off .doc-ph { background: transparent; }
@media (max-width: 575.98px) {
  .doc-paper { font-size: 11pt; min-height: 0; padding: 22px 14px; }
  .doc-paper table { font-size: .84em; }
  .doc-paper td, .doc-paper th { padding: 4px; }
}

/* ---------- Yazdırma: yalnızca kâğıt ---------- */
@media print {
  @page { size: A4; margin: 2cm; }
  body.doc-detail-page { background: #fff; }
  body.doc-detail-page .page-hero, body.doc-detail-page .no-print, body.doc-detail-page script { display: none !important; }
  body.doc-detail-page .section { padding: 0 !important; }
  body.doc-detail-page .container, body.doc-detail-page .row, body.doc-detail-page .row > * { max-width: none !important; width: 100% !important; padding: 0 !important; margin: 0 !important; flex: none !important; }
  body.doc-detail-page .doc-paper-wrap { background: none; padding: 0; border-radius: 0; }
  body.doc-detail-page .doc-paper { box-shadow: none; padding: 0; max-width: none; min-height: 0; font-size: 12pt; overflow: visible; }
  body.doc-detail-page .doc-paper table { font-size: 1em; }
  .doc-paper .doc-ph { background: none !important; }
  .doc-paper a[href]::after { content: none !important; }
}
