/* Table Styles - Data tables, pagination, sortable headers */

/* Table Display Styles */
.tables-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    margin-bottom: 2rem;
}

.table-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.table-item:last-child {
    margin-bottom: 0;
}

.table-info h4 {
    margin: 0 0 0.5rem 0;
    color: #2d5f3f;
    font-size: 11pt;
    font-weight: 600;
}

.table-meta {
    margin: 0.5rem 0;
    color: #666;
    font-size: 9pt;
}

.table-columns {
    margin: 0.5rem 0 0 0;
    color: #495057;
    font-size: 9pt;
    line-height: 1.4;
}

.no-data-text, .error-text, .loading-text {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
    margin: 0;
}

.error-text {
    color: #dc3545;
}


/* Compact Pagination Styles */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 1rem 0;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    flex-wrap: nowrap;
}

.pagination-btn {
    background: white;
    border: 1px solid #d0d7de;
    color: #24292f;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 8pt;
    transition: all 0.2s ease;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #2d5f3f;
    color: #2d5f3f;
}

.pagination-btn.active {
    background: #2d5f3f;
    border-color: #2d5f3f;
    color: white;
    font-weight: 600;
}

.pagination-btn:disabled {
    background: #f6f8fa;
    color: #8b949e;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-dots {
    color: #656d76;
    padding: 0 0.2rem;
    font-size: 8pt;
}

.page-info {
    margin-left: 0.5rem;
    color: #656d76;
    font-size: 8pt;
    white-space: nowrap;
    background: white;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}



/* Pagination Styles */


/* Favorites Table Styling */
.favorites-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-top: 1rem;
    border: 1px solid #e0e0e0;
}

.favorites-table thead {
    background-color: #6ba377;
    color: white;
}

.favorites-table th {
    padding: 0.5rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
}

.favorites-table .actions-column {
    width: 120px;
    text-align: center;
}

.favorites-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.favorites-table tbody tr:hover {
    background-color: #f8f9fa;
}

.favorites-table tbody tr:last-child {
    border-bottom: none;
}

.favorites-table td {
    padding: 1rem;
    vertical-align: middle;
}

.title-cell {
    max-width: 400px;
}

.favorite-title-link {
    color: #2d5f3f;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.4;
    display: block;
}

.favorite-title-link:hover {
    color: #1e4029;
    text-decoration: underline;
}

.date-cell {
    color: #666;
    font-size: 0.9rem;
    white-space: nowrap;
}

.actions-cell {
    text-align: center;
}

.table-actions {
    display: flex;
    position: relative;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.table-actions .action-btn {
    color: #2d5f3f;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0px;
}

.table-actions .action-btn:hover {
    background-color: #f0f0f0;
    transform: scale(1.1);
}

.action-btn.share-btn:hover {
    color: #1e4029;
}

.action-btn.unsave-btn:hover {
    color: #2d5f3f;
}

.action-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: block;
}

/* Table Share Popup */
.table-share-popup {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 1rem;
    min-width: 200px;
    max-width: 250px;
    z-index: 999;
}

.table-share-popup .share-menu-header {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #333;
    font-size: 0.9rem;
}

.table-share-popup .share-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.table-share-popup .share-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    color: #333;
    font-size: 0.9rem;
}

.table-share-popup .share-option:hover {
    background-color: #f5f5f5;
}

.table-share-popup .share-option svg {
    color: #2d5f3f;
}

/* Icon cell styling for combined favorites */
.favorites-table .icon-cell {
    width: 40px;
    padding-right: 0.5rem;
    text-align: center;
    vertical-align: middle;
}

/* Search results and favorites pagination styling */
.pagination-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Specific styling for favorites pagination to reduce spacing */
#favoritesPaginationContainer {
    margin: 0;
    padding: 0;
    border-top: none;
    background-color: white;
}

.pagination-btn {
    background-color: #2d5f3f;
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #1e3f2a;
}

.pagination-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-btn.active {
    background-color: #1e3f2a;
    font-weight: bold;
}

.pagination-dots {
    color: #666;
    font-size: 0.9rem;
    padding: 0 0.25rem;
}

.page-info {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    margin-left: 1rem;
    padding: 0.5rem;
}
