/* Reusable Table Styles for Canaccom Platform */

/* Base Table Container */
.table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.dark .table-container {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
}

/* Standard Table */
.standard-table {
    border-collapse: collapse;
    width: 100%;
    background-color: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
}

.dark .standard-table {
    background-color: #1f2937;
}

/* Table Headers */
.standard-table th {
    background-color: #f8fafc;
    color: #1e293b;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dark .standard-table th {
    background-color: #374151;
    color: #f1f5f9;
    border-bottom-color: #4b5563;
}

/* Table Cells */
.standard-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #374151;
    font-size: 0.875rem;
}

.dark .standard-table td {
    border-bottom-color: #4b5563;
    color: #e5e7eb;
}

/* Table Row Hover */
.standard-table tbody tr:hover {
    background-color: #f8fafc;
}

.dark .standard-table tbody tr:hover {
    background-color: #374151;
}

/* Schema Table (for database documentation) */
.schema-table {
    border-collapse: collapse;
    width: 100%;
    background-color: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
}

.dark .schema-table {
    background-color: #1f2937;
}

.schema-table th,
.schema-table td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
    color: #374151;
    font-size: 0.875rem;
}

.dark .schema-table th,
.dark .schema-table td {
    border-color: #4b5563;
    color: #e5e7eb;
}

.schema-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #111827;
}

.dark .schema-table th {
    background-color: #374151;
    color: #f9fafb;
}

/* Special Field Types */
.primary-key {
    background-color: #fef3c7;
    font-weight: 600;
    color: #92400e;
}

.dark .primary-key {
    background-color: #92400e;
    color: #fef3c7;
}

.foreign-key {
    background-color: #dbeafe;
    font-weight: 500;
    color: #1e40af;
}

.dark .foreign-key {
    background-color: #1e40af;
    color: #dbeafe;
}

.required {
    color: #dc2626;
    font-weight: 600;
}

.dark .required {
    color: #f87171;
}

.optional {
    color: #6b7280;
    font-style: italic;
}

.dark .optional {
    color: #9ca3af;
}

/* Data Table (for displaying data) */
.data-table {
    border-collapse: collapse;
    width: 100%;
    background-color: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
}

.dark .data-table {
    background-color: #1f2937;
}

.data-table th {
    background-color: #f1f5f9;
    color: #0f172a;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.875rem;
}

.dark .data-table th {
    background-color: #374151;
    color: #f8fafc;
    border-bottom-color: #4b5563;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #374151;
    font-size: 0.875rem;
}

.dark .data-table td {
    border-bottom-color: #4b5563;
    color: #e5e7eb;
}

.data-table tbody tr:hover {
    background-color: #f8fafc;
}

.dark .data-table tbody tr:hover {
    background-color: #374151;
}

/* Compact Table */
.compact-table {
    border-collapse: collapse;
    width: 100%;
    background-color: #ffffff;
    border-radius: 0.375rem;
    overflow: hidden;
}

.dark .compact-table {
    background-color: #1f2937;
}

.compact-table th {
    background-color: #f8fafc;
    color: #1e293b;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.75rem;
}

.dark .compact-table th {
    background-color: #374151;
    color: #f1f5f9;
    border-bottom-color: #4b5563;
}

.compact-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    color: #374151;
    font-size: 0.75rem;
}

.dark .compact-table td {
    border-bottom-color: #4b5563;
    color: #e5e7eb;
}

.compact-table tbody tr:hover {
    background-color: #f8fafc;
}

.dark .compact-table tbody tr:hover {
    background-color: #374151;
}

/* Status Indicators */
.status-active {
    color: #059669;
    font-weight: 600;
}

.dark .status-active {
    color: #34d399;
}

.status-inactive {
    color: #dc2626;
    font-weight: 600;
}

.dark .status-inactive {
    color: #f87171;
}

.status-pending {
    color: #d97706;
    font-weight: 600;
}

.dark .status-pending {
    color: #fbbf24;
}

/* Responsive Table */
@media (max-width: 768px) {
    .table-container {
        font-size: 0.75rem;
    }
    
    .standard-table th,
    .standard-table td,
    .schema-table th,
    .schema-table td,
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .table-container {
        box-shadow: none;
    }
    
    .standard-table,
    .schema-table,
    .data-table,
    .compact-table {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
    
    .standard-table th,
    .schema-table th,
    .data-table th,
    .compact-table th {
        background-color: #f1f5f9 !important;
        color: #000000 !important;
    }
    
    .standard-table td,
    .schema-table td,
    .data-table td,
    .compact-table td {
        color: #000000 !important;
    }
} 