.watermark {
    display: none !important;
}

/* Enhanced table styling for message content */
.message-content {
    overflow-x: auto !important; /* show horizontal scrollbar when needed */
    -webkit-overflow-scrolling: touch;
}
.message-content table {
    border-spacing: 0 !important;
    border-collapse: collapse !important;
    /* let table grow to content width so overflow is obvious */
    width: max-content !important;
    min-width: 100% !important;
    font-size: 0.875rem !important;
    border-radius: 0.5rem !important;
    overflow: hidden !important; /* clip to show rounded corners */
}

/* Header styling */
.message-content table th {
    height: auto !important;
    padding: 0.25rem 0.375rem !important;
    line-height: 1.1 !important;
    background-color: hsl(var(--muted)) !important;
    font-weight: 600 !important;
    border-bottom: 2px solid hsl(var(--border)) !important;
}

/* Data cell styling */
.message-content table td {
    padding: 0.125rem 0.375rem !important;
    line-height: 1.2 !important;
    border-bottom: 1px solid hsl(var(--border)) !important;
}

/* Zebra striping for better readability */
.message-content table tr:nth-child(even) td {
    background-color: hsl(var(--muted) / 0.3) !important;
}

.message-content table tr:nth-child(odd) td {
    background-color: transparent !important;
}

/* Hover effect for better UX */
.message-content table tr:hover td {
    background-color: hsl(var(--accent)) !important;
}

/* Row height control */
.message-content table tr {
    height: auto !important;
}

/* Compact, readable density improvements */
.message-content table {
    /* Align digits vertically for cleaner numeric columns */
    font-variant-numeric: tabular-nums !important;
    -moz-font-feature-settings: "tnum" 1 !important;
    -webkit-font-feature-settings: "tnum" 1 !important;
    font-feature-settings: "tnum" 1 !important; /* enforce tabular numbers across engines */
}

.message-content table th,
.message-content table td {
    white-space: nowrap !important; /* keep rows compact */
    vertical-align: middle !important;
}

/* Allow header labels to wrap so we can fit more columns */
.message-content table th {
    white-space: normal !important;
    word-break: keep-all !important;
}

/* Subtle vertical separators for scannability */
.message-content table th:not(:last-child),
.message-content table td:not(:last-child) {
    border-right: 1px solid hsl(var(--border) / 0.5) !important;
}

/* Sticky header for long tables */
.message-content table thead th {
    position: sticky !important;
    top: 0;
    z-index: 1;
    background-color: hsl(var(--muted)) !important;
    box-shadow: 0 1px 0 hsl(var(--border)) !important;
}

/* Softer hover so text remains legible */
.message-content table tr:hover td {
    background-color: hsl(var(--accent) / 0.2) !important;
}


/* Ensure messages align to chatbox width (no inner gutters) */
.step,
.message-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

/* Force header wrapping while keeping data cells compact */
.message-content table td {
    white-space: nowrap !important;
}

.message-content table th {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto !important;
    max-width: 14ch !important; /* force wrapping of long column names */
}

#chat-profiles,
#chat-profiles span {
    color: #ffffff !important;
}

#chat-profiles {
    background-color: transparent !important;
}

#chat-profiles:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Some UIs set fixed header height via utility classes like h-12; override it */
.message-content table thead th,
.message-content table th.h-12 {
    height: auto !important;
}

/* Inject app name into the centered absolute container inside header */
#header > .absolute::before {
    content: "AIQ Insight (Beta)";
    color: #ffffff;
    font-weight: 700;
    font-size: 2.0rem !important;
}

/* Hide app name on mobile */
@media (max-width: 768px) {
    #header > .absolute::before {
        display: none !important;
    }
}

.message-content table thead tr {
    height: auto !important;
}

/* Slightly widen chat: bump container clamp from 60rem to 64rem */
div[style*="max-width: min(60rem"] {
    max-width: min(66rem, 100vw) !important;
}
