/* BirthPlan.net - Print Styles */
/* ============================== */

@media print {
    /* Reset and Base Print Styles */
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        font-family: 'Georgia', serif;
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: white;
    }

    /* Page Layout */
    @page {
        margin: 2cm;
        size: letter;
    }

    @page :first {
        margin-top: 3cm;
    }

    /* Typography */
    h1, h2, h3, h4, h5, h6 {
        font-family: 'Georgia', serif;
        page-break-after: avoid;
        page-break-inside: avoid;
        margin-top: 1.5em;
        margin-bottom: 0.5em;
    }

    h1 {
        font-size: 24pt;
        border-bottom: 2px solid #000;
        padding-bottom: 0.5em;
    }

    h2 {
        font-size: 18pt;
        margin-top: 1em;
    }

    h3 {
        font-size: 14pt;
    }

    h4 {
        font-size: 12pt;
        font-weight: bold;
    }

    p {
        margin-bottom: 1em;
        orphans: 3;
        widows: 3;
    }

    /* Links */
    a {
        color: #000;
        text-decoration: underline;
    }

    a[href^="http"]:after,
    a[href^="https"]:after {
        content: " (" attr(href) ")";
        font-size: 0.9em;
        color: #666;
    }

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

    /* Hide Non-Essential Elements */
    .site-header,
    .site-footer,
    .navigation,
    .nav-menu,
    .mobile-menu-toggle,
    .dropdown-menu,
    .ad-container,
    .ad-placeholder,
    .social-links,
    .newsletter-section,
    .cookie-consent,
    .back-to-top,
    .hero-stats,
    .view-all-articles,
    .video-container,
    .audio-container,
    iframe,
    object,
    embed {
        display: none !important;
    }

    /* Container and Layout */
    .container {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    /* Main Content Area */
    main {
        width: 100%;
    }

    /* Hero Section for Homepage */
    .hero-section {
        border: 1px solid #000;
        padding: 1em;
        margin-bottom: 2em;
        text-align: center;
        page-break-after: always;
    }

    .hero-title {
        font-size: 28pt;
        margin-bottom: 0.5em;
    }

    .hero-subtitle {
        font-size: 14pt;
        margin-bottom: 1em;
    }

    .hero-cta {
        display: none;
    }

    /* Sections */
    section {
        page-break-inside: avoid;
        margin-bottom: 2em;
    }

    .section-title {
        font-size: 20pt;
        text-align: left;
        border-bottom: 1px solid #000;
        padding-bottom: 0.25em;
        margin-bottom: 1em;
    }

    .section-subtitle {
        font-size: 12pt;
        font-style: italic;
        margin-bottom: 1em;
    }

    /* Tools and Cards */
    .tools-grid,
    .articles-grid,
    .features-grid {
        display: block;
    }

    .tool-card,
    .article-card,
    .feature {
        border: 1px solid #ccc;
        padding: 1em;
        margin-bottom: 1em;
        page-break-inside: avoid;
    }

    .tool-icon,
    .feature-icon {
        display: none;
    }

    .tool-card h3,
    .article-card h4,
    .feature h3 {
        font-size: 14pt;
        margin-bottom: 0.5em;
    }

    /* Images */
    img {
        max-width: 100%;
        page-break-inside: avoid;
        page-break-after: avoid;
    }

    svg {
        max-width: 100%;
        height: auto;
    }

    .article-image {
        display: none; /* Hide decorative images */
    }

    /* Lists */
    ul, ol {
        margin-left: 1.5em;
        margin-bottom: 1em;
    }

    li {
        margin-bottom: 0.25em;
    }

    /* Tables */
    table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 1em;
        page-break-inside: avoid;
    }

    th, td {
        border: 1px solid #000;
        padding: 0.5em;
        text-align: left;
    }

    th {
        background: #f0f0f0;
        font-weight: bold;
    }

    /* Forms - Birth Plan Generator Print Layout */
    form {
        page-break-inside: avoid;
    }

    input[type="text"],
    input[type="email"],
    input[type="date"],
    textarea {
        border: 1px solid #000;
        padding: 0.25em;
        margin-bottom: 0.5em;
        width: 100%;
    }

    input[type="checkbox"],
    input[type="radio"] {
        margin-right: 0.5em;
    }

    label {
        font-weight: bold;
        display: block;
        margin-top: 0.5em;
        margin-bottom: 0.25em;
    }

    .btn {
        display: none;
    }

    /* Birth Plan Specific Styles */
    .birth-plan-output {
        font-size: 11pt;
        line-height: 1.6;
    }

    .birth-plan-section {
        margin-bottom: 1.5em;
        page-break-inside: avoid;
    }

    .birth-plan-section h2 {
        font-size: 14pt;
        border-bottom: 1px solid #000;
        padding-bottom: 0.25em;
        margin-bottom: 0.5em;
    }

    .birth-plan-section h3 {
        font-size: 12pt;
        font-weight: bold;
        margin-top: 0.75em;
        margin-bottom: 0.5em;
    }

    .preference-item {
        margin-bottom: 0.5em;
        padding-left: 1em;
    }

    .preference-item::before {
        content: "• ";
        margin-left: -1em;
    }

    /* Checklist Print Styles */
    .checklist-item {
        margin-bottom: 0.5em;
        page-break-inside: avoid;
    }

    .checklist-item input[type="checkbox"] {
        width: 15px;
        height: 15px;
        margin-right: 0.5em;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .checklist-category {
        font-size: 14pt;
        font-weight: bold;
        margin-top: 1em;
        margin-bottom: 0.5em;
        border-bottom: 1px solid #000;
        padding-bottom: 0.25em;
    }

    /* FAQ Section */
    .faq-section {
        page-break-before: always;
    }

    .faq-item {
        margin-bottom: 1em;
        page-break-inside: avoid;
    }

    .faq-question {
        font-weight: bold;
        font-size: 12pt;
        margin-bottom: 0.5em;
    }

    .faq-question::after {
        display: none;
    }

    .faq-answer {
        display: block !important;
        margin-left: 1em;
        font-size: 11pt;
    }

    /* Footer Info for Print */
    .print-footer {
        display: block;
        margin-top: 2em;
        padding-top: 1em;
        border-top: 1px solid #000;
        font-size: 10pt;
        text-align: center;
    }

    .print-footer::after {
        content: "© 2024 BirthPlan.net - Printed on " attr(data-date);
        display: block;
    }

    /* Page Breaks */
    .page-break {
        page-break-after: always;
    }

    .no-break {
        page-break-inside: avoid;
    }

    /* Article Print Styles */
    article {
        max-width: 100%;
    }

    .article-meta {
        font-size: 10pt;
        color: #666;
        margin-bottom: 1em;
        border-bottom: 1px solid #ccc;
        padding-bottom: 0.5em;
    }

    .author-bio {
        border: 1px solid #ccc;
        padding: 0.5em;
        margin-top: 1em;
        font-size: 10pt;
        page-break-inside: avoid;
    }

    /* Blockquotes */
    blockquote {
        border-left: 3px solid #000;
        padding-left: 1em;
        margin: 1em 0;
        font-style: italic;
    }

    /* Code blocks (if any) */
    pre, code {
        font-family: 'Courier New', monospace;
        font-size: 10pt;
        border: 1px solid #ccc;
        padding: 0.5em;
        page-break-inside: avoid;
    }

    /* Print URL at bottom of page */
    .print-url {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 0.5em;
        font-size: 9pt;
        text-align: center;
        border-top: 1px solid #ccc;
    }

    /* Color Adjustments */
    * {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    /* Ensure content fills page */
    body {
        margin: 0;
        padding: 0;
    }

    /* Headers and Footers for multi-page documents */
    .page-header {
        position: running(header);
        font-size: 10pt;
        text-align: right;
    }

    @page {
        @top-right {
            content: element(header);
        }
        @bottom-center {
            content: counter(page) " of " counter(pages);
            font-size: 10pt;
        }
    }
}