/* Marketing Journal Custom Styles */

/* Tag Input Styles */
.tag-input-container {
    min-height: 38px;
    cursor: text;
}

.tag-input-container:focus-within {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.tag-badge {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

/* Journal Entry Styles */
.journal-entry {
    transition: all 0.2s ease;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
    background-color: #fff;
}

.journal-entry:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.journal-entry.ai-response {
    background-color: #f8f9fa;
    border-left: 3px solid #0d6efd;
}

.journal-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.journal-entry-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

.journal-entry-content {
    line-height: 1.6;
}

.journal-entry-content h1,
.journal-entry-content h2,
.journal-entry-content h3,
.journal-entry-content h4,
.journal-entry-content h5,
.journal-entry-content h6 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.journal-entry-content p {
    margin-bottom: 0.75rem;
}

.journal-entry-content ul,
.journal-entry-content ol {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

.journal-entry-content blockquote {
    border-left: 3px solid #dee2e6;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #6c757d;
}

/* Persona headshot styles */
.persona-headshots {
    display: flex;
    gap: 0.25rem;
}

.persona-headshot,
.persona-headshot-initials {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.persona-headshot:hover,
.persona-headshot-initials:hover {
    transform: scale(1.1);
}

/* Journal Entry Tags */
.journal-entry-tags {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.journal-entry-tags .tag-badge {
    background-color: #e9ecef;
    color: #495057;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Journal Entry Replies */
.journal-entry-replies {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.replies-container {
    margin-bottom: 1rem;
}

.reply-item {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
}

.reply-item:last-child {
    margin-bottom: 0;
}

.reply-content {
    line-height: 1.5;
    word-wrap: break-word;
}

.reply-form-container {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.show-reply-form-btn {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0;
    border: none;
    background: none;
}

.show-reply-form-btn:hover {
    color: #0d6efd;
    text-decoration: underline;
}

.submit-reply-btn,
.cancel-reply-btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Persona Mentions */
.persona-mention {
    color: #0d6efd;
    font-weight: 500;
    text-decoration: none;
}

.persona-mention:hover {
    text-decoration: underline;
}

/* Attachment List */
.attachment-list {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.attachment-item i {
    color: #6c757d;
}

/* See more/less links */
.see-more-link,
.see-less-link {
    color: #0d6efd;
    text-decoration: none;
    font-size: 0.875rem;
    margin-left: 0.25rem;
}

.see-more-link:hover,
.see-less-link:hover {
    text-decoration: underline;
}

/* Persona Card Styles */
.persona-card {
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
}

.persona-card:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-color: #0d6efd;
}

/* Chat Modal Styles */
#personaChatModal .modal-body {
    height: 70vh;
    display: flex;
    flex-direction: column;
}

#chatContainer {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8f9fa;
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message.user .chat-message-content {
    background-color: #0d6efd;
    color: white;
    margin-left: auto;
}

.chat-message.persona .chat-message-content {
    background-color: white;
    border: 1px solid #dee2e6;
}

.chat-message-content {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-message.system {
    justify-content: center;
    font-style: italic;
    color: #6c757d;
    font-size: 0.875rem;
}

.chat-message.typing .chat-message-content {
    background-color: #e9ecef;
    padding: 0.5rem 1rem;
}

.typing-indicator {
    display: flex;
    gap: 4px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #6c757d;
    border-radius: 50%;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

/* New typing indicator for chat */
.typing-indicator.message {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    padding: 1rem;
}

.typing-indicator .message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.typing-indicator .speaker-name {
    font-weight: 600;
    color: #495057;
}

.typing-indicator .typing-text {
    color: #6c757d;
    font-size: 0.875rem;
}

.typing-indicator .typing-dots {
    color: #6c757d;
    font-size: 0.875rem;
    min-width: 1.5rem;
}

/* CKEditor Styles */
.ck-editor__editable {
    min-height: 150px;
}

/* Loading Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Avatar Styles */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-lg {
    width: 48px;
    height: 48px;
}

.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #6c757d;
    color: white;
    font-weight: bold;
}

/* Button Styles */
.btn-icon {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1;
}

/* Toast Container */
.toast-container {
    z-index: 9999;
}

/* Mention Styles */
.mention {
    color: #0d6efd;
    font-weight: 500;
    text-decoration: none;
}

.mention:hover {
    text-decoration: underline;
}

/* Entry Actions */
.entry-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.journal-entry:hover .entry-actions {
    opacity: 1;
}

/* Chat Icon */
.chat-icon {
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s ease;
}

.chat-icon:hover {
    color: #0d6efd;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .chat-message-content {
        max-width: 85%;
    }
    
    #personaChatModal .modal-body {
        height: 60vh;
    }
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sidebar Sticky */
.sticky-sidebar {
    position: sticky;
    top: 1rem;
}

/* Entry Attachments */
.entry-attachment {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    text-decoration: none;
    color: #495057;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.entry-attachment:hover {
    background-color: #e9ecef;
    color: #0d6efd;
}

/* Form Styles */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #6c757d;
}

/* Modal Styles */
.modal-header {
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

/* Card Styles */
.card {
    border: 1px solid #dee2e6;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.no-border {
    border: none !important;
    box-shadow: none !important;
}

/* Persona Styles */
.persona-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.persona-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #e9ecef;
    border-radius: 1rem;
    font-size: 0.875rem;
}

/* Taxonomy Styles */
.taxonomy-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Goal Settings */
.goal-settings-section {
    margin-bottom: 2rem;
}

.goal-settings-section h5 {
    margin-bottom: 1rem;
    color: #495057;
}

/* User List */
.user-list-item {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.user-list-item:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Search Styles */
.search-input-group {
    position: relative;
}

.search-input-group .form-control {
    padding-right: 2.5rem;
}

.search-input-group .search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.chat-avatar {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0.4em;
  align-self: flex-start;
  vertical-align: top;
}

/* Remove old typing indicator animation */
.typing-indicator span,
.typing-indicator .typing-dots {
  animation: none !important;
}

/* Remove any keyframes for typing */
@keyframes typing {}