/* PDF-specific styles for Dapple branding */
/* Brand colors from dapplesecurity.com */
:root {
  --brand-navy: #071936;      /* deep navy */
  --brand-teal: #00b3a6;      /* primary accent */
  --brand-teal-dark: #00796b; /* darker teal */
  --brand-neutral: #f6fbfb;   /* soft background */
  --brand-fg: #0b2540;        /* primary text */
}

/* Page setup without logo (cover_logo in mkdocs.yml handles it) */
@page {
  size: letter;
  margin: 1in 0.75in 0.75in 0.75in;
  
  @bottom-center {
    content: "Dapple Security Documentation";
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 9pt;
    color: #071936;
  }
  
  @bottom-right {
    content: "Page " counter(page);
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 9pt;
    color: #071936;
  }
}

/* First page - no logo here, cover_logo in mkdocs config handles it */
@page :first {
  margin-top: 1.5in;
}

/* Cover page specific styles */
@media print {
  /* Cover page logo spacing */
  #doc-cover img,
  .cover-page img,
  .cover img {
    margin-bottom: 40px !important;
    display: block;
  }
  
  /* Cover page title spacing */
  #doc-cover h1,
  .cover-page h1,
  .cover h1 {
    margin-top: 40px !important;
    padding-top: 20px !important;
  }
  
  /* Cover page horizontal rule - purple accent */
  #doc-cover hr,
  .cover-page hr,
  .cover hr {
    border: none !important;
    border-top: 3px solid #A3649E !important;
    border-bottom: none !important;
    border-color: #A3649E !important;
    background: #A3649E !important;
    background-color: #A3649E !important;
    color: #A3649E !important;
    height: 3px !important;
    margin: 20px 0 !important;
  }
}

/* Print-specific styles */
@media print {
  /* Body text stays black */
  body, p, li, td, th {
    color: #000000 !important;
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  }
  
  /* Headings use brand navy */
  h1, h2, h3, h4, h5, h6 {
    color: #071936 !important;
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    page-break-after: avoid;
  }
  
  h1 {
    font-size: 24pt;
    border: none !important;
    border-bottom: 3px solid #A3649E !important;
    border-color: #A3649E !important;
    padding-bottom: 8px;
    margin-top: 0;
  }
  
  h2 {
    font-size: 18pt;
    border: none !important;
    border-bottom: 2px solid #A3649E !important;
    border-color: #A3649E !important;
    padding-bottom: 6px;
  }
  
  h3 {
    font-size: 14pt;
    color: #00796b !important;
  }
  
  /* Links use brand teal */
  a, a:visited {
    color: #00b3a6 !important;
    text-decoration: underline;
  }
  
  /* Code blocks */
  code, pre {
    font-family: 'Roboto Mono', monospace;
    background-color: #f6fbfb !important;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
  }
  
  pre {
    padding: 12px;
    page-break-inside: avoid;
  }
  
  code {
    padding: 2px 4px;
    color: #071936 !important;
  }
  
  /* Tables */
  table {
    border-collapse: collapse;
    width: 100%;
    page-break-inside: avoid;
  }
  
  th {
    background-color: #00b3a6 !important;
    color: white !important;
    padding: 8px 12px;
    text-align: left;
  }
  
  td {
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
  }
  
  tr:nth-child(even) {
    background-color: #f6fbfb;
  }
  
  /* Blockquotes with teal accent */
  blockquote {
    border-left: 4px solid #00b3a6;
    padding-left: 16px;
    margin-left: 0;
    color: #333333;
    background-color: #f6fbfb;
    padding: 12px 16px;
  }
  
  /* Admonitions / callouts */
  .admonition, .note, .warning, .tip, .info {
    border-left: 4px solid #00b3a6;
    background-color: #f6fbfb;
    padding: 12px 16px;
    margin: 16px 0;
    page-break-inside: avoid;
  }
  
  .admonition-title, .note-title, .warning-title {
    color: #071936 !important;
    font-weight: 700;
  }
  
  /* Lists */
  ul, ol {
    page-break-inside: avoid;
  }
  
  li {
    margin-bottom: 4px;
  }
  
  li::marker {
    color: #00b3a6;
  }
  
  /* Horizontal rules - override all possible styling */
  hr, hr.footnotes-sep, .footnotes hr, hr[style], hr[color] {
    border: none !important;
    border-top: 2px solid #A3649E !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    border-color: #A3649E !important;
    margin: 24px 0;
    background-color: transparent !important;
    background: transparent !important;
    background-image: none !important;
    color: #A3649E !important;
    height: 2px !important;
  }
  
  * hr {
    border-color: #A3649E !important;
  }
  
  /* Table of Contents */
  #table-of-contents, .toc, nav, .md-nav {
    border-left: 3px solid #A3649E !important;
    padding-left: 16px;
  }
  
  #table-of-contents a, .toc a, nav a {
    color: #A3649E !important;
  }
  
  #table-of-contents li::marker, .toc li::marker {
    color: #A3649E !important;
  }
  
  /* Strong/bold text */
  strong, b {
    color: #071936 !important;
  }
  
  /* Hide navigation and other web elements */
  .md-header, .md-footer, .md-sidebar, .md-nav, .md-search {
    display: none !important;
  }
  
  /* Ensure images don't break across pages */
  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
  
  /* Hide embedded videos in PDF */
  iframe {
    display: none !important;
  }
  
  /* Page breaks */
  h1 {
    page-break-before: always;
  }
  
  h1:first-of-type {
    page-break-before: avoid;
  }
}
