﻿/* =========================
   Container
========================= */
.sale-invoice-master-table-container {
    position: fixed;
    top: 8rem;
    bottom: 3.4rem;
    left: 11.1rem;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* =========================
   Table Base
========================= */
.sale-invoice-master-content-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    color: #1f2937;
}

/* =========================
   Header
========================= */
.sale-invoice-master-content-table thead {
    background: #e5efff;
}

.sale-invoice-master-content-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 6px 14px;
    text-align: left;
    font-weight: bold;
    color: #374151;
    border: 1px solid #e5e7eb;
    white-space: nowrap;
    text-align: center;
}

/* First checkbox column */
.sale-invoice-master-content-table th:first-child,
.sale-invoice-master-content-table td:first-child {
    width: 40px;
    text-align: center;
}

.sale-invoice-master-content-table th:nth-child(2),
.sale-invoice-master-content-table td:nth-child(2) {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    text-align: center;
}

.sale-invoice-master-content-table th:nth-child(3),
.sale-invoice-master-content-table td:nth-child(3) {
    width: 130px;
    min-width: 130px;
    max-width: 130px;
    text-align: center;
}

.sale-invoice-master-content-table th:nth-child(4),
.sale-invoice-master-content-table td:nth-child(4) {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    text-align: center;
}

.sale-invoice-master-content-table td:nth-child(5) {
    text-align: left;
}

.sale-invoice-master-content-table th:nth-child(6),
.sale-invoice-master-content-table td:nth-child(6) {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    text-align: right;
}

.sale-invoice-master-content-table th:nth-child(7),
.sale-invoice-master-content-table td:nth-child(7) {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    text-align: center;
}

/* =========================
   Body Rows
========================= */
.sale-invoice-master-content-table tbody tr {
    background: #ffffff;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    text-align: center;
}

.sale-invoice-master-content-table tbody tr:hover {
    background: #f3f4f6;
}

.sale-invoice-master-content-table tbody td {
    padding: 6px 14px;
    vertical-align: middle;
    white-space: nowrap;
    border: 1px solid #e5e7eb;
}

/* =========================
   Checkbox
========================= */
.sale-invoice-master-content-table thead tr input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    background-color: #3399ff;
}

.sale-invoice-master-content-table tbody tr input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    background-color: #3399ff;
}

/* =========================
   Filter Icon
========================= */
.filter-icon {
    width: 18px;
    height: 18px;
    margin-left: 6px;
    fill: #3399ff;
    cursor: pointer;
    vertical-align: middle;
    transition: fill 0.2s ease;
}

.filter-icon:hover {
    fill: #3399ff;
}

/* =========================
   Action Column
========================= */
.sale-invoice-master-content-table td:last-child {
    text-align: center;
    min-width: 90px;
}

/* Action icons */
.edit-icon,
.delete-icon {
    width: 18px;
    height: 18px;
    margin: 0 6px;
    cursor: pointer;
    transition: transform 0.15s ease, fill 0.15s ease;
}

/* Edit */
.edit-icon {
    fill: #2563eb;
}
.edit-icon:hover {
    fill: #1d4ed8;
    transform: scale(1.1);
}

/* Delete */
.delete-icon {
    fill: #dc2626;
}
.delete-icon:hover {
    fill: #b91c1c;
    transform: scale(1.1);
}

/* =========================
   Selected Row (optional)
========================= */
.sale-invoice-master-content-table tbody tr.active td {
    background-color: #cce5ff !important;
    font-weight: 500;
}

/* =========================
   Responsive (optional)
========================= */
@media (max-width: 1024px) {
    .sale-invoice-master-content-table {
        font-size: 13px;
    }

    .sale-invoice-master-content-table thead th,
    .sale-invoice-master-content-table tbody td {
        padding: 6px 10px;
    }
}

.tooltip-panel {
    position: absolute;
    left : 0;
    right: 0;
    top : 0;
    z-index: 999;
}

.tooltip-panel label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    padding-bottom: 5px;
}

.cashdebit-tooltip-panel :not(:last-child) {
    border-bottom: 1px solid #ccc;
}

.invoicename-tooltip-panel :not(:first-child):not(:last-child),
.invoiceamount-tooltip-panel :not(:first-child):not(:last-child) {
    border-bottom: 1px solid #ccc;
}

.tooltip-panel input[type="checkbox"] {
    min-width: 15px;
    min-height: 15px;
    cursor: pointer;
    margin-left: 10px;
    background-color: #3399ff;
}

/* Chrome, Safari, Edge, Opera */
.tooltip-panel input[type=number]::-webkit-inner-spin-button,
.tooltip-panel input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
.tooltip-panel input[type=number] {
    -moz-appearance: textfield;
}

.cashdebit-tooltip-panel,
.invoicename-tooltip-panel,
.invoiceamount-tooltip-panel,
.invoicedate-tooltip-panel {
    overflow-x: hidden;
    overflow-y: auto;
    display: grid;
    grid-auto-rows: min-content; /* prevent extra stretching */
    gap: 6px 12px;
    position: absolute;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    padding: 10px;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.15);
    height: 200px;
    width: 250px;
    z-index: 5;
    font-weight: 400;
    font-size: 15px;
    scrollbar-width: auto; /* auto | thin | none */
    scrollbar-color: #99c2ff #f1f1f1; /* thumb color | track color */
}