/* ====================================
   Durlabh Darshan Chatbot Styles
   WhatsApp-inspired spiritual chatbot interface
   ==================================== */

/* ====================================
   1. WhatsApp-like Background Pattern
   ==================================== */
.wa-bg {
    background-color: #E5DDD5;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 15h10v10H15V15zm40 0h10v10H55V15zm-20 20h10v10H35V35zm40 0h10v10H75V35zm-60 20h10v10H15V55zm40 0h10v10H55V55zm-20 20h10v10H35V75zm40 0h10v10H75V75z' fill='%23d1d7df' fill-opacity='0.1'/%3E%3C/svg%3E");
}

/* ====================================
   2. Custom Scrollbar Styles
   ==================================== */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

/* Hide scrollbar for suggestion chips */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ====================================
   3. Message Bubble Tails
   ==================================== */
/* Incoming message tail (left side) */
.bubble-in::before {
    content: "";
    position: absolute;
    top: 0;
    left: -10px;
    width: 10px;
    height: 13px;
    background: linear-gradient(to bottom right, transparent 50%, white 50%);
}

/* Outgoing message tail (right side) */
.bubble-out::before {
    content: "";
    position: absolute;
    top: 0;
    right: -10px;
    width: 10px;
    height: 13px;
    background: linear-gradient(to bottom left, transparent 50%, #d9fdd3 50%);
}

/* ====================================
   4. Animations
   ==================================== */
/* Message fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-msg {
    animation: fadeIn 0.3s ease-out forwards;
}

/* ====================================
   5. Typing Indicator
   ==================================== */
.typing-dot {
    animation: typing 1.4s infinite ease-in-out both;
    background-color: #667781;
    border-radius: 50%;
    height: 6px;
    width: 6px;
    margin: 0 1px;
    display: inline-block;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* ====================================
   6. Utility Classes
   ==================================== */
.header-bg {
    background-color: #008069;
}

.user-message-bg {
    background-color: #d9fdd3;
}

.bot-message-bg {
    background-color: white;
}

.input-bg {
    background-color: #F0F2F5;
}

/* ====================================
   7. Markdown Content Styles
   ==================================== */
.markdown-content {
    line-height: 1.6;
}

/* Links */
.markdown-content a {
    color: #0066cc;
    text-decoration: underline;
    word-break: break-word;
}

.markdown-content a:hover {
    color: #0052a3;
}

/* Bold */
.markdown-content strong {
    font-weight: 600;
    color: #111B21;
}

/* Italic */
.markdown-content em {
    font-style: italic;
}

/* Tables */
.markdown-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 8px 0;
    font-size: 13px;
    overflow-x: auto;
    display: block;
}

.markdown-content thead {
    background-color: #f0f2f5;
}

.markdown-content th {
    border: 1px solid #d1d7db;
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    color: #111B21;
}

.markdown-content td {
    border: 1px solid #d1d7db;
    padding: 6px 8px;
}

.markdown-content tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Lists */
.markdown-content ul,
.markdown-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.markdown-content li {
    margin: 4px 0;
}

/* Code blocks */
.markdown-content code {
    background-color: #f0f2f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.markdown-content pre {
    background-color: #f0f2f5;
    padding: 8px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 8px 0;
}

.markdown-content pre code {
    background-color: transparent;
    padding: 0;
}

/* Blockquotes */
.markdown-content blockquote {
    border-left: 3px solid #0066cc;
    padding-left: 10px;
    margin: 8px 0;
    color: #667781;
    font-style: italic;
}

/* Headings */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    font-weight: 600;
    margin: 10px 0 6px 0;
    color: #111B21;
}

.markdown-content h1 { font-size: 16px; }
.markdown-content h2 { font-size: 15px; }
.markdown-content h3 { font-size: 14px; }

/* Paragraphs */
.markdown-content p {
    margin: 6px 0;
}

/* Horizontal rule */
.markdown-content hr {
    border: none;
    border-top: 1px solid #d1d7db;
    margin: 12px 0;
}

