/* Proshna AI Fact Check Button (on questions) */
.proshna-ai-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 1em;
    color: #555;
    transition: color 0.2s ease;
}

.proshna-ai-btn .dashicons {
    color: #6a0dad;
}

.proshna-ai-btn:hover,
.proshna-ai-btn:focus {
    color: #6a0dad;
    font-weight: bold;
}

/* Fact Check Modal Styles (for questions) */
#proshna-ai-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.proshna-ai-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    position: relative;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease-in-out;
}

.proshna-ai-modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.proshna-ai-modal-content h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
    color: #333;
}

#proshna-ai-response-area {
    min-height: 200px;
    max-height: 60vh;
    overflow-y: auto;
    line-height: 1.7;
    color: #444;
}

/* === START: AI ASSISTANT PAGE STYLES === */

#proshna-chat-container {
    max-width: 768px; /* Or your preferred content width */
    margin: 20px auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fdfdfd;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    height: 70vh; /* Set a viewport height */
    min-height: 500px;
    max-height: 800px;
}

/* Chat Message Area */
#proshna-chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f4f7f6;
}

.proshna-chat-message {
    padding: 12px 18px;
    border-radius: 18px;
    line-height: 1.6;
    max-width: 85%;
    word-wrap: break-word;
}

.proshna-chat-message.user {
    background-color: #6a0dad;
    color: #fff;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.proshna-chat-message.model {
    background-color: #fff;
    color: #333;
    border: 1px solid #e5e5e5;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

/* Chat Loader */
#proshna-chat-loader {
    padding: 10px 30px;
}
#proshna-chat-loader .proshna-ai-loader {
    width: 30px;
    height: 30px;
    border-width: 4px;
    margin: 0 auto;
}

/* Chat Input Form */
#proshna-chat-form {
    display: flex;
    padding: 20px 30px;
    border-top: 1px solid #eee;
    background: #fff;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

#proshna-chat-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 1em;
    margin-right: 10px;
    transition: border-color 0.2s ease;
}
#proshna-chat-input:focus {
    outline: none;
    border-color: #6a0dad;
}

#proshna-chat-form button {
    border: none;
    background: #6a0dad;
    color: #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#proshna-chat-form button:hover {
    background: #550a8a;
}
#proshna-chat-form button:disabled {
    background: #c7c7c7;
    cursor: not-allowed;
}

/* === END: AI ASSISTANT PAGE STYLES === */

/* General Loader Animation */
.proshna-ai-loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #6a0dad;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
