/* ==========================================================================
   IDT POS — post-theme fixes
   Loaded after every other idtpos-*.css so these win. Small, targeted
   corrections to the theme overlays; keep this file the last word.
   ========================================================================== */

/* --------------------------------------------------------------------------
   FIX 1 — Dashboard: extra gap above the welcome banner.
   The theme gives .content-header-custom a 14px top margin, which shows as a
   band between the top navbar and the banner. Tighten it to a hair.
   -------------------------------------------------------------------------- */
/* The banner carries both .content-header and .content-header-custom; matching both,
   plus .content-wrapper, ties the theme's skin-prefixed selector on specificity and
   wins by loading later. */
.content-wrapper .content-header.content-header-custom {
    margin-top: 12px !important;
}

/* --------------------------------------------------------------------------
   FIX 2 — DataTables pagination: empty boxes after Previous / 1 / Next.
   Two theme files box the pagination at two levels — idtpos-charts-modern
   boxes the <li>.paginate_button and idtpos-theme-v32 boxes the <a> inside.
   The doubled boxing leaves the <li> showing as empty rounded boxes beside
   the real buttons. Strip the box off the <li> so only the <a> is a button.
   -------------------------------------------------------------------------- */
.dataTables_paginate .paginate_button {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}
.dataTables_paginate .paginate_button.active,
.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.disabled {
    border: 0 !important;
    background: transparent !important;
}
/* Keep the visible buttons (the <a>) tidy and evenly spaced */
.dataTables_paginate .pagination > li > a,
.dataTables_paginate .pagination > li > span {
    display: inline-block !important;
    min-width: 34px !important;
    text-align: center !important;
}

/* --------------------------------------------------------------------------
   FIX 3 — Printed invoice comes out sparse ("faka faka").
   The theme gives table cells 14–18px padding for the airy dashboard look;
   in print that spreads the receipt down the page. Inside the print section
   only, and only when printing, put the cells back to a compact receipt
   spacing on a clean white page. The on-screen tables are untouched.
   -------------------------------------------------------------------------- */
@media print {
    body,
    .content-wrapper,
    .print_section,
    #receipt_section {
        background: #ffffff !important;
    }
    .print_section table td,
    .print_section table th,
    #receipt_section table td,
    #receipt_section table th,
    .print_section .table > tbody > tr > td,
    .print_section .table > thead > tr > th,
    #receipt_section .table > tbody > tr > td,
    #receipt_section .table > thead > tr > th {
        padding: 3px 6px !important;
        font-size: 12px !important;
        background: transparent !important;
        vertical-align: top !important;
    }
}

/* --------------------------------------------------------------------------
   Subscription / support bar — sticky above the header.
   Thin support line normally; a prominent countdown when expiry is near.
   -------------------------------------------------------------------------- */
.idt-sub-bar {
    position: sticky;
    top: 0;
    z-index: 1040;
    width: 100%;
    box-sizing: border-box;
    font-size: 12px;
    line-height: 1.2;
    padding: 5px 14px;
    text-align: center;
    background: #0f172a;
    color: #e2e8f0;
    white-space: nowrap;
    overflow-x: auto;
}
.idt-sub-bar a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 600;
    margin-left: 6px;
}
.idt-sub-bar a:hover { text-decoration: underline; }
.idt-sub-bar .fab.fa-whatsapp { color: #25d366; margin-right: 4px; }

/* Expiring: louder, amber/red gradient with a subtle pulse */
.idt-sub-bar.idt-sub-expiring {
    background: linear-gradient(90deg, #b91c1c 0%, #d97706 100%);
    color: #fff;
    font-size: 13px;
    padding: 8px 14px;
    font-weight: 500;
}
.idt-sub-bar.idt-sub-expiring a { color: #fff; text-decoration: underline; }
.idt-sub-bar .idt-sub-sep { margin: 0 8px; opacity: .6; }
.idt-sub-bar .idt-sub-timer { font-weight: 800; }
.idt-sub-bar .idt-sub-count .fa-clock { margin-right: 5px; }

@media (max-width: 767px) {
    .idt-sub-bar { font-size: 11px; padding: 5px 10px; }
    .idt-sub-bar.idt-sub-expiring { font-size: 11.5px; }
    /* Stack the two halves on very small screens */
    .idt-sub-bar .idt-sub-sep { display: none; }
    .idt-sub-bar.idt-sub-expiring .idt-sub-pay { display: block; margin-top: 2px; }
}
