/**
 * Intelligent Agent UI Styles
 * Modern, conversational AI advocate interface
 */

.agent-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    color: white;
}

/* Agent Header */
.agent-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.agent-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.agent-avatar::before {
    content: "🛡️";  /* Shield emoji for AppealArmor instead of robot */
}

.agent-status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: #4ade80;
    border: 3px solid white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.agent-info h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.agent-status {
    margin: 0.25rem 0 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Timeline */
.agent-timeline {
    margin: 2rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.timeline-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.timeline-bar {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22d3ee);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}

/* Conversation */
.agent-conversation {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 2rem 0;
    color: #333;
    max-height: 500px;
    overflow-y: auto;
}

.messages-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    animation: slideIn 0.3s ease;
}

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

.agent-message .message-content {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 18px 18px 18px 4px;
    max-width: 85%;
}

.user-message .message-content {
    background: #f3f4f6;
    color: #333;
    padding: 1rem 1.25rem;
    border-radius: 18px 18px 4px 18px;
    max-width: 85%;
    margin-left: auto;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: 0.25rem;
}

.thinking-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #1e293b;  /* Dark background instead of yellow */
    border-left: 3px solid #667eea;  /* Purple accent instead of yellow */
    margin: 0.5rem 0;
    border-radius: 5px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.thinking-icon {
    font-size: 1.2rem;
}

.thinking-text {
    color: #f1f5f9;  /* Light text for good contrast */
    font-size: 0.9rem;
}

/* Research Panel */
.research-panel, .results-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 2rem 0;
    color: #333;
}

.research-panel h3, .results-panel h3 {
    margin-top: 0;
    color: #667eea;
    font-size: 1.25rem;
}

.research-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.research-task {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.research-task.completed {
    background: #f0fdf4;
    border-color: #86efac;
}

.task-icon {
    font-size: 1.5rem;
}

.task-info {
    flex: 1;
}

.task-name {
    font-weight: 600;
    color: #374151;
}

.task-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.task-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.checkmark {
    color: #4ade80;
    font-size: 1.2rem;
}

/* Research Findings */
.research-findings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.finding {
    background: #f9fafb;
    padding: 1.25rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.finding h4 {
    margin: 0 0 0.75rem 0;
    color: #374151;
    font-size: 1rem;
}

.finding ul {
    margin: 0;
    padding-left: 1.25rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.finding li {
    margin: 0.5rem 0;
}

/* Appeal Packet */
.appeal-packet {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    color: #333;
}

.appeal-packet h3 {
    margin-top: 0;
    color: #667eea;
    font-size: 1.5rem;
    text-align: center;
}

.packet-contents {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.packet-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.packet-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.packet-item .icon {
    font-size: 1.5rem;
}

.packet-item .label {
    flex: 1;
    font-weight: 500;
    color: #374151;
}

.view-btn {
    padding: 0.25rem 0.75rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.875rem;
}

.view-btn:hover {
    background: #5a67d8;
}

.download-packet-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.download-packet-btn:hover {
    transform: translateY(-2px);
}

/* Final Summary */
.final-summary {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 1.25rem;
    margin-top: 1rem;
}

.final-summary h4 {
    margin: 0 0 0.75rem 0;
    color: #14532d;
}

.final-summary p, .final-summary ul {
    color: #166534;
    margin: 0.5rem 0;
}

/* Extracted Data Summary */
.extracted-data-summary {
    background: #1e293b;  /* Dark background instead of yellow */
    color: #f1f5f9;  /* Light text for good contrast */
    padding: 1rem;
    border-radius: 8px;
    margin: 0.5rem 0;
    border: 1px solid #334155;
}

.extracted-data-summary p {
    margin: 0 0 0.75rem 0;
    font-weight: 500;
    color: #f1f5f9;
}

.extracted-data-summary ul {
    margin: 0;
    padding-left: 1.25rem;
}

.extracted-data-summary li {
    margin: 0.5rem 0;
    color: #cbd5e1;
}

/* Strategy Summary */
.strategy-summary {
    background: #e0e7ff;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.strategy-summary h4 {
    margin: 0 0 0.75rem 0;
    color: #3730a3;
}

.strategy-summary ul {
    margin: 0;
    padding-left: 1.25rem;
    color: #4c1d95;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .agent-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .research-findings {
        grid-template-columns: 1fr;
    }
    
    .packet-contents {
        grid-template-columns: 1fr;
    }
    
    .agent-conversation {
        max-height: 400px;
    }
}