html {
    scroll-behavior: smooth;
}

.grecaptcha-badge {
    visibility: hidden;
}

.active {
    color: rgb(9, 106, 182) !important;
}

article h2 {
    font-size: 1.5rem;
    font-weight: 500;
}

article p {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.post ul, .post ol {
    list-style: inherit;
    margin-left: 20px;
    padding: inherit;
}

.react-datepicker-wrapper {
    width: 100%;
}

td {
    border: 1px solid #e2e8f0;
}

.prose h1 {
    font-size: 2rem;
}

.prose h2 {
    font-size: 1.5rem;
}

.prose h3 {
    font-size: 1.25rem;
}

.prose h4 {
    font-size: 1rem;
}

.prose table {
    border-collapse: collapse;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    table-layout: fixed;
}

.prose table td,
.prose table th {
    border: 2px solid #dee2e6; /* Ensure border is explicitly defined */
    padding: 8px;
    vertical-align: top;
    text-align: left;
    /*background-color: #fff;*/
}

.prose table th {
    background-color: #f8f9fa; /* Header background */
    font-weight: bold;
    text-align: center; /* Optional */
}

.prose table .selectedCell:after {
    background: rgba(200, 200, 255, 0.4);
    content: '';
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    pointer-events: none;
    position: absolute;
    z-index: 2;
}

.prose table .column-resize-handle {
    background-color: #adf;
    bottom: -2px;
    position: absolute;
    right: -2px;
    pointer-events: none;
    top: 0;
    width: 4px;
}

.tableWrapper {
    padding: 1rem 0;
    overflow-x: auto; /* Enable horizontal scrolling if needed */
}

.prose ul {
    list-style: disc;
    margin-left: 20px;
    padding: inherit;
}

.prose ol {
    list-style: decimal;
    margin-left: 20px;
    padding: inherit;
}

.prose ul li, .prose ol li {
    margin-bottom: 0.5rem;
}

.prose hr {
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-top: 1px solid #e2e8f0;
}

.prose blockquote {
    border-left: 4px solid #e2e8f0;
    padding-left: 1rem;
    margin-left: 0;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.prose a {
    color: #096ab6;
    text-decoration: underline;
}

.tiptap-editor {
    min-height: 500px;
    padding: 16px;
}

.tiptap-editor table {
    background-color: inherit;
}

.tiptap-editor td,
.tiptap-editor th {
    background-color: inherit;
}

.tiptap-editor table th {
    font-weight: bold;
}

.tiptap-editor table .selectedCell:after {
    background: rgba(200, 200, 255, 0.4);
    content: '';
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    pointer-events: none;
    position: absolute;
    z-index: 2;
}

.tiptap-editor table .column-resize-handle {
    background-color: #adf;
    bottom: -2px;
    position: absolute;
    right: -2px;
    pointer-events: none;
    top: 0;
    width: 4px;
}

.tableWrapper {
    padding: 1rem 0;
    overflow-x: auto;
}

.tiptap-editor p.is-editor-empty:first-child::before {
    color: #adb5bd;
    content: attr(data-placeholder);
    float: left;
    height: 0;
    pointer-events: none;
}

#tiptap-json-content h1 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}
#tiptap-json-content h2 {
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 1rem;
}
#tiptap-json-content h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}
#tiptap-json-content h4 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}
#tiptap-json-content h5 {
    font-size: 1.125rem;
    font-weight: bold;
    margin-bottom: 1rem;
}
#tiptap-json-content h6 {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 1rem;
}
#tiptap-json-content table p {
    margin-bottom: 0;
}
#tiptap-json-content p {
    margin-bottom: 1rem;
}
#tiptap-json-content ul {
    list-style: disc;
    margin-left: 20px;
    padding: inherit;
}
#tiptap-json-content ol {
    list-style: decimal;
    margin-left: 20px;
    padding: inherit;
}
#tiptap-json-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    table-layout: fixed;
}

#tiptap-json-content table td,
#tiptap-json-content table th {
    border: 2px solid #dee2e6; /* Ensure border is explicitly defined */
    padding: 8px;
    vertical-align: top;
    text-align: left;
    /*background-color: #fff;*/
}

#tiptap-json-content table th {
    background-color: #f8f9fa; /* Header background */
    font-weight: bold;
    text-align: center;
}

#tiptap-json-content table .selectedCell:after {
    background: rgba(200, 200, 255, 0.4);
    content: '';
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    pointer-events: none;
    position: absolute;
    z-index: 2;
}

#tiptap-json-content table .column-resize-handle {
    background-color: #adf;
    bottom: -2px;
    position: absolute;
    right: -2px;
    pointer-events: none;
    top: 0;
    width: 4px;
}

#tiptap-json-content p {
    display: block;
}

