﻿
/*======================================== Table ================================================*/
/* Container pinned between top and bottom */
.master-table-container {
    position: fixed; /* pin to viewport */
    top: 8rem; /* distance from top (adjust as needed) */
    bottom: 4rem; /* distance from bottom (adjust as needed) */
    left: 11.1rem;
    right: 0;
    background: #f9fcff;
    display: block;
    overflow-y: auto;
    overflow-x: auto;
    margin: 0 auto;
    scrollbar-width: auto; /* auto | thin | none */
    scrollbar-color: #99c2ff #f1f1f1; /* thumb color | track color */
}

/* Table with fixed column sizes */
.master-content-table1 {
    border-collapse: collapse;
    width: 100%; /* table fills container */
    table-layout: fixed; /* ensures fixed column widths */
}

/* Table cells */
.master-content-table1 th,
.master-content-table1 td {
    text-align: left;
    padding: 10px;
    border-right: none;
    border-left: none;
    box-shadow:
    inset 0 -0.5px 0 #ccc,
    inset -0.5px 0 0 #ccc,
    inset 0.5px 0 0 #ccc;
    width: 300px;       /* fixed width per column */
    white-space: normal;       /* prevent wrapping */
    word-wrap: break-word;   /* break long words */
    overflow: hidden;   /* content doesn’t overflow */
}

/* Example fixed widths */
.master-content-table1 th:nth-child(1),
.master-content-table1 td:nth-child(1) {
    width: 50px;
    text-align: center;
}

.master-content-table1 th:nth-child(2),
.master-content-table1 td:nth-child(2) {
    width: 100px;
    text-align: center;
}

.master-content-table1 td:nth-child(17),
.master-content-table1 td:nth-child(18) {
    text-align: right;
}

/* Sticky header */
.master-content-table1 thead th {
    position: sticky;
    top: 0;
    background-color: #e6f2ff;
    box-shadow: 
    inset 0 -1px 0 #ccc, /* bottom line */
    inset 0 1px 0 #ccc, /* top line */
    inset -0.5px 0 0 #ccc, /* top line */
    inset 0.5px 0 0 #ccc; /* top line */
    z-index: 1; /* higher than sticky columns */
    text-align: center;
    font-weight: 500;
}

/* Sticky first three column */
.master-content-table1 th:nth-child(1),
.master-content-table1 td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 2;
}

.master-content-table1 th:nth-child(2),
.master-content-table1 td:nth-child(2) {
    position: sticky;
    left: 50px;
}

