/* 📄 Scrollable table container */
.esv-table-container {
    overflow: auto;
    width: 100%;
    margin-top: 20px;
    position: relative;
    max-height: 500px;
}

/* 📄 Table core styles */
.esv-table {
    width: auto;
    border-collapse: collapse;
}

/* 📄 Header and body cells */
.esv-table th,
.esv-table td {
    padding: 0px;
    padding-left: 5px;
    padding-right: 5px;
    border: 1px solid #ddd;
    vertical-align: top;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 500px; /* Default max width unless overridden inline */
}

/* 📄 Inner cell text */
.cell-text {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 📄 Sticky header */
.esv-table.esv-sticky-header {
    width: 100%;
    border-collapse: separate; /* Changed from collapse for better sticky header behavior */
    border-spacing: 0;
}
  
.esv-table.esv-sticky-header thead {
    position: sticky;
    top: 0;
    z-index: 10;
}
  
.esv-table.esv-sticky-header th {
    background-color: #f8f8f8; /* Background color for headers */
    border-bottom: 2px solid #ddd;
    padding: 10px;
    font-weight: bold;
    text-align: left;
    position: sticky;
    top: 0;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1); /* Optional: adds subtle shadow for separation */
}
  
.esv-table.esv-sticky-header {
    margin: 0; /* Remove any margin that could affect positioning */
}

/* 📄 Alternating row colors */
.esv-table tbody tr:nth-child(odd) {
    background-color: #f5f5f5;
}

/* 📄 Context menu (right-click menu) */
#esv-context-menu {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    width: 200px;
    display: none;
}

#esv-context-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#esv-context-menu li {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
}

#esv-context-menu li:hover {
    background-color: #0073aa;
    color: #fff;
}

/* 📄 Pagination controls */
.esv-pagination-controls {
    margin-top: 15px;
    text-align: right;
    font-size: 14px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

.esv-pagination-controls select {
    padding: 0;
    padding-left: 5px;
    padding-right: 5px;
    font-size: 14px;
    margin-left: 5px;
    width: 75px;
}

.esv-current-page-input {
    width: 50px;
    padding: 0;
    padding-left: 5px;
    padding-right: 5px;
    font-size: 16px;
}

.esv-prev-page, .esv-next-page {
    border: 0 !important;
}

.esv-refresh-button {
    margin-right: 5px;
}