/*
 * clipping.css
 * ============
 * Every rule below is copied verbatim from Radha's Design's
 * templates/print.php inline <style> block. Nothing here is redesigned.
 *
 * Two things that WERE in that block are deliberately not here:
 *   - column-count and background-color on .news-details-print - these
 *     varied per render even in the original (site setting / per-post),
 *     and now that Renderer can be asked for several column variants of
 *     the same article, they're applied as an inline style by
 *     AR_Renderer::render_clipping() itself, at the same values the
 *     original computed, just at the correct scope.
 *   - body.print-body's width, and the "online style" width override -
 *     these describe the STANDALONE PRINT PAGE's own container, not a
 *     clipping's appearance, and stay in templates/print-standalone.php.
 *
 * Loaded exactly once per context (standalone page, admin measurement
 * screen, or an assembled newspaper page) - never duplicated, never
 * rewritten.
 */

/*
 * Self-hosted fonts (moved off saakshi.co.in - a third-party site this
 * plugin does not control). All 5 are the exact same official Google
 * Fonts releases (Silicon Andhra, SIL Open Font License v1.1 - free for
 * commercial use), just served from this plugin's own assets/fonts/
 * folder now instead of over the network from another domain. Paths are
 * relative to THIS file's own location (assets/css/), so they resolve
 * correctly no matter what domain the site is on - no AR_STUDIOS_URL
 * dependency needed here.
 *
 * font-display: swap added so a slow font load never blocks text from
 * appearing - browser shows a fallback font first, then swaps to the
 * real one once loaded. This does not change measurement: the
 * Rendering Service already waits on document.fonts.ready before
 * measuring, which resolves only once every @font-face below has
 * either loaded or failed - swap only affects the FIRST paint a human
 * sees, not what gets measured.
 */
@font-face {
  font-family: 'Sree Krushnadevaraya';
  src: url('../fonts/SreeKrushnadevaraya-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'NTR';
  src: url('../fonts/NTR-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Gidugu';
  src: url('../fonts/Gidugu-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Suravaram';
  src: url('../fonts/Suravaram-Regular.ttf') format('truetype');
  font-display: swap;
}
/* NEW - was referenced by .subtitle-dynamic below but never actually
   declared anywhere, on saakshi.co.in or otherwise. It was silently
   falling back to the browser's own default font this whole time. Now
   genuinely self-hosted and correctly rendered like the other 4. */
@font-face {
  font-family: 'Ramabhadra';
  src: url('../fonts/Ramabhadra-Regular.ttf') format('truetype');
  font-display: swap;
}

body.print-body {
  margin: 0;
  padding: 0;
  font-family: 'Gautami', sans-serif;
}

#download_area {
  min-height: 100vh;
  padding: 30px;
}

.news-details-print {
  column-gap: 70px;
  padding: 10px;
  line-height: 1.2 !important;
  color: #000 !important;
  font-size: 22px;
}

.news-details-print p {
  background-color: transparent !important;
  margin-top: 0;
  margin-bottom: 2px !important;
  line-height: 1.2 !important;
  color: #000 !important;
  text-align: justify;
}

.news-details-print img {
  max-width: 100%;
  height: auto !important;
  display: block;
  /* BUGFIX (reported: too much gap above the photo): was 20px auto 30px
     auto - tightened the top margin to sit closer under the title/
     subtitle, per the reference pages. */
  margin: 8px auto 20px auto;
  break-inside: avoid;
}

h1.title-dynamic {
  text-align: center;
  /* Set inline per-article by AR_Renderer::render_clipping() to
     TITLE_FONT_SIZE_PX (85px, fixed - same for every title regardless
     of length, per explicit instruction). This 85px is only a fallback
     for the rare case the inline style is somehow missing - the inline
     value always wins over this class rule either way. */
  font-size: 85px;
  font-weight: normal;
  margin: 0 !important;
  padding: 30px 0 0 0 !important;
  line-height: 1.15 !important;
  color: inherit;
  font-family: inherit !important;
}

.subtitle-dynamic {
  text-align: center;
  /* Set inline per-article by AR_Renderer::render_clipping() to
     SUBTITLE_FONT_SIZE_PX (50px, fixed regardless of length). This 50px
     is only a fallback. */
  font-size: 50px;
  font-family: Ramabhadra, sans-serif;
  line-height: 1.1 !important;
  /* BUGFIX (reported: too much gap between subtitle and the photo below
     it): was 30px, stacking with .news-details-print's own 10px padding
     and the image's own 20px top margin for ~60px of dead space. */
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  color: #fa0202;
}

.print-float {
  text-align: center;
  margin-top: 40px;
}

.print-float a.btn {
  display: inline-block;
  background-color: #4CAF50;
  color: #fff;
  padding: 12px 25px;
  margin: 0 10px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.print-float a.btn:hover {
  background-color: #333;
  color: #fff;
}

.print-float img {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 10px;
}

/* Only zoomed-out PC screen view - scoped to the standalone print page
   specifically (via this class on its <html> element), so loading this
   same stylesheet on the admin/Generate screen never zooms that screen
   out - the rule's INTENT (a convenience for a human viewing one
   clipping alone) is preserved; only its reach is now bounded to where
   that intent actually applies. */
@media screen and (min-width: 1025px) {
  html.ar-standalone-print {
    zoom: 0.50;
  }
}
