﻿html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Signature preview styling */
.signature-preview-box {
    font-family: 'Brush Script MT', 'Lucida Handwriting', cursive;
}

/* Pending document cards */
.pending-docs-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Document status colors */
.document-overdue {
    border-left: 4px solid #dc3545;
}

.document-pending {
    border-left: 4px solid #ffc107;
}

.document-signed {
    border-left: 4px solid #28a745;
}

th.sortable:hover {
    background-color: #e9ecef;
}

th.sortable::after {
    content: ' ⇅';
    opacity: 0.3;
    font-size: 0.8em;
}

th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
}

th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
}

.compliance-icons {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    white-space: nowrap;
}

/* Individual compliance icon - base styles */
.compliance-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 3px;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

    .compliance-icon:hover {
        transform: scale(1.15);
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        text-decoration: none;
    }

/* State: Missing - Gray */
.compliance-missing {
    background-color: #e9ecef;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

    .compliance-missing:hover {
        color: #6c757d;
        background-color: #dee2e6;
    }

/* State: Complete - Green */
.compliance-complete {
    background-color: #198754;
    color: #ffffff;
    border: 1px solid #157347;
}

    .compliance-complete:hover {
        color: #ffffff;
        background-color: #157347;
    }

/* State: Expiring Soon - Amber/Yellow */
.compliance-expiring {
    background-color: #ffc107;
    color: #000000;
    border: 1px solid #e0a800;
    animation: pulse-warning 2s infinite;
}

    .compliance-expiring:hover {
        color: #000000;
        background-color: #e0a800;
    }

/* State: Expired - Red */
.compliance-expired {
    background-color: #dc3545;
    color: #ffffff;
    border: 1px solid #bb2d3b;
    animation: pulse-danger 1.5s infinite;
}

    .compliance-expired:hover {
        color: #ffffff;
        background-color: #bb2d3b;
    }

/* Summary badge */
.compliance-summary {
    font-size: 10px;
    padding: 2px 5px;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
}

/* Light pink — Cultural Competency missing but within 90-day new-hire window */
.compliance-new-hire-pending {
    background-color: #f8d7da; /* Bootstrap's danger-subtle tint */
    color: #842029; /* Bootstrap's danger-emphasis text */
    border: 1px solid #f1aeb5;
}

    .compliance-new-hire-pending:hover {
        background-color: #f1aeb5;
        color: #58151c;
    }

/* Subtle pulse animations for attention */
@keyframes pulse-warning {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }

    50% {
        box-shadow: 0 0 0 3px rgba(255, 193, 7, 0);
    }
}

@keyframes pulse-danger {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.5);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(220, 53, 69, 0);
    }
}

/* Table column width hint */
.compliance-column {
    min-width: 140px;
    max-width: 200px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 992px) {
    .compliance-icon {
        width: 16px;
        height: 16px;
        font-size: 9px;
    }

    .compliance-summary {
        font-size: 9px;
        padding: 1px 4px;
    }
}

/* Print styles - remove animations and simplify colors */
@media print {
    .compliance-icon,
    .compliance-expiring,
    .compliance-expired {
        animation: none !important;
    }

    .compliance-missing {
        background-color: #ffffff !important;
        border: 1px solid #000000 !important;
        color: #666666 !important;
    }

    .compliance-complete {
        background-color: #ffffff !important;
        border: 1px solid #000000 !important;
        color: #000000 !important;
    }

        .compliance-complete::after {
            content: "✓";
        }
}

/* ── Phones (Oct 2026 mobile pass) ─────────────────────────────────────────
   iOS Safari zooms the page when a field under 16px gets focus. The 14px root
   size above made every field 14px on phones, so keep form fields at 16px.   */
@media (max-width: 767.98px) {
    .form-control,
    .form-select {
        font-size: 16px;
    }
}

/* Tab rows that would wrap into a ragged block on phones scroll sideways
   instead. Add class "nav-scroll-xs" to a .nav-tabs list to opt in.         */
@media (max-width: 575.98px) {
    .nav-tabs.nav-scroll-xs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

        .nav-tabs.nav-scroll-xs::-webkit-scrollbar {
            display: none;
        }

        .nav-tabs.nav-scroll-xs .nav-link {
            white-space: nowrap;
        }
}
