/* Custom Scrollbar for Chat Container */
#chat-container::-webkit-scrollbar {
    width: 6px;
}

#chat-container::-webkit-scrollbar-track {
    background: transparent;
}

#chat-container::-webkit-scrollbar-thumb {
    background-color: #E5E7EB;
    border-radius: 20px;
}

#chat-container::-webkit-scrollbar-thumb:hover {
    background-color: #D1D5DB;
}

/* Modal Animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content {
    animation: modalFadeIn 0.2s ease-out;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 20px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* Table Styles */
.review-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.review-table th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.review-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.review-table tr:hover td {
    background-color: #f8fafc;
}

.review-table tr:last-child td {
    border-bottom: none;
}

/* Input Area Fix - make sure buttons are reachable */
.input-area {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding-top: 2.5rem;
    padding-bottom: 1.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    z-index: 10;
    pointer-events: none;
    /* Make the container non-interactive */
}

/* Create a gradient overlay using pseudo-element */
.input-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, #f9fafb, rgba(249, 250, 251, 0.8) 30%, rgba(249, 250, 251, 0.5) 60%, rgba(249, 250, 251, 0) 100%);
    z-index: -1;
    /* Put gradient behind the input container */
    pointer-events: none;
    /* Make sure gradient doesn't block clicks */
}

.input-area .input-container {
    max-width: 48rem;
    /* max-w-4xl */
    margin-left: auto;
    margin-right: auto;
    background-color: white;
    border-radius: 1rem;
    /* rounded-2xl */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* shadow-xl */
    border: 1px solid #e5e7eb;
    /* border-gray-200 */
    padding: 0.5rem;
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    transform: none;
    transition: all 0.2s ease;
    pointer-events: auto;
    /* Make the input container interactive again */
}

.input-area .input-container:focus-within {
    outline: 2px solid #20c994;
    /* primary */
    outline-offset: 2px;
}

.input-area textarea {
    width: 100%;
    resize: none;
    border: 0;
    background: transparent;
    padding: 0.75rem 1rem;
    color: #1f2937;
    /* gray-900 */
    font-size: 0.875rem;
    /* sm:text-sm */
    line-height: 1.5;
    max-height: 8rem;
    overflow-y: auto;
}

.input-area textarea::placeholder {
    color: #9ca3af;
    /* gray-400 */
}

.input-area textarea:focus {
    outline: 0;
}

.input-area .send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.25rem;
    /* rounded-xl */
    background-color: #20c994;
    /* primary */
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 600;
    /* font-semibold */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    /* shadow-sm */
    transition: all 0.15s ease;
    pointer-events: auto;
    /* Ensure the button is clickable */
}

.input-area .send-btn:hover {
    background-color: #1eab7d;
    /* indigo-500 -> primary-dark */
}

.input-area .send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-area .send-btn .arrow-icon {
    height: 1.25rem;
    /* h-5 */
    width: 1.25rem;
    /* w-5 */
    transition: transform 0.2s ease;
}

.input-area .send-btn:hover .arrow-icon {
    transform: translateX(0.125rem);
    /* group-hover:translate-x-0.5 */
}

/* Ensure messages are above the input area */
.chat-container {
    padding-bottom: 130px;
    /* Make sure there's space for the input area */
}