/* Table Styles - Light Mode */

/* Base table styles */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

/* Table headers */
table th,
thead th {
    background-color: #f7fafc;
    color: #2d3748;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Table cells */
table td,
tbody td {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    font-size: 0.875rem;
}

/* Table row hover */
tbody tr:hover {
    background-color: #f7fafc;
}

/* Striped tables */
tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

/* API Keys table specific */
#api-keys-list table {
    width: 100%;
    background-color: white;
    margin-top: 1rem;
}

#api-keys-list table th {
    background-color: #f7fafc;
    font-weight: 600;
    text-transform: none;
}

#api-keys-list table td {
    vertical-align: middle;
}

/* Code elements in API keys table */
#api-keys-list code,
table code {
    background-color: #f7fafc;
    color: #d6409f;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    display: inline-block;
}

/* Terms table specific */
#terms-list table,
#terms-table {
    width: 100%;
    background-color: white;
    margin-top: 1rem;
}

#terms-list table th,
#terms-table th {
    background-color: #f7fafc;
    font-weight: 600;
    text-transform: none;
}

/* History table */
#history-list table,
#history-table {
    width: 100%;
    background-color: white;
}

/* Table buttons */
table button,
table .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #cbd5e0;
    background-color: white;
    color: #4a5568;
}

table button:hover,
table .btn:hover {
    background-color: #f7fafc;
    border-color: #a0aec0;
}

/* Icon buttons in tables */
table .btn-icon,
table button[title] {
    background: transparent;
    border: none;
    color: #718096;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
}

table .btn-icon:hover,
table button[title]:hover {
    color: #2d3748;
    background-color: #edf2f7;
    border-radius: 0.25rem;
}

/* Primary buttons in tables */
table .btn-primary {
    background-color: #3182ce;
    color: white;
    border-color: #3182ce;
}

table .btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* Danger buttons in tables */
table .btn-danger,
.btn-danger {
    background-color: #dc2626;
    color: white;
    border-color: #dc2626;
}

table .btn-danger:hover,
.btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

/* Success buttons */
table .btn-success {
    background-color: #10b981;
    color: white;
    border-color: #10b981;
}

table .btn-success:hover {
    background-color: #059669;
    border-color: #059669;
}

/* Small buttons */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Badge styles in tables */
table .badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

/* DNT badge */
.dnt-badge {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

/* Glossary badge */
.glossary-badge {
    background-color: #d1fae5;
    color: #10b981;
    border: 1px solid #6ee7b7;
}

/* Empty state messages */
#terms-list p,
#api-keys-list p,
#history-list p {
    color: #718096;
    text-align: center;
    padding: 2rem;
}

/* Table container */
.table-container {
    overflow-x: auto;
    background-color: white;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    padding: 1rem;
}

/* Responsive tables */
@media (max-width: 768px) {
    table {
        font-size: 0.75rem;
    }
    
    table th,
    table td {
        padding: 0.5rem;
    }
    
    table button {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Table sorting indicators */
th[data-sortable] {
    cursor: pointer;
    user-select: none;
}

th[data-sortable]:hover {
    background-color: #edf2f7;
}

/* Table actions column */
table td:last-child,
table th:last-child {
    text-align: center;
    white-space: nowrap;
}

/* Copy button specific */
button[title="Copy to clipboard"] {
    color: #3182ce;
}

button[title="Copy to clipboard"]:hover {
    color: #2563eb;
    background-color: #dbeafe;
}

/* Edit button specific */
button[title="Edit"],
.btn-edit {
    color: #f59e0b;
}

button[title="Edit"]:hover,
.btn-edit:hover {
    color: #d97706;
    background-color: #fef3c7;
}

/* Delete button specific */
button[title="Delete"],
button[title="Revoke"] {
    color: #dc2626;
}

button[title="Delete"]:hover,
button[title="Revoke"]:hover {
    color: #b91c1c;
    background-color: #fee2e2;
}

/* Table footer */
tfoot,
.table-footer {
    background-color: #f7fafc;
    font-weight: 600;
}

/* Pagination */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f7fafc;
    border-top: 1px solid #e2e8f0;
}