/* Kur'an Mucizeleri — PDF export button + print layout */

.km-pdf-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid #c5d4f0;
  background: linear-gradient(180deg, #fff 0%, #f4f7fc 100%);
  color: #0345BF;
  font: 600 .82rem/1 "Open Sans", "Segoe UI", system-ui, sans-serif;
  letter-spacing: .01em;
  padding: .48rem .85rem .48rem .7rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(26, 31, 46, .04), 0 6px 16px rgba(3, 69, 191, .08);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.km-pdf-btn:hover {
  transform: translateY(-1px);
  border-color: #0345BF;
  box-shadow: 0 4px 14px rgba(3, 69, 191, .16);
  background: #fff;
}

.km-pdf-btn:active {
  transform: translateY(0);
}

.km-pdf-btn:focus-visible {
  outline: 2px solid #0345BF;
  outline-offset: 2px;
}

.km-pdf-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.km-pdf-btn--fab {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 1200;
  padding: .72rem 1.05rem .72rem .9rem;
  font-size: .88rem;
  box-shadow: 0 8px 28px rgba(3, 69, 191, .22);
}

.km-pdf-btn--fab:hover {
  box-shadow: 0 10px 32px rgba(3, 69, 191, .28);
}

.km-pdf-btn--inline {
  margin-left: auto;
}

.km-pdf-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem 1rem;
  width: 100%;
}

.km-pdf-hint {
  position: fixed;
  right: 1.1rem;
  bottom: 4.2rem;
  z-index: 1201;
  max-width: 260px;
  padding: .7rem .85rem;
  border-radius: 10px;
  background: #1a1f2e;
  color: #fff;
  font: 500 .78rem/1.35 "Open Sans", "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.km-pdf-hint.visible {
  opacity: 1;
  transform: translateY(0);
}

.km-pdf-hint::after {
  content: "";
  position: absolute;
  right: 1.6rem;
  bottom: -6px;
  border: 6px solid transparent;
  border-top-color: #1a1f2e;
  border-bottom: 0;
}

@media (max-width: 640px) {
  .km-pdf-btn--fab {
    right: .85rem;
    bottom: .85rem;
  }
  .km-pdf-hint {
    right: .85rem;
    bottom: 3.9rem;
    max-width: calc(100vw - 2rem);
  }
  .km-pdf-btn--inline .km-pdf-label-full {
    display: none;
  }
}

/* ——— Print / PDF layout ——— */
@media print {
  @page {
    size: A4;
    margin: 16mm 14mm 18mm;
  }

  html, body {
    background: #fff !important;
    color: #111 !important;
    font-size: 11pt !important;
    line-height: 1.55 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .km-topbar,
  .km-header,
  .km-pdf-btn,
  .km-pdf-hint,
  #search,
  .search-wrap,
  .list-meta,
  .stats,
  .km-nav-toggle,
  .empty-state,
  noscript {
    display: none !important;
  }

  body {
    padding: 0 !important;
    margin: 0 !important;
  }

  .wrap {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .breadcrumb {
    display: none !important;
  }

  article.main-article {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  .hero {
    background: none !important;
    border-bottom: 1.5pt solid #0345BF !important;
    padding: 0 0 10pt !important;
    margin-bottom: 12pt !important;
  }

  .badge {
    background: #0345BF !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  article.main-article h1 {
    font-size: 18pt !important;
    color: #0b1a3a !important;
    margin-bottom: 6pt !important;
  }

  .meta {
    color: #555 !important;
    font-size: 9pt !important;
  }

  .content {
    padding: 0 !important;
    font-size: 10.5pt !important;
  }

  .content img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  .content table {
    page-break-inside: auto;
    font-size: 9pt !important;
  }

  .content tr, .content h2, .content h3, .content h4, .content blockquote {
    page-break-inside: avoid;
  }

  .page-header {
    box-shadow: none !important;
    border: none !important;
    border-bottom: 1.5pt solid #0345BF !important;
    border-radius: 0 !important;
    padding: 0 0 10pt !important;
    margin-bottom: 12pt !important;
    text-align: left !important;
  }

  .page-header::before {
    display: none !important;
  }

  .article-list {
    display: block !important;
  }

  .article-list li {
    box-shadow: none !important;
    border: none !important;
    border-bottom: .5pt solid #ddd !important;
    border-radius: 0 !important;
    break-inside: avoid;
  }

  .article-list a {
    padding: 4pt 0 !important;
    border: none !important;
    color: #111 !important;
    font-size: 10pt !important;
  }

  .article-list a::before,
  .article-list a::after {
    display: none !important;
  }

  .site-footer {
    margin-top: 18pt !important;
    border-top: .5pt solid #ccc;
    padding-top: 8pt;
    font-size: 8.5pt !important;
    color: #666 !important;
  }

  .km-pdf-print-banner {
    display: block !important;
    margin-bottom: 10pt;
    padding-bottom: 8pt;
    border-bottom: .5pt solid #c5d4f0;
    font-size: 8.5pt;
    color: #555;
  }

  .km-pdf-print-banner strong {
    color: #0345BF;
    font-size: 10pt;
  }
}

.km-pdf-print-banner {
  display: none;
}
