/* =======================================================================
   CareHome Manager — Custom Styles
   Supplements Tailwind CDN (loaded via <script> in base.html).
   ======================================================================= */

/* -----------------------------------------------------------------------
   Mobile touch targets — ensure tap-friendly sizes on small screens
   ----------------------------------------------------------------------- */
@media (max-width: 768px) {
    a, button, select, input[type="checkbox"], input[type="radio"] {
        min-height: 44px;
    }

    /* Table cells: a bit more breathing room on mobile */
    td, th {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    /* Quick-phrase buttons: larger touch targets on mobile */
    .qp-btn {
        min-height: 36px;
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }
}

/* -----------------------------------------------------------------------
   Print styles — clean printable output
   ----------------------------------------------------------------------- */
@media print {
    /* Hide navigation, sidebar, header, and interactive elements */
    #sidebar,
    #sidebar-overlay,
    header,
    [data-no-print],
    .no-print,
    #toast-container {
        display: none !important;
    }

    /* Make main content full-width */
    body {
        background: white !important;
    }
    .flex.h-screen {
        display: block !important;
    }
    main {
        padding: 0 !important;
        overflow: visible !important;
    }

    /* Avoid page-breaks inside cards */
    .bg-white.rounded-xl {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }

    /* Show link URLs */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.75em;
        color: #6b7280;
    }
    a[href^="#"]::after,
    a[href^="javascript"]::after,
    nav a::after {
        content: none;
    }

    /* Ensure text is black for legibility */
    body, p, td, th, span, div {
        color: #111827 !important;
    }

    /* Force background colors on badges / status pills */
    .bg-green-100, .bg-red-100, .bg-yellow-100, .bg-blue-100 {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