#tiptap-json-content a {
    color: #096ab6;
    text-decoration: underline;
}

#tiptap-json-content p a {
    margin-left: 4px;
}

/* Accordion Container */
#tiptap-json-content .accordion {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 16px;
    background-color: #ffffff;
    overflow: hidden;
}

/* Accordion Item */
#tiptap-json-content .accordion-item {
    border-bottom: 1px solid #e0e0e0;
    overflow: hidden;
}

/* Accordion Header */
#tiptap-json-content .accordion-item h3 {
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f9f9f9;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out;
}

#tiptap-json-content .accordion-item h3:hover {
    background-color: #eaeaea;
}

/* Accordion Content (Initially Hidden) */
#tiptap-json-content .accordion-item p,
#tiptap-json-content .accordion-item table {
    display: none; /* Completely hide content, including tables */
}

/* Expanded State */
#tiptap-json-content .accordion-item.open p,
#tiptap-json-content .accordion-item.open table {
    display: block; /* Show content when open */
}


#tiptap-json-content .accordion-item h3:hover {
    background-color: #eaeaea;
}

/* Arrow Icon */
#tiptap-json-content .accordion-item h3::after {
    content: '▶'; /* Default arrow pointing right */
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease-in-out;
}

/* Rotate Arrow When Open */
#tiptap-json-content .accordion-item.open h3::after {
    transform: rotate(90deg); /* Arrow points downward */
}

/* Accordion Content (Smooth Transition) */
#tiptap-json-content .accordion-item p {
    font-size: 14px;
    color: #555;
    margin: 0;
    line-height: 1.5;
    padding: 0 16px;
    height: 0; /* Initially hidden */
    overflow: hidden;
    transition: height 0.3s ease-in-out, padding 0.3s ease-in-out;
}

#tiptap-json-content .accordion-item ul {
    font-size: 14px;
    color: #555;
    margin: 0;
    line-height: 1.5;
    padding: 0 16px;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease-in-out, padding 0.3s ease-in-out;
}

/* Expanded State */
#tiptap-json-content .accordion-item.open p {
    height: auto;
    padding: 8px 16px;
}

#tiptap-json-content .accordion-item.open ul {
    height: auto;
    padding: 8px 16px;
}

/*style for <::marker></::marker>*/
#tiptap-json-content .accordion-item li::marker {
    content: ">";
}

.tableWrapper {
    padding: 1rem 0;
    overflow-x: auto; /* Enable horizontal scrolling if needed */
}

/* Accordion Container */
.prose .accordion {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 16px;
    background-color: #f8f8f8;
    padding: 8px;
}

/* Accordion Header (Remove Button) */
.prose .accordion-header {
    display: flex;
    justify-content: flex-end;
}

.prose .remove-accordion {
    background-color: #e53e3e;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.prose .remove-accordion:hover {
    background-color: #c53030;
}

/* Accordion Items */
.prose .accordion-items {
    margin-top: 8px;
}

/* Individual Accordion Item */
.prose .accordion-item {
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 8px;
    padding: 8px;
    background-color: white;
}

/* Accordion Item Heading */
.prose .accordion-item-content h3 {
    font-size: 16px;
    margin: 0 0 8px 0;
    font-weight: bold;
}

/* Accordion Item Content (Paragraph) */
.prose .accordion-item-content p {
    font-size: 14px;
    margin: 0;
    color: #333;
    line-height: 1.5;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
.animate-bounce {
    animation: bounce 1.5s infinite;
}
#chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f3f4f6;
}
#chat-messages::-webkit-scrollbar {
    width: 6px;
}
#chat-messages::-webkit-scrollbar-track {
    background: #f3f4f6;
}
#chat-messages::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 3px;
}

.chat-markdown {
    background-color: #f6f8fa;
    padding: 1rem;
    border-radius: 0.375rem;
    margin: 0.5rem 0;
    overflow-x: auto;
}
.chat-markdown p {
    margin: 0.5rem 0;
}
.chat-markdown code:not(pre code) {
    background-color: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
}
.chat-markdown pre code {
    background: transparent;
    padding: 0;
}
.chat-markdown ul, .chat-markdown ol {
    margin: 0.5rem 0 0.5rem 1rem;
    padding-left: 1rem;
}
.chat-markdown li {
    margin: 0;
}
.chat-markdown li::marker {
    content: "•";
    margin-right: 0.5rem;
}
.chat-markdown a {
    color: #3b82f6;
    text-decoration: underline;
}
.chat-markdown a:hover {
    color: #2563eb;
}
.chat-markdown blockquote {
    border-left: 4px solid #e5e7eb;
    padding-left: 1rem;
    margin: 0.5rem 0;
    color: #4b5563;
}

/* Add typing cursor animation */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.typing-cursor {
    animation: blink 1s step-end infinite;
}