/* OpenPharos — Tailwind CSS supplements */

/* Chat bubble styles */
.chat-bot {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 1rem 1rem 1rem 0.25rem;
    background-color: #f3f4f6;
    color: #111827;
    font-size: 0.875rem;
    line-height: 1.5;
}

.chat-user {
    max-width: 85%;
    margin-left: auto;
    padding: 0.75rem 1rem;
    border-radius: 1rem 1rem 0.25rem 1rem;
    background-color: #4f46e5;
    color: white;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Quick-reply buttons */
.quick-reply {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    font-size: 0.8125rem;
    color: #374151;
    background: white;
    cursor: pointer;
    transition: all 0.15s;
}
.quick-reply:hover {
    border-color: #4f46e5;
    color: #4f46e5;
    background-color: #eef2ff;
}
.quick-reply-themed {
    border-color: var(--quick-reply-border, #cbd5e1);
    color: var(--quick-reply-text, #334155);
    background: var(--quick-reply-bg, linear-gradient(135deg, #ffffff 0%, #f8fafc 100%));
    box-shadow: 0 8px 18px -16px var(--quick-reply-shadow, rgba(148, 163, 184, 0.22));
}
.quick-reply-themed:hover {
    border-color: var(--quick-reply-hover-border, var(--quick-reply-border, #94a3b8));
    color: var(--quick-reply-text, #334155);
    background: var(--quick-reply-hover-bg, var(--quick-reply-bg, #f8fafc));
    transform: translateY(-1px);
    box-shadow: 0 14px 26px -18px var(--quick-reply-shadow, rgba(148, 163, 184, 0.28));
}

/* Topic checkbox grid */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}
.topic-item label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
}
.topic-item label:hover {
    border-color: #4f46e5;
    background-color: #f5f3ff;
}
.topic-item .topic-name {
    display: block;
    color: #111827;
}
.topic-item .topic-parent {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.6875rem;
    color: #6b7280;
}
.topic-item input:checked + span {
    color: #4f46e5;
    font-weight: 500;
}

/* Keyword tag input */
.keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}
.keyword-tag.include {
    background-color: #d1fae5;
    color: #065f46;
}
.keyword-tag.exclude {
    background-color: #fee2e2;
    color: #991b1b;
}
.keyword-tag button {
    font-size: 0.875rem;
    line-height: 1;
    opacity: 0.6;
    cursor: pointer;
}
.keyword-tag button:hover {
    opacity: 1;
}

/* AI keyword section */
.ai-keyword-section {
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fafafa;
    min-height: 1.5rem;
}
.ai-keyword-section:empty {
    display: none;
}

/* Synonym tooltip */
.keyword-tag.has-synonyms {
    cursor: help;
    border-bottom: 1px dashed currentColor;
}

/* Preview iframe */
.preview-frame {
    width: 100%;
    min-height: 400px;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
}

/* Schedule modal */
.schedule-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}
.schedule-modal {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
.schedule-modal h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}
.schedule-modal label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}
.schedule-modal select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #111827;
    background: white;
    margin-bottom: 1rem;
    cursor: pointer;
}
.schedule-modal select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}
.schedule-modal .schedule-submit {
    width: 100%;
    padding: 0.625rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.schedule-modal .schedule-submit:hover {
    background: #4338ca;
}
.schedule-modal .sched-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
    cursor: pointer;
    margin-top: 0.25rem;
}
.schedule-modal .sched-checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #4f46e5;
}
.schedule-modal .sched-weekday-toggle {
    margin-bottom: 0.25rem;
}
.schedule-modal .sched-help-text {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    color: #6b7280;
}
.schedule-modal .sched-weekday-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.schedule-modal .sched-weekday-list.hidden {
    display: none;
}
.schedule-modal .sched-weekday-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #f9fafb;
    font-size: 0.8125rem;
    color: #374151;
    cursor: pointer;
}
.schedule-modal .sched-weekday-option input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #4f46e5;
}
.schedule-modal .sched-error {
    margin: 0.5rem 0 0.75rem;
    font-size: 0.75rem;
    color: #dc2626;
}
.schedule-modal .sched-error.hidden {
    display: none;
}

/* Loading dots animation */
.typing-dots span {
    animation: dot-blink 1.4s infinite both;
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    margin: 0 2px;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-blink {
    0%, 80%, 100% { opacity: 0.3; }
    40% { opacity: 1; }
}