.master-content-table1 th:nth-child(3),
.master-content-table1 td:nth-child(3) {
    position: sticky;
    left: 150px;
    background: linear-gradient(to right, #e6f2ff, rgba(230,242,255,0.9)); /* fade on left */
}

.master-content-table1 td:nth-child(1),
.master-content-table1 td:nth-child(2),
.master-content-table1 td:nth-child(3) {
    background: linear-gradient(to right, #f9fcff, rgba(249,252,255,0.85)); /* fade on left */
}

.master-content-table1 th:nth-child(1),
.master-content-table1 th:nth-child(2),
.master-content-table1 th:nth-child(3) {
    z-index: 3;
}

/* Sticky last column */
/* LAST column — always sticky on right */
.master-content-table1 th:last-child,
.master-content-table1 td:last-child {
    width: 150px;
    text-align: center;
    position: sticky;
    right: 0;
    background: linear-gradient(to left, #e6f2ff, rgba(230,242,255,0.9)); /* fade on left */
}

.master-content-table1 td:last-child {
    background: linear-gradient(to left, #f9fcff, rgba(249,252,255,0.85)); /* fade on left */
}

.master-content-table1 th:last-child {
    z-index: 2;
}

/* CASE: exactly 3 columns — make the 2nd column the flexible filler */
.master-content-table1 th:nth-child(3):nth-last-child(2),
.master-content-table1 td:nth-child(3):nth-last-child(2),
.master-content-table1 th:nth-child(3):nth-last-child(3),
.master-content-table1 td:nth-child(3):nth-last-child(3) {
    position: sticky;
    width: auto !important;
}

.master-content-table1 thead tr input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    margin-left: 10px;
    background-color: #3399ff;
}

.master-content-table1 tbody tr input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    margin-left: 10px;
    background-color: #3399ff;
}

/* Normal hover applies to all cells */
.master-content-table1 tbody tr:hover td {
    background-color: #cce5ff !important;
}

/* Active row */
.master-content-table1 tbody tr.active td {
    background-color: #cce5ff !important;
    font-weight: 500;
}

/* Force sticky columns to lose gradient on hover */
.master-content-table1 tbody tr:hover td:nth-child(1),
.master-content-table1 tbody tr:hover td:nth-child(2),
.master-content-table1 tbody tr:hover td:nth-child(3),
.master-content-table1 tbody tr:hover td:last-child {
    background: #cce5ff !important; /* solid color override */
    z-index: 1; /* bring above */
}

/* Force sticky columns to lose gradient on active */
.master-content-table1 tbody tr.active td:nth-child(1),
.master-content-table1 tbody tr.active td:nth-child(2),
.master-content-table1 tbody tr.active td:nth-child(3),
.master-content-table1 tbody tr.active td:last-child {
    background: #cce5ff !important; /* solid color override */
    z-index: 1;
}

.filter-icon {
    fill: #3399ff;
    height: 20px;
    width: 20px;
    cursor: pointer;
}

.filter-icon:hover {
    fill: #3399ff;
}

.edit-icon {
    fill: #808080;
    height: 20px;
    width: 20px;
    cursor: pointer;
    margin-right: 20px;
}

.edit-icon:hover {
    fill: #3399ff;
}

.delete-icon {
    fill: #808080;
    height: 20px;
    width: 20px;
    cursor: pointer;
}

.delete-icon:hover {
    fill: red;
}

/*======================================== Top BTNS Header ================================================*/
.top-btns-container {
    position: fixed; /* pin to viewport */
    top: 4.6rem; /* distance from top (adjust as needed) */
    left: 11.1rem;
    right: 0;
    display: flex;
    flex-direction: row; /* 🔥 row instead of column */
    align-items: center; /* vertical align center */
    gap: 10px; /* space between items */
    padding: 0 10px; /* optional nice spacing */
}

.top-btns-header {
    font-weight: bold;
    font-size: 18px;
}

.search-container {
    position: relative;
    flex: 1; /* allow input to expand */
}

.search-container .search-input {
    width: 100%;
    height: 35px;
    padding: 6px 30px 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    font-size: 14px;
}

.search-container .search-icon {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    fill: #3399ff;
    pointer-events: none;
}

.delete-all-btn,
.filter-btn,
.filter-reset-all-btn,
.data-import-btn,
.data-export-btn,
.edit-btn {
    height: 35px;
    width: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.delete-btn-icon {
    fill: red;
    height: 20px;
    width: 20px;
}

.filter-btn-icon,
.edit-btn-icon {
    fill: #3399ff;
    height: 20px;
    width: 20px;
}

.reset-btn-icon {
    fill: orange;
    height: 20px;
    width: 20px;
}

.data-import-btn-icon {
    fill: mediumvioletred;
    height: 20px;
    width: 20px;
}

.data-export-btn-icon {
    fill: blueviolet;
    height: 20px;
    width: 20px;
}

.tooltip-panel label{
    display: flex;
    align-items: center; /* vertical center */
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    padding-bottom: 5px;
}

.filter-tooltip-panel :not(:last-child){
    border-bottom: 1px solid #ccc;
}

.name-tooltip-panel :not(:first-child):not(:last-child),
.address1-tooltip-panel :not(:first-child):not(:last-child),
.address2-tooltip-panel :not(:first-child):not(:last-child),
.address3-tooltip-panel :not(:first-child):not(:last-child),
.address4-tooltip-panel :not(:first-child):not(:last-child),
.city-tooltip-panel :not(:first-child):not(:last-child),
.pincode-tooltip-panel :not(:first-child):not(:last-child),
.state-tooltip-panel :not(:first-child):not(:last-child),
.gstno-tooltip-panel :not(:first-child):not(:last-child),
.panno-tooltip-panel :not(:first-child):not(:last-child),
.msmeno-tooltip-panel :not(:first-child):not(:last-child),
.mobileno-tooltip-panel :not(:first-child):not(:last-child),
.emailid-tooltip-panel :not(:first-child):not(:last-child),
.referencepartyname-tooltip-panel :not(:first-child):not(:last-child),
.cashopeningbalance-tooltip-panel :not(:first-child):not(:last-child),
.chequeopeningbalance-tooltip-panel :not(:first-child):not(:last-child),
.ownershipinterest-tooltip-panel :not(:first-child):not(:last-child),
.ownershippercentage-tooltip-panel :not(:first-child):not(:last-child),
.interest-tooltip-panel :not(:first-child):not(:last-child),
.depreciation-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;
}

.filter-tooltip-panel,
.name-tooltip-panel,
.address1-tooltip-panel,
.address2-tooltip-panel,
.address3-tooltip-panel,
.address4-tooltip-panel,
.city-tooltip-panel,
.pincode-tooltip-panel,
.state-tooltip-panel,
.gstno-tooltip-panel,
.panno-tooltip-panel,
.msmeno-tooltip-panel,
.mobileno-tooltip-panel,
.emailid-tooltip-panel,
.referencepartyname-tooltip-panel,
.cashopeningbalance-tooltip-panel,
.chequeopeningbalance-tooltip-panel,
.ownershipinterest-tooltip-panel,
.ownershippercentage-tooltip-panel,
.interest-tooltip-panel,
.depreciation-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 */
}

.welcome-footer button {
    font-weight: bold;
    position: fixed;
    bottom: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
}
