/* Print styles */

@media print {
    html {
        font-size: 12pt; /* makes rem-based component sizes scale from print baseline */
    }

    .site-header,
    .site-footer,
    .nav-toggle,
    .btn {
        display: none !important;
    }

    .hero {
        color: var(--color-gray-900) !important;
        padding: var(--space-md) 0 !important;
        border-bottom: 2px solid var(--color-gray-900);
    }

    .hero__panel--content {
        background: none !important;
        color: var(--color-gray-900) !important;
        min-height: 0 !important;
        padding: 0 !important;
    }

    .hero__title {
        font-size: 14pt !important;
        color: var(--color-gray-900) !important;
        opacity: 1 !important;
    }

    .hero__name {
        font-size: 18pt !important;
        color: var(--color-gray-900) !important;
    }

    .hero__logo svg {
        display: none !important;
    }

    .hero__subtitle {
        font-size: 11pt !important;
        color: var(--color-gray-900) !important;
    }

    .hero__actions {
        display: none !important;
    }

    .page-header {
        background: none !important;
        color: var(--color-gray-900) !important;
        padding: var(--space-md) 0 !important;
        border-bottom: 2px solid var(--color-gray-900);
    }

    .page-header__title {
        color: var(--color-gray-900) !important;
        font-size: 18pt !important;
    }

    .page-header__subtitle {
        color: var(--color-gray-900) !important;
        font-size: 11pt !important;
    }

    body {
        font-size: 1rem;
        color: var(--color-gray-900);
        background: var(--color-white);
    }

    a {
        color: var(--color-gray-900);
        text-decoration: underline;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .event-card {
        break-inside: avoid;
        border: 1px solid var(--color-gray-300);
        box-shadow: none;
    }

    .staff-card {
        break-inside: avoid;
        box-shadow: none;
    }

    .scripture-tooltip {
        display: none !important;
    }

    .scripture-ref {
        border-bottom: none;
        cursor: default;
    }

    .ministry-card {
        break-inside: avoid;
        box-shadow: none;
    }

    .ministry-detail__meta {
        background: none;
        border: 1px solid var(--color-gray-300);
    }

    .event-detail__meta {
        background: none;
        border: 1px solid var(--color-gray-300);
    }

    .staff-detail__meta {
        background: none;
        border: 1px solid var(--color-gray-300);
    }

    .staff-detail__photo {
        box-shadow: none;
    }

    .staff-toolbar,
    .staff-form {
        display: none !important;
    }

    /* Giving records: the per-row status-change form is interactive chrome, not data. */
    .gift-status-form {
        display: none !important;
    }

    .announcement-banner {
        display: none !important;
    }

    .bulletins-content {
        background: none !important;
    }

    .bulletin-group {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--color-gray-300);
    }

    /* Auth pages — hide form chrome, keep legible text */
    .auth-section {
        background: none !important;
    }
    .auth-form {
        box-shadow: none !important;
        border: 1px solid var(--color-gray-300) !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    /* Announcement cards — flatten colored left border */
    .announcement-card {
        border-left-width: 1px !important;
        border-color: var(--color-gray-300) !important;
        break-inside: avoid;
    }

    /* Directory — remove colored backgrounds */
    .directory-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--color-gray-300);
    }

    .directory-detail__photo-frame {
        background: none !important;
    }

    .directory-hidden-badge {
        display: none !important;
    }

    /* Staff dashboard */
    .staff-dashboard__card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--color-gray-300);
    }

    .staff-dashboard__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .staff-section__title {
        break-after: avoid;
    }

    /* Staff sidebar nav — navigational chrome (DECISIONS #57); components.css
       has no media attribute, so its screen grid must be collapsed too */
    .staff-nav--desktop,
    .staff-nav-disclosure {
        display: none !important;
    }

    .staff-layout {
        display: block;
    }

    /* Sort indicators have no meaning in print context */
    .sort-indicator {
        display: none;
    }

    /* Events section background image */
    .events-section {
        background-image: none !important;
    }

    .events-section::before {
        display: none !important;
    }

    /* Ministry filter form — no meaning in print */
    .events-filter {
        display: none !important;
    }

    /* Directory A–Z jump bar — a filter control, no meaning in print */
    .directory-az {
        display: none !important;
    }

    /* Spotlight / Featured Event — flatten for print */
    .spotlight-event {
        background: none !important;
    }

    .spotlight-card {
        box-shadow: none;
        border: 1px solid var(--color-gray-300);
        break-inside: avoid;
    }

    .spotlight-card__image {
        display: none !important;
    }

    /* Badges — strip color fills for print legibility */
    .badge,
    .reg-count-badge,
    .reg-scope-badge {
        border: 1px solid var(--color-gray-400) !important;
        background: none !important;
        color: var(--color-gray-900) !important;
    }

    /* Alert banners */
    .alert--danger,
    .alert--success,
    .alert--info,
    .alert--warning {
        border: 1px solid var(--color-gray-400) !important;
        background: none !important;
        color: var(--color-gray-900) !important;
    }

    /* Transient HTMX failure toast — never print */
    .htmx-error-toast {
        display: none !important;
    }

    /* Staff-only schema widgets — noisy in print context */
    .schema-hint,
    .form-preview-section {
        display: none !important;
    }

    /* Confirmation modal — never print */
    .confirm-modal {
        display: none !important;
    }

    /* Admin panel */
    .admin-pagination {
        display: none !important;
    }

    .admin-dashboard__stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-user__card {
        background: none !important;
        border: 1px solid var(--color-gray-300) !important;
        break-inside: avoid;
    }

    .admin-role__card {
        background: none !important;
        border: 1px solid var(--color-gray-300) !important;
        break-inside: avoid;
    }

    .admin-role__card--danger {
        background: none !important;
        border: 1px solid var(--color-gray-300) !important;
    }

    /* A printed role audit must show every permission, not a clipped scroll box. */
    .admin-role__perm-list {
        max-height: none !important;
        overflow-y: visible !important;
    }

    /* Staff-only interactive widgets — no meaning in print context */
    .household-members__panel,
    .staff-manual-add,
    .picker__results-container,
    .picker__results {
        display: none !important;
    }

    /* About editorial images — flatten tint/shadow, un-float the embed */
    .about__image {
        filter: none !important;
        box-shadow: none !important;
        border: 1px solid var(--color-gray-300);
    }

    .about__figure {
        break-inside: avoid;
    }

    .about__figure--embed {
        float: none;
        width: 60%;
        margin-inline: auto;
    }

    /* Visual-refresh decoration — suppress for print (DECISIONS #46) */

    /* Hero photo panel / page-header background photo */
    .hero__panel--media,
    .page-header__bg {
        display: none !important;
    }

    /* Hero content-panel gold frame + page-header mahogany overlay pseudo-elements */
    .hero__panel--content::before,
    .page-header::after {
        display: none !important;
    }

    /* Decorative arch glyphs / motif dividers carry no print meaning */
    .section-motif,
    .page-header__arch {
        display: none !important;
    }

    /* About/Visit reading pager is navigational chrome (DECISIONS #49) */
    .about-pager {
        display: none !important;
    }

    /* Annual giving statement — strip the on-screen frame + action chrome so the
       receipt prints clean (DECISIONS #54). */
    .statement-page {
        padding: 0 !important;
    }

    .statement__actions {
        display: none !important;
    }

    .statement {
        max-width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    /* The line-item and subtotals tables are wrapped in .staff-table-wrap, which
       carries a gray border — suppress it inside the statement so the receipt has no
       stray frames. */
    .statement .staff-table-wrap {
        border: none !important;
        border-radius: 0 !important;
    }

    /* Keep the letterhead, totals, and disclaimer from being split across pages on a
       long multi-gift statement. */
    .statement__org {
        break-after: avoid;
    }

    .statement__subtotals {
        break-inside: avoid;
    }

    .statement__disclaimer {
        break-inside: avoid;
        break-before: avoid;
    }

    /* Flatten gradient fills so ink-heavy chips/tiles print clean */
    .event-card__date,
    .spotlight-card__date,
    .directory-card__photo,
    .directory-detail__photo-placeholder,
    .acrostic-letter,
    .staff-card__photo,
    .staff-detail__photo,
    .error-icon {
        background: none !important;
    }

    /* Restore legibility for text that sat on a removed gradient */
    .event-card__date,
    .spotlight-card__date,
    .acrostic-letter,
    .directory-card__placeholder span {
        color: var(--color-gray-900) !important;
    }
}
