﻿/* =======================================================================
   1. GLOBAL SYSTEM BRANDING & UTILITY MATRIX ADAPTERS
   ======================================================================= */
.rounded-lg {
    border-radius: 0.75rem !important;
}

.bg-soft-primary {
    background-color: #f4f6fc !important;
}

.text-light-muted {
    color: #dee2e6 !important;
}

.select-none {
    user-select: none;
}

/* =======================================================================
   2. RESPONSIVE DROPDOWN INPUT CONTAINMENT ARCHITECTURE
   Accounts for native browser components and NiceSelect abstractions.
   ======================================================================= */
.uniform-input {
    height: 50px !important;
    font-size: 0.95rem !important;
    border-radius: 0.5rem !important;
    max-width: 100% !important;
    display: block !important;
    width: 100% !important;
}

/* UNIVERSAL NICESELECT CLICK/OPEN FIX:
   Ensures the custom dropdown tray drops *on top* of all cards and siblings. */
.nice-select.uniform-input {
    float: none !important;
    background-color: #f8f9fa !important;
    border: none !important;
    position: relative !important;
    /* Forces the open dropdown to break out of parent overflow container masks */
    z-index: 1050 !important;
}

    .nice-select.uniform-input.open {
        z-index: 1060 !important; /* Steps above its own closed neighbor components */
        background-color: #fff !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    /* FORCE POPUP TRAY VISIBILITY OVERLAY WITH INTERNAL SCROLLING BAR */
    .nice-select.uniform-input .list {
        width: 100% !important;
        margin-top: 2px !important;
        border-radius: 0.5rem !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
        border: 1px solid #dee2e6 !important;
        background-color: #fff !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        display: none;
        opacity: 0;
        pointer-events: none;
        transform-origin: top center;
        transform: scale(1, 0.9);
        transition: all 0.15s ease-in-out;
        /* CRITICAL SCROLLBAR REINFORCEMENT
       Caps the height of long lists and enables internal scrolling. */
        max-height: 250px !important; /* Limits the box size to roughly 5-6 options visible at once */
        overflow-y: auto !important; /* Adds an elegant vertical scroll track if content overflows */
        overflow-x: hidden !important; /* Disables unnecessary sideways micro-wobbles */
    }

    /* Handle open state visibility transformations safely */
    .nice-select.uniform-input.open .list {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: scale(1, 1) !important;
        z-index: 99999 !important;
    }

/* DESKTOP VIEWPORT: Truncate long option text cleanly */
@media (min-width: 992px) {
    .nice-select.uniform-input {
        white-space: nowrap !important;
        padding-right: 30px !important;
    }

        .nice-select.uniform-input .current {
            display: block !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            white-space: nowrap !important;
            max-width: 90% !important;
        }
}

/* MOBILE VIEWPORT SAFEGUARDS: Restore full access and touch interaction */
@media (max-width: 991px) {
    .nice-select.uniform-input {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        word-wrap: normal !important;
        pointer-events: auto !important;
        touch-action: auto !important;
    }

        .nice-select.uniform-input .current {
            white-space: normal !important;
            overflow: visible !important;
        }

        .nice-select.uniform-input .list {
            max-width: 100% !important;
            white-space: normal !important;
        }
}

/* NICESELECT DOUBLE-UP SAFEGUARD
   Hides the native browser selector cleanly when jQuery has initialized NiceSelect. */
select.uniform-input {
    display: none !important;
}

/* OPTIONAL MOBILE OVERRIDE: If your script intentionally destroys NiceSelect on mobile 
   to fall back to mobile native picking dials, this protects layout parameters cleanly. */
@media (max-width: 991px) {
    select.uniform-input.mobile-fallback {
        display: block !important;
        -webkit-appearance: select !important;
        appearance: select !important;
    }

        select.uniform-input.mobile-fallback + .nice-select {
            display: none !important;
        }
}

/* Dropdown inner option formatting metrics */
.nice-select .option,
select.uniform-input option {
    font-size: 0.95rem !important;
    white-space: normal !important;
    padding: 10px 12px !important;
    line-height: 1.4 !important;
    text-align: left !important;
}

.nice-select.uniform-input {
    line-height: 48px !important; /* Vertically perfectly centers your text baseline labels inside the box */
}

.calculator-area select {
    word-wrap: normal !important;
}

/* =======================================================================
   3. FORM CHECK SWITCH CONTAINMENT OVERRIDES (SCOPED FIX)
   Locks down checkbox dimensions safely without leaking into the payslip.
   ======================================================================= */
.custom-switch-layout {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    min-height: auto !important;
    padding: 10px 0 !important;
}

/* Apply constraints directly and exclusively to the checkbox input node */
input[type="checkbox"].style-switch-input {
    width: 40px !important;
    height: 20px !important;
    max-width: 40px !important;
    max-height: 20px !important;
    min-width: 40px !important;
    min-height: 20px !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    appearance: checkbox !important;
    box-sizing: border-box !important;
}

/* Explicitly target only plugin elements inside this layout container */
.custom-switch-layout div.nice-select,
.custom-switch-layout div.checker,
.custom-switch-layout span.custom-checkbox {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.custom-switch-layout label {
    display: inline-block !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 20px !important;
    vertical-align: middle !important;
}

/* =======================================================================
   4. ANIMATIONS & LUMINANCE HOOKS
   ======================================================================= */
.animated {
    animation-duration: 0.4s;
    animation-fill-mode: both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fadeIn {
    animation-name: fadeIn;
}

/* =======================================================================
   5. COURIER STATUTORY PAY ADVICE / EARNINGS STATEMENT SPECIFICATION
   ======================================================================= */
.payslip-matrix-document {
    border: 2px solid #212529 !important;
    font-family: 'Courier New', Courier, monospace !important;
    color: #000 !important;
    background-color: #fff !important;
    width: 100% !important;
    max-width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
}

.meta-header-box {
    border-bottom: 2px solid #212529;
    padding: 10px;
    text-align: center;
}

.company-title {
    font-size: 1.15rem;
    font-weight: bold;
    text-transform: uppercase;
}

.doc-subtitle {
    font-size: 0.9rem;
    font-weight: bold;
    color: #6c757d;
    letter-spacing: 2px;
    margin-top: 2px;
}

.info-meta-row {
    display: flex;
    border-bottom: 2px solid #212529;
    text-align: center;
    background-color: #fff;
}

.meta-col {
    flex: 1;
    border-right: 1px solid #212529;
    padding: 6px 4px;
    font-size: 0.75rem;
}

    .meta-col:last-child {
        border-right: none;
    }

.split-section-header {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #212529;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    font-size: 0.8rem;
    display: flex;
    letter-spacing: 1px;
}

.header-col {
    flex: 1;
    padding: 4px 0;
}

    .header-col:first-child {
        border-right: 2px solid #212529;
    }

.split-subheader-labels {
    display: flex;
    border-bottom: 1px dashed #212529;
    background-color: #f8f9fa;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #495057;
}

.payments-labels {
    flex: 1;
    display: flex;
    border-right: 2px solid #212529;
    padding: 4px 0;
}

.deductions-labels {
    flex: 1;
    display: flex;
    padding: 4px 0;
}

.lbl-desc {
    width: 50%;
    padding-left: 8px;
}

.lbl-hours {
    width: 16.6%;
    text-align: center;
}

.lbl-rate {
    width: 16.6%;
    text-align: right;
}

.lbl-amount {
    width: 16.8%;
    text-align: right;
    padding-right: 8px;
}

.lbl-desc-ded {
    width: 66.6%;
    padding-left: 8px;
}

.lbl-amount-ded {
    width: 33.4%;
    text-align: right;
    padding-right: 8px;
}

.financials-split-body {
    display: flex;
    min-height: 220px;
    background-color: #fff;
}

.payments-side {
    flex: 1;
    border-right: 2px solid #212529;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.deductions-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sub-table {
    width: 100%;
    border-collapse: collapse !important;
    border: none !important;
    margin: 0 !important;
}

.item-row td {
    padding: 4px 6px !important;
    font-size: 0.75rem !important;
    border: none !important;
}

.cell-desc {
    text-align: left;
    padding-left: 8px !important;
}

.cell-hours {
    text-align: center;
    color: #6c757d;
}

.cell-rate {
    text-align: right;
    color: #6c757d;
}

.cell-amount {
    text-align: right;
    padding-right: 8px !important;
}

.side-total-bar {
    display: flex;
    justify-content: space-between;
    background-color: #f8f9fa;
    font-weight: bold;
    font-size: 0.75rem;
    border-top: 1px solid #212529;
    padding: 6px 8px;
    text-transform: uppercase;
}

/* JAMAICAN EMPLOYER LIABILITY MATRICES INTERFACES */
.liabilities-header {
    background-color: #f4f6fc !important;
    border-bottom: 1px solid #212529;
    border-top: 2px solid #212529;
    text-align: center;
    font-weight: bold;
    font-size: 0.75rem;
    color: #0d6efd;
    padding: 4px 0;
    text-transform: uppercase;
}

.total-row-bg {
    background-color: #f8f9fa !important;
    border-top: 1px solid #212529 !important;
    font-weight: bold;
}

.net-pay-strip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #212529 !important;
    color: #fff !important;
    font-weight: bold;
    padding: 12px 15px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.only-print {
    display: none !important;
}

/* =======================================================================
   6. HARD PRINT-MEDIA INTERCEPT MASK RULES
   ======================================================================= */
@media print {
    @page {
        size: letter portrait;
        margin: 0 !important;
    }

    html, body {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .no-print,
    header,
    footer,
    .navbar,
    .site-header,
    .site-footer,
    #payslipActionsHub,
    .page-title-content,
    #conversionLeadMagnetBanner {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    .only-print {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 40px !important;
        box-sizing: border-box;
    }

    #isolatedPrintRenderPayload {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
    }

    .payslip-matrix-document {
        border: 2px solid #000 !important;
        box-shadow: none !important;
        width: 100% !important;
        max-width: 100% !important;
        page-break-inside: avoid !important;
    }
}
/* =======================================================================
   7. HIGH-CONVERSION STARTUP & SMB ELEVATOR PITCH ISOLATION OVERRIDES
   Protects text channels from parent theme styles and white patches.
   ======================================================================= */
/* Enforce clear container backgrounds and clear text inheritance */
.container .card[style*="linear-gradient"] {
    background: linear-gradient(135deg, #3d5af1 0%, #1e293b 100%) !important;
}

    /* Fix the blank pill badge header text visibility */
    .container .card[style*="linear-gradient"] .bg-white.bg-opacity-20 {
        background-color: rgba(255, 255, 255, 0.2) !important;
        color: #ffffff !important;
        display: inline-flex !important;
        font-weight: 700 !important;
    }

    /* Force standard text layer visibility over general titles */
    .container .card[style*="linear-gradient"] h4,
    .container .card[style*="linear-gradient"] h4.fw-bold {
        color: #ffffff !important;
        font-weight: 700 !important;
        margin-bottom: 0.25rem !important;
    }

    /* Force structural descriptions to stay clean and drop parent transparency bugs */
    .container .card[style*="linear-gradient"] p,
    .container .card[style*="linear-gradient"] .text-white-opacity-85 {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    /* FIX THE WHITE PATCHES BLOCKS ON THE RIGHT HAND PANEL */
    /* FIX THE WHITE PATCHES BLOCKS ON THE RIGHT HAND PANEL */
    .container .card[style*="linear-gradient"] div[style*="min-width: 220px"] {
        background-color: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-radius: 0.375rem !important;
        padding: 1rem !important;
        box-shadow: none !important;
        /* =======================================================================
       CRITICAL RECONCILIATION: SPACER INTERCEPT
       Introduces a vertical layout track gap between the info box and button
       ======================================================================= */
        margin-bottom: 15px !important;
    }

        /* Force the checkmark items and description features labels to render bright white */
        .container .card[style*="linear-gradient"] div[style*="min-width: 220px"] div {
            color: #ffffff !important;
            font-weight: 600 !important;
            font-size: 0.85rem !important;
            display: flex !important;
            align-items: center !important;
        }

        /* Secure the visibility of checkmark icons inside the features listing box */
        .container .card[style*="linear-gradient"] div[style*="min-width: 220px"] i.bx-check {
            color: #10b981 !important; /* Forces Tax-Compliant Green color over icons */
            font-weight: 900 !important;
            font-size: 1.1rem !important;
            margin-right: 0.25rem !important;
        }

    /* Confirm alignment pass for the signup button element widget */
    .container .card[style*="linear-gradient"] .btn-warning {
        background-color: #f59e0b !important;
        border-color: #f59e0b !important;
        color: #1e293b !important;
        font-weight: 700 !important;
    }

        .container .card[style*="linear-gradient"] .btn-warning:hover {
            background-color: #d97706 !important;
            border-color: #d97706 !important;
        }