/**
 * Claude Code for Bioinformatics - Researcher Interface Styles
 * Part of BiosampleDetails enhancement
 */

/* ========================================
   GRADIENT BACKGROUNDS
   ======================================== */

.bg-gradient-claude {
    background: linear-gradient(135deg, #D97757 0%, #A16B5E 100%);
}

.bg-gradient-variant {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

/* ========================================
   CURATED VARIANTS DISPLAY
   ======================================== */

.variant-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.variant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.5);
}

.variant-header {
    display: flex;
    align-items: start;
    gap: 1rem;
}

.variant-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.variant-gene {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 1.15rem;
    color: #667eea;
    letter-spacing: 0.02em;
}

.variant-change {
    font-family: 'Courier New', monospace;
    color: #666;
    font-size: 0.95rem;
}

.variant-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.badge-significance {
    background-color: #ffc107;
    color: #000;
}

.variant-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ========================================
   RESEARCHER PROFILE PROMPT
   ======================================== */

.researcher-profile-prompt {
    animation: slideInUp 0.5s ease-out;
}

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

/* ========================================
   CLAUDE CODE PANEL
   ======================================== */

.claude-code-panel {
    animation: fadeIn 0.6s ease-out;
}

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

.researcher-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================
   DATA SUMMARY STATS
   ======================================== */

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.5rem;
}

/* ========================================
   EXAMPLE QUESTIONS
   ======================================== */

.text-white-75 {
    color: rgba(255, 255, 255, 0.75);
}

.question-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.question-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(8px);
}

.question-card i {
    color: #667eea;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.question-card span {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* ========================================
   CHAT INTERFACE
   ======================================== */

.claude-chat {
    margin-top: 2rem;
}

.chat-messages {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    max-height: 450px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
    animation: messageSlideIn 0.3s ease-out;
}

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

.message i,
.message img {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

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

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.assistant-message .message-content {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px 18px 18px 4px;
    color: white;
}

.system-message .message-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    font-style: italic;
}

.error-message .message-content {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 10px;
    color: #ff6b6b;
}

.message-content {
    padding: 0.85rem 1.1rem;
    max-width: 75%;
    line-height: 1.6;
    word-wrap: break-word;
}

.message-content code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.typing-indicator {
    opacity: 0.7;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

.chat-input textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    resize: none;
}

.chat-input textarea:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #667eea;
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

.chat-input textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-claude {
    background: linear-gradient(135deg, #D97757 0%, #A16B5E 100%);
    color: white;
    border: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-claude:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 87, 0.4);
    color: white;
}

.btn-claude:active {
    transform: translateY(0);
}

.btn-claude img {
    filter: brightness(0) invert(1);
}

/* ========================================
   MODAL STYLES
   ======================================== */

.modal-header.bg-gradient-claude {
    color: white;
}

.modal-header.bg-gradient-claude .btn-close {
    filter: brightness(0) invert(1);
}

/* ========================================
   PIPELINE FLOW DIAGRAM
   ======================================== */

.pipeline-flow {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-left: 4px solid #667eea;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.flow-diagram {
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    color: #555;
    line-height: 2;
    font-size: 0.95rem;
}

.flow-step {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    margin: 0.5rem 0;
    border-left: 3px solid #667eea;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .variant-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .variant-actions {
        flex-direction: column;
    }

    .variant-actions button {
        width: 100%;
    }

    .researcher-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .message-content {
        max-width: 85%;
    }

    .question-card {
        padding: 0.85rem 1rem;
    }

    .question-card:hover {
        transform: translateX(4px);
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.btn-claude:focus,
.question-card:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .variant-card {
        border-width: 2px;
    }

    .message-content {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .variant-card,
    .question-card,
    .btn-claude,
    .message,
    .researcher-profile-prompt,
    .claude-code-panel {
        animation: none;
        transition: none;
    }

    .variant-card:hover,
    .question-card:hover,
    .btn-claude:hover {
        transform: none;
    }
}

/* Button pulse animation for highlighting */
@keyframes btn-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(13, 110, 253, 0);
    }
}

.btn-pulse {
    animation: btn-pulse 1s ease-in-out 3;
}
