/* /parolebuilder/app/static/css/print.css
 * Print styles for ParoleBuilder
 * These styles are applied when the page is printed
 */

@media print {
    /* Hide navigation, footer, and interactive elements */
    nav,
    .navbar,
    footer,
    .footer,
    .sidebar,
    .btn,
    .btn-group,
    .dropdown,
    .alert:not(.alert-info),
    .modal,
    .toast,
    .breadcrumb,
    .pagination,
    .no-print,
    .print-hide,
    #navbarNav,
    .nav-tabs,
    .tab-content > .tab-pane:not(.active) {
        display: none !important;
    }

    /* Reset body and container */
    body {
        font-size: 12pt !important;
        line-height: 1.5 !important;
        color: #000 !important;
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Full-width containers */
    .container,
    .container-fluid,
    .container-lg,
    .container-md,
    .container-sm,
    .container-xl,
    .container-xxl {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Page margins */
    @page {
        margin: 0.75in;
        size: letter;
    }

    /* Headers */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
        color: #000 !important;
    }

    h1 {
        font-size: 18pt !important;
        margin-bottom: 12pt !important;
    }

    h2 {
        font-size: 16pt !important;
        margin-bottom: 10pt !important;
    }

    h3 {
        font-size: 14pt !important;
        margin-bottom: 8pt !important;
    }

    /* Paragraphs */
    p {
        orphans: 3;
        widows: 3;
        margin-bottom: 10pt !important;
    }

    /* Tables */
    table {
        border-collapse: collapse !important;
        width: 100% !important;
    }

    th, td {
        border: 1px solid #000 !important;
        padding: 6pt !important;
        text-align: left !important;
    }

    thead {
        display: table-header-group;
    }

    tr {
        page-break-inside: avoid;
    }

    /* Cards - show as simple sections */
    .card {
        border: 1px solid #ccc !important;
        margin-bottom: 12pt !important;
        page-break-inside: avoid;
        box-shadow: none !important;
    }

    .card-header {
        background: #f8f9fa !important;
        border-bottom: 1px solid #ccc !important;
        padding: 8pt !important;
        font-weight: bold !important;
    }

    .card-body {
        padding: 10pt !important;
    }

    /* Links - show URL for external links */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }

    a[href^="/"]:after,
    a[href^="#"]:after {
        content: "";
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    /* Images */
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }

    /* Lists */
    ul, ol {
        margin-left: 20pt !important;
    }

    li {
        page-break-inside: avoid;
    }

    /* Progress bars - show as text */
    .progress {
        display: none !important;
    }

    .progress-text {
        display: block !important;
    }

    /* Form elements - hide */
    input,
    select,
    textarea,
    button,
    .form-control,
    .form-select {
        display: none !important;
    }

    /* Show form values as text */
    .form-value,
    .print-value {
        display: block !important;
    }

    /* Letter content - main print target */
    .letter-content,
    .print-content {
        font-size: 12pt !important;
        line-height: 1.6 !important;
        text-align: justify !important;
    }

    .letter-content p {
        margin-bottom: 12pt !important;
    }

    /* Print header */
    .print-header {
        display: block !important;
        text-align: center !important;
        margin-bottom: 24pt !important;
        border-bottom: 2px solid #000 !important;
        padding-bottom: 12pt !important;
    }

    .print-header h1 {
        margin-bottom: 6pt !important;
    }

    .print-header .subtitle {
        font-size: 11pt !important;
        color: #666 !important;
    }

    /* Print footer */
    .print-footer {
        display: block !important;
        margin-top: 24pt !important;
        padding-top: 12pt !important;
        border-top: 1px solid #ccc !important;
        font-size: 9pt !important;
        color: #666 !important;
    }

    /* Quality badge */
    .badge {
        border: 1px solid #000 !important;
        background: transparent !important;
        color: #000 !important;
        padding: 2pt 4pt !important;
    }

    /* Inmate info section */
    .inmate-info {
        margin-bottom: 18pt !important;
    }

    .inmate-info dt {
        font-weight: bold !important;
        display: inline !important;
    }

    .inmate-info dd {
        display: inline !important;
        margin-left: 6pt !important;
    }

    .inmate-info dd:after {
        content: "" !important;
        display: block !important;
    }

    /* Signature line */
    .signature-line {
        margin-top: 36pt !important;
        border-top: 1px solid #000 !important;
        width: 50% !important;
        padding-top: 6pt !important;
    }

    /* Date line */
    .date-line {
        margin-top: 24pt !important;
    }

    /* Sections - avoid breaking */
    section,
    .section,
    .print-section {
        page-break-inside: avoid;
    }

    /* Force page breaks where needed */
    .page-break,
    .print-break {
        page-break-before: always;
    }

    /* Show elements marked for print only */
    .print-only,
    .d-print-block {
        display: block !important;
    }

    .print-only-inline,
    .d-print-inline {
        display: inline !important;
    }

    /* Hide screen-only elements */
    .screen-only,
    .d-print-none {
        display: none !important;
    }

    /* Checklist for print */
    .checklist-item {
        margin-bottom: 6pt !important;
    }

    .checklist-item.completed:before {
        content: "\2713 " !important;
    }

    .checklist-item.pending:before {
        content: "\2610 " !important;
    }

    /* Document list */
    .document-list {
        list-style: none !important;
        padding: 0 !important;
    }

    .document-list li {
        padding: 4pt 0 !important;
        border-bottom: 1px dotted #ccc !important;
    }

    /* Timeline */
    .timeline {
        border-left: 2px solid #000 !important;
        padding-left: 12pt !important;
        margin-left: 6pt !important;
    }

    .timeline-item {
        position: relative !important;
        margin-bottom: 12pt !important;
    }

    .timeline-item:before {
        content: "" !important;
        position: absolute !important;
        left: -16pt !important;
        top: 4pt !important;
        width: 8pt !important;
        height: 8pt !important;
        border: 2px solid #000 !important;
        border-radius: 50% !important;
        background: #fff !important;
    }

    .timeline-item.completed:before {
        background: #000 !important;
    }
}

/* Utility classes for controlling print visibility */
@media screen {
    .print-only,
    .print-header,
    .print-footer {
        display: none !important;
    }
}
