/* High-Visibility Compliance Checkbox [cite: 2026-03-01] */
.compliance-checkbox .form-check-input {
    width: 25px !important;
    height: 25px !important;
    margin-top: 0.5rem;
    cursor: pointer;
    border: 2px solid #dc3545 !important; /* Red border to match alert theme */
}

/* Highlight the ticket row when checked [cite: 2026-03-01] */
.compliance-ticket-row:has(.form-check-input:checked) {
    background-color: #fff3f3 !important;
    border-left: 10px solid #dc3545 !important;
}

/* Prevent Layout Shifting in Husbandry Feed [cite: 2026-03-01] */
.activity-feed-container {
    min-height: 400px; /* Keeps the space reserved so it doesn't collapse */
    max-height: 600px;
    overflow-y: auto;
    display: block;
    contain: size layout; /* Tells the browser not to jump [cite: 2026-03-01] */
}

/* Surgical Compliance Alert */
.vimas-alert-banner {
    background-color: #ffc107 !important; /* Warning Gold */
    color: #000000 !important;           /* Deep Black for high contrast */
    font-weight: bold;
    border: 3px solid #dc3545;           /* Red border */
    padding: 15px;
    border-radius: 8px;
}

/* =========================================
   UNIVERSAL SURGICAL PRINT ISOLATION (GLP AUDIT)
   ========================================= */
@media print {
    /* 1. Hide everything else on the entire website */
    body.print-glp-audit * {
        visibility: hidden !important;
    }

    /* 2. Wake up ONLY the GLP wrapper and its children */
    body.print-glp-audit #glp-master-wrapper,
    body.print-glp-audit #glp-master-wrapper * {
        visibility: visible !important;
    }

    /* 3. Force it to display (Overriding Bootstrap's d-print-none) and move it to top left */
    body.print-glp-audit #glp-master-wrapper {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
        border: none !important;
        display: block !important; /* <--- This beats Bootstrap! */
    }

    /* 4. Hide the print button itself */
    body.print-glp-audit .print-hide {
        display: none !important;
    }

    /* 5. Ensure clean, sharp black borders for the printed table */
    body.print-glp-audit #glp-master-wrapper table {
        border-collapse: collapse !important;
        width: 100% !important;
    }
    
    body.print-glp-audit #glp-master-wrapper th, 
    body.print-glp-audit #glp-master-wrapper td {
        border: 1px solid black !important;
        color: black !important;
    }
}

/* =========================================
   CAGE CARD PRINT ISOLATION (INNOVIVE/ALLENTOWN 3x5)
   ========================================= */
@media print {
    /* Force exactly 3x5 inch cards for Innovive / Allentown holders */
    .cage-card {
        width: 5in !important;
        height: 3in !important;
        border: 1px solid black !important;
        margin: 0 !important;
        padding: 0.2in !important;
        page-break-after: always !important; /* Puts 1 card per label if printing on continuous rolls */
        overflow: hidden !important;
    }
}

/* =========================================
   3. 🖨️ DYMO TUBE LABEL ISOLATION (1.25in x 0.5in)
   ========================================= */
@media print {
    /* Assigns the tiny Dymo paper size ONLY when this class is active */
    body.print-tubes {
        page: dymo-page !important;
    }

    body.print-tubes * { visibility: hidden !important; }
    
    body.print-tubes .print-tubes, 
    body.print-tubes .print-tubes * { visibility: visible !important; }
    
    body.print-tubes .print-tubes {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* 💎 MOBILE UX FIX: Disables hover-delay and double-taps on phones */
button, .btn, input, select {
    touch-action: manipulation;
}

/* 💎 MOBILE UX FIX: Disables hover-delay and double-taps on phones */
button, .btn, input, select {
    touch-action: manipulation;
}

/* VIMAS GLOBAL: Prevent Dash Dropdown Text Wrapping & Overlap */
.Select-option,
.Select-value-label {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* =========================================
   MOBILE & TABLET SCROLLING OPTIMIZATION
   ========================================= */
@media screen and (max-width: 1024px) {
    .activity-feed-container {
        max-height: 55vh; /* Expands the box to take up 55% of the screen height */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Ensures smooth scrolling on iOS/iPads */
    }
}

@media screen and (max-width: 480px) {
    .activity-feed-container {
        max-height: 65vh; 
    }
}