/* ============================================
   PRINT STYLES — Attic Recipes
   ============================================ */

@media print {
  /* -------------------------
     Reset & Base
     ------------------------- */
  html {
    font-size: 10.5pt;
  }

  body {
    margin: 0;
    padding: 0;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.5;
    color: #1a1a1a;
    background: #fff;
  }

  @page {
    size: A4 portrait;
    margin: 1.8cm 1.5cm 2cm;
  }

  /* -------------------------
     Sakrij sve osim recepta
     ------------------------- */
  header,
  nav,
  footer,
  aside,
  .breadcrumbs,
  img,
  picture,
  figure,
  video,
  iframe,
  .tab-bar,
  .print-row,
  .no-print,
  .lazy-hidden,
  [data-lazy-component],
  [data-print="hide"],
  .check-box,
  .ingredient-check,
  .step-aside::after {
    display: none !important;
  }

  /* Sakrij sve article divove osim recipe-tabs wrappera */
  article > div:not(:has([data-recipe-tabs])) {
    display: none !important;
  }

  /* -------------------------
     Wrapper
     ------------------------- */
  .recipe-tabs-wrapper,
  [data-recipe-tabs] {
    box-shadow: none !important;
    border: none !important;
    overflow: visible !important;
    border-radius: 0 !important;
  }

  /* Oba panela vidljiva, jedan ispod drugog */
  .panels-wrapper {
    display: block !important;
  }

  .panel-wrap {
    display: block !important;
  }

  /* Separator između ingredijenata i instrukcija */
  .panel-instructions-wrap {
    border-top: 1.5pt solid #1a1a1a;
    margin-top: 1.2em;
    padding-top: 1em;
  }

  /* -------------------------
     Recipe Hero — naslov + meta
     ------------------------- */

  /* Sakrij sve u hero osim h1, description i meta grida */
  .recipe-tabs-wrapper ~ div,
  [data-recipe-tabs] ~ div {
    display: none !important;
  }

  /* Hero wrapper — ukloni margin */
  article > div:first-child {
    display: block !important;
    margin-bottom: 1.2em;
  }

  /* Sakrij category badge, difficulty, year pill */
  article > div:first-child > div:first-child {
    display: none !important;
  }

  /* Sakrij hero sliku */
  article > div:first-child .aspect-video,
  article > div:first-child img,
  article > div:first-child picture {
    display: none !important;
  }

  /* H1 naslov */
  .font-heading {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20pt;
    font-weight: bold;
    color: #1a1a1a;
    margin: 0 0 0.3em;
    line-height: 1.2;
    page-break-after: avoid;
  }

  /* Description */
  article > div:first-child > p {
    font-size: 10pt;
    color: #444;
    font-style: italic;
    margin: 0 0 0.8em;
    line-height: 1.5;
  }

  /* Meta grid — prep/cook/total time, servings */
  article > div:first-child > div[role="list"] {
    display: flex !important;
    gap: 1.5em;
    border-top: 0.5pt solid #bbb;
    border-bottom: 0.5pt solid #bbb;
    padding: 0.5em 0;
    margin-bottom: 1em;
    background: none !important;
    border-radius: 0 !important;
  }

  article > div:first-child > div[role="list"] svg {
    display: none !important;
  }

  article > div:first-child > div[role="list"] [role="listitem"] {
    text-align: left;
    display: flex;
    gap: 0.3em;
    align-items: baseline;
  }

  article > div:first-child > div[role="list"] .text-sm {
    font-size: 8pt;
    color: #666;
  }

  article > div:first-child > div[role="list"] .text-lg {
    font-size: 9.5pt;
    font-weight: bold;
    color: #1a1a1a;
  }

  h2,
  h3 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  /* -------------------------
     INGREDIENTS
     ------------------------- */
  .ingredients-panel {
    padding: 0.5em 0 1em;
  }

  /* Sekcijski naslov — ručno dodat jer ga nema u markupu */
  .ingredients-panel::before {
    content: "Ingredients";
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13pt;
    font-weight: bold;
    border-bottom: 1pt solid #1a1a1a;
    padding-bottom: 0.3em;
    margin-bottom: 0.7em;
  }

  .ingredient-list {
    list-style: none;
    padding: 0;
    margin: 0;
    /* Dva kolone za ingredijente — štedi prostor */
    columns: 2;
    column-gap: 2em;
    column-rule: 0.5pt solid #ccc;
  }

  .ingredient-item {
    border-bottom: 0.5pt dotted #bbb;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .ingredient-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
    padding: 0.35em 0;
    cursor: default;
    min-height: 0;
  }

  /* Bullet umesto checkboxa */
  .ingredient-label::before {
    content: "▪";
    flex-shrink: 0;
    font-size: 0.7em;
    margin-top: 0.3em;
    color: #1a1a1a;
  }

  .ingredient-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .ingredient-name {
    font-size: 9.5pt;
    color: #1a1a1a;
    line-height: 1.4;
    text-decoration: none !important;
    opacity: 1 !important;
  }

  .amount {
    font-weight: bold;
    color: #1a1a1a;
  }

  .ingredient-note {
    font-size: 8pt;
    color: #444;
    font-style: italic;
  }

  /* Original measure — sivo, diskretno */
  .measure-original {
    font-size: 7.5pt;
    color: #666;
  }

  /* Modern equivalent — malo tamniji */
  .measure-modern {
    font-size: 7.5pt;
    color: #444;
  }

  /* -------------------------
     INSTRUCTIONS
     ------------------------- */
  .instructions-panel {
    padding: 0.5em 0;
  }

  .instructions-panel::before {
    content: "Instructions";
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13pt;
    font-weight: bold;
    border-bottom: 1pt solid #1a1a1a;
    padding-bottom: 0.3em;
    margin-bottom: 0.7em;
  }

  .steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .step-item {
    display: flex;
    gap: 0.8em;
    margin-bottom: 0.9em;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .step-item:last-child {
    margin-bottom: 0;
  }

  /* Step aside — samo broj, bez connector linije */
  .step-aside {
    flex-shrink: 0;
    width: auto;
  }

  .step-number {
    width: 22pt;
    height: 22pt;
    border: 1.2pt solid #1a1a1a;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-size: 8.5pt;
    font-weight: bold;
    color: #1a1a1a;
    flex-shrink: 0;
  }

  /* Connector linija — sakrij u printu */
  .step-aside::after {
    display: none !important;
  }

  .step-content {
    flex: 1;
    padding-top: 2pt;
  }

  .step-text {
    font-size: 9.5pt;
    line-height: 1.6;
    color: #1a1a1a;
    margin: 0 0 0.3em;
  }

  /* ── Tip block ── */
  .tip-block {
    font-size: 8.5pt;
    color: #333;
    background: none;
    border-left: 2pt solid #555;
    border-radius: 0;
    padding: 0.25em 0.6em;
    margin-top: 0.4em;
    line-height: 1.5;
  }

  .tip-label {
    font-weight: bold;
  }

  /* ── Original text block ── */
  .original-block {
    font-size: 8pt;
    color: #555;
    background: none;
    border-left: 1.5pt solid #999;
    border-radius: 0;
    padding: 0.2em 0.6em;
    margin-top: 0.35em;
    font-style: italic;
    line-height: 1.5;
  }

  .original-label {
    font-style: normal;
    font-size: 7pt;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #777;
    display: block;
    margin-bottom: 0.1em;
  }

  /* -------------------------
     Links
     ------------------------- */
  a {
    color: #1a1a1a !important;
    text-decoration: none !important;
  }

  a[href]::after {
    content: "" !important;
  }

  /* -------------------------
     Page breaks
     ------------------------- */
  h1,
  h2,
  h3 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }
}
