/* Custom Styles for Torah AI Frontend */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Professional Color Palette Variables */
:root {
    --color-primary: #1e293b;
    --color-secondary: #334155;
    --color-accent: #3b82f6;
    --color-success: #059669;
    --color-warning: #d97706;
    --color-error: #dc2626;
    --color-text-primary: #1f2937;
    --color-text-secondary: #6b7280;
    --color-text-muted: #9ca3af;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f8fafc;
    --color-bg-tertiary: #f1f5f9;
}

.dark {
    --color-primary: #0f172a;
    --color-secondary: #1e293b;
    --color-accent: #3b82f6;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-text-primary: #f1f5f9;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #94a3b8;
    --color-border: #374151;
    --color-border-light: #4b5563;
    --color-bg-primary: #0f172a;
    --color-bg-secondary: #1e293b;
    --color-bg-tertiary: #334155;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--color-text-primary);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--color-text-muted);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-secondary);
}

/* Hebrew font for specific elements */
.hebrew {
    font-family: 'Arial', 'David', 'Noto Sans Hebrew', serif;
    direction: rtl;
}

/* Professional Example Cards */
.example-card {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.example-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.example-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
    font-size: 1.25rem;
}

.example-card h4 {
    color: var(--color-text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.example-card p {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Agentic process visualization styles */
.agent-step {
    border-left-width: 4px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}
.agent-plan {
    border-color: var(--color-accent);
    background-color: rgba(59, 130, 246, 0.1);
}
.agent-tool {
    border-color: #8b5cf6;
    background-color: rgba(139, 92, 246, 0.1);
}
.agent-synthesis {
    border-color: var(--color-success);
    background-color: rgba(5, 150, 105, 0.1);
}
.agent-error {
    border-color: var(--color-error);
    background-color: rgba(220, 38, 38, 0.1);
}

/* --- Conversation List Enhancements --- */
.conversation-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.conversation-item:hover {
    background-color: var(--color-bg-secondary);
    border-color: var(--color-border);
}
.conversation-item.active {
    background-color: var(--color-bg-tertiary);
    border-color: var(--color-accent);
}
.conversation-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text-primary);
}
.conversation-meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.conversation-delete {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.conversation-delete:hover {
    color: var(--color-error);
    background-color: rgba(220, 38, 38, 0.1);
}

/* --- Professional UI Enhancements --- */
/* Chat message bubble shadows */
#messages-container > div.self-end {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}
#messages-container > div.self-start {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Professional button styling */
.btn-primary {
    background: var(--color-accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Send button icon subtle move */
#send-button i {
    transition: transform 0.2s ease;
}
#send-button:hover i {
    transform: translateX(2px);
} 

/* --- Professional Chat Bubble Styles --- */
.bubble-user, .bubble-assistant {
    position: relative;
    border-radius: 12px;
}

.bubble-user {
    background: var(--color-accent);
    color: white;
}

.bubble-assistant {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
}

/* Subtle bubble tails */
.bubble-user::after, .bubble-assistant::after {
    content: '';
    position: absolute;
    top: 12px;
    width: 0; height: 0;
    border-style: solid;
}

.bubble-user::after {
    right: -6px;
    border-width: 6px 0 6px 6px;
    border-color: transparent transparent transparent var(--color-accent);
}

.bubble-assistant::after {
    left: -6px;
    border-width: 6px 6px 6px 0;
    border-color: transparent var(--color-bg-primary) transparent transparent;
}

/* RTL support */
html[dir="rtl"] body {
    direction: rtl;
}

html[dir="rtl"] .bubble-user::after {
    left: -6px;
    right: auto;
    border-width: 6px 6px 6px 0;
    border-color: transparent var(--color-accent) transparent transparent;
}

html[dir="rtl"] .bubble-assistant::after {
    right: -6px;
    left: auto;
    border-width: 6px 0 6px 6px;
    border-color: transparent transparent transparent var(--color-bg-primary);
}

/* Professional thinking indicator and events styling */
#thinking-indicator {
    margin-bottom: 1rem;
}

#thinking-events {
    max-height: 200px;
    overflow-y: auto;
    border-top: 1px solid var(--color-border);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    scroll-behavior: smooth;
}

.thinking-step {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.875rem;
    line-height: 1.4;
    opacity: 0;
    animation: fadeInSlide 0.3s ease-out forwards;
    color: var(--color-text-secondary);
}

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

.thinking-icon {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
    font-size: 0.75rem;
}

.thinking-step.planning-phase {
    color: var(--color-accent);
    font-weight: 500;
}

.thinking-step.planning-complete {
    color: var(--color-success);
    font-weight: 500;
}

.thinking-step.task-execution {
    color: #8b5cf6;
    font-weight: 500;
}

.thinking-step.task-complete {
    color: var(--color-success);
}

.thinking-step.reflection {
    color: var(--color-text-muted);
    font-style: italic;
}

.thinking-step.finalizing {
    color: var(--color-warning);
    font-weight: 600;
}

.thinking-step.reasoning {
    color: var(--color-text-secondary);
    font-style: italic;
}

.thinking-step.tool-call {
    color: #8b5cf6;
    font-weight: 500;
}

.thinking-step.tool-result {
    color: var(--color-success);
}

.thinking-step.tool-error {
    color: var(--color-error);
}

.thinking-step.planner {
    color: var(--color-accent);
    font-weight: 600;
}

.thinking-step.planner-task {
    color: #6366f1;
    margin-left: 1rem;
}

.thinking-step.context-trim {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.tasks-list {
    margin-top: 0.5rem;
    margin-left: 1rem;
    border-left: 2px solid var(--color-border);
    padding-left: 0.75rem;
}

.task-item {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin: 0.25rem 0;
}

/* Enhanced thinking indicator animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.95;
        transform: scale(1.01);
    }
}

/* Professional progress indicator */
.progress-indicator {
    background: var(--color-bg-tertiary);
    height: 4px;
    border-radius: 2px;
    margin: 8px 0;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--color-accent), #2563eb);
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Professional form inputs */
input, textarea, select {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    border-radius: 8px;
    transition: all 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Professional modal styling */
.modal-content {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .thinking-step {
        font-size: 0.85em;
    }
    
    .tasks-list {
        margin-left: 20px;
    }
    
    .example-card {
        padding: 1rem;
    }
} 