/* Athena Jazz Module - Rev 1.5 CSS */
/* Vignette 2 Dark Theme Styling */

:root {
    --athena-bg: #1a1a1a;
    --athena-card-bg: #2d2d2d;
    --athena-text: #ffffff;
    --athena-text-muted: #b0b0b0;
    --athena-accent: #4a9eff;
    --athena-accent-hover: #3a8eef;
    --athena-green: #00d084;
    --athena-orange: #ff6b35;
    --athena-red: #ff4757;
    --athena-purple: #a55eea;
    --athena-border: #404040;
    --athena-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --athena-radius: 8px;
    --font-stack: "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.athena-module {
    font-family: var(--font-stack);
    background: var(--athena-bg);
    color: var(--athena-text);
    padding: 24px;
    min-height: 100vh;
    line-height: 1.5;
}

/* Header Section */
.athena-header {
    margin-bottom: 32px;
}

.athena-title {
    text-align: center;
    margin-bottom: 24px;
}

.athena-title h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--athena-accent);
}

.athena-title p {
    font-size: 1.2rem;
    color: var(--athena-text-muted);
    margin: 0;
}

/* Track Selector */
.track-selector {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.track-btn {
    background: var(--athena-card-bg);
    border: 2px solid var(--athena-border);
    color: var(--athena-text);
    padding: 12px 20px;
    border-radius: var(--athena-radius);
    font-family: var(--font-stack);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.track-btn:hover {
    border-color: var(--athena-accent);
    background: rgba(74, 158, 255, 0.1);
}

.track-btn.active {
    background: var(--athena-accent);
    border-color: var(--athena-accent);
    color: white;
}

/* Context Editor */
.context-editor {
    background: var(--athena-card-bg);
    border-radius: var(--athena-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--athena-shadow);
}

.context-controls {
    display: flex;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.context-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.context-field label {
    font-weight: 500;
    color: var(--athena-text-muted);
    font-size: 0.9rem;
}

.context-field select {
    background: var(--athena-bg);
    border: 1px solid var(--athena-border);
    color: var(--athena-text);
    padding: 8px 12px;
    border-radius: var(--athena-radius);
    font-family: var(--font-stack);
}

.save-context-btn, .export-json-btn {
    background: var(--athena-accent);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: var(--athena-radius);
    font-family: var(--font-stack);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.save-context-btn:hover, .export-json-btn:hover {
    background: var(--athena-accent-hover);
}

/* Current Context Display */
.current-context {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.context-chip {
    background: var(--athena-accent);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Status Pills */
.status-pills {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.status-pill {
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pill.ready {
    background: var(--athena-green);
    color: white;
}

.status-pill.metadata {
    background: var(--athena-orange);
    color: white;
}

.status-pill.warning {
    background: var(--athena-red);
    color: white;
}

/* Main Grid Layout */
.athena-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .athena-grid {
        grid-template-columns: 1fr;
    }
}

.athena-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Sections */
.athena-section {
    background: var(--athena-card-bg);
    border-radius: var(--athena-radius);
    box-shadow: var(--athena-shadow);
    overflow: hidden;
}

.section-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid var(--athena-border);
}

.section-badge {
    display: flex;
    align-items: center;
    gap: 16px;
}

.badge-icon {
    font-size: 2rem;
}

.badge-content h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--athena-accent);
}

.badge-content p {
    margin: 4px 0 0 0;
    color: var(--athena-text-muted);
    font-size: 0.9rem;
}

.section-status {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.time-badge {
    background: var(--athena-green);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.theory {
    background: rgba(165, 94, 234, 0.2);
    color: var(--athena-purple);
    border: 1px solid var(--athena-purple);
}

.status-badge.capture {
    background: rgba(74, 158, 255, 0.2);
    color: var(--athena-accent);
    border: 1px solid var(--athena-accent);
}

.status-badge.ready {
    background: rgba(0, 208, 132, 0.2);
    color: var(--athena-green);
    border: 1px solid var(--athena-green);
}

/* Badge Pills */
.badge-pill {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-pill.auth {
    background: var(--athena-purple);
    color: white;
}

.badge-pill.progress {
    background: var(--athena-orange);
    color: white;
}

/* Drawers (Inline) */
.drawer-content {
    border-top: 1px solid var(--athena-border);
    background: rgba(0, 0, 0, 0.2);
}

.drawer-body {
    padding: 20px;
}

.drawer-body h4 {
    margin: 0 0 12px 0;
    color: var(--athena-accent);
    font-size: 1.1rem;
}

.theory-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.theory-checklist li {
    padding: 6px 0;
    color: var(--athena-text-muted);
    position: relative;
    padding-left: 20px;
}

.theory-checklist li::before {
    content: "•";
    color: var(--athena-accent);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.practice-flow {
    margin-top: 16px;
    padding: 12px;
    background: rgba(74, 158, 255, 0.1);
    border-radius: var(--athena-radius);
}

.practice-flow h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
}

.practice-flow p {
    margin: 0;
    color: var(--athena-text-muted);
    font-size: 0.9rem;
}

.drawer-tooltip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--athena-radius);
}

.tooltip-icon {
    opacity: 0.7;
}

.tooltip-text {
    font-size: 0.85rem;
    color: var(--athena-text-muted);
}

/* MakerDNA Specific */
.makerdna-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.makerdna-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--athena-bg);
    border: 1px solid var(--athena-border);
    color: var(--athena-text);
    padding: 12px 16px;
    border-radius: var(--athena-radius);
    font-family: var(--font-stack);
    cursor: pointer;
    transition: all 0.3s ease;
}

.makerdna-btn:hover {
    border-color: var(--athena-accent);
    background: rgba(74, 158, 255, 0.1);
}

.btn-icon {
    margin-right: 8px;
}

.badge-state {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-state.new {
    background: var(--athena-green);
    color: white;
}

.badge-state.pending {
    background: var(--athena-orange);
    color: white;
}

.makerdna-caveat {
    padding: 12px;
    background: rgba(165, 94, 234, 0.1);
    border-radius: var(--athena-radius);
    border-left: 3px solid var(--athena-purple);
}

.makerdna-caveat p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--athena-text-muted);
    line-height: 1.4;
}

/* Instrument Lanes */
.instrument-tabs {
    display: flex;
    background: var(--athena-card-bg);
    border-radius: var(--athena-radius);
    padding: 6px;
    gap: 4px;
    margin-bottom: 20px;
}

.lane-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--athena-text-muted);
    padding: 12px 16px;
    border-radius: calc(var(--athena-radius) - 2px);
    font-family: var(--font-stack);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lane-tab:hover {
    background: rgba(74, 158, 255, 0.1);
    color: var(--athena-text);
}

.lane-tab.active {
    background: var(--athena-accent);
    color: white;
}

/* Mentor Section */
.mentor-section {
    background: var(--athena-card-bg);
    border-radius: var(--athena-radius);
    padding: 20px;
    box-shadow: var(--athena-shadow);
    margin-bottom: 20px;
}

.mentor-prompt h4,
.mentor-checklist h4 {
    margin: 0 0 12px 0;
    color: var(--athena-accent);
    font-size: 1.1rem;
}

#mentorText {
    color: var(--athena-text-muted);
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

#mentorChecklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

#mentorChecklist li {
    padding: 6px 0 6px 20px;
    color: var(--athena-text-muted);
    position: relative;
}

#mentorChecklist li::before {
    content: "✓";
    color: var(--athena-green);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Review Slot */
.review-slot {
    background: var(--athena-card-bg);
    border-radius: var(--athena-radius);
    padding: 20px;
    box-shadow: var(--athena-shadow);
}

.review-slot h4 {
    margin: 0 0 12px 0;
    color: var(--athena-accent);
    font-size: 1.1rem;
}

#reviewTextarea {
    width: 100%;
    background: var(--athena-bg);
    border: 1px solid var(--athena-border);
    color: var(--athena-text);
    padding: 12px;
    border-radius: var(--athena-radius);
    font-family: monospace;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 16px;
}

.review-table-container {
    overflow-x: auto;
    border-radius: var(--athena-radius);
    border: 1px solid var(--athena-border);
}

.review-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--athena-bg);
    font-size: 0.85rem;
}

.review-table th,
.review-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--athena-border);
}

.review-table th {
    background: var(--athena-card-bg);
    color: var(--athena-accent);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-table td {
    color: var(--athena-text-muted);
}

/* Action Buttons */
.capture-actions,
.performance-actions {
    padding: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.primary-btn {
    background: var(--athena-accent);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: var(--athena-radius);
    font-family: var(--font-stack);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    flex: 1;
    min-width: 140px;
}

.primary-btn:hover {
    background: var(--athena-accent-hover);
}

.secondary-btn {
    background: var(--athena-card-bg);
    border: 1px solid var(--athena-border);
    color: var(--athena-text);
    padding: 12px 20px;
    border-radius: var(--athena-radius);
    font-family: var(--font-stack);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 140px;
}

.secondary-btn:hover {
    border-color: var(--athena-accent);
    background: rgba(74, 158, 255, 0.1);
}

/* Rights Strip */
.rights-strip {
    background: var(--athena-card-bg);
    border-radius: var(--athena-radius);
    padding: 16px;
    box-shadow: var(--athena-shadow);
    border-left: 4px solid var(--athena-green);
}

.rights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.rights-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--athena-accent);
}

.rights-status {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.rights-status.active {
    background: var(--athena-green);
    color: white;
}

.rights-content p {
    margin: 4px 0;
    font-size: 0.85rem;
    color: var(--athena-text-muted);
}

.rights-content strong {
    color: var(--athena-text);
}

/* LLM Panel */
.llm-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: var(--athena-card-bg);
    border-radius: var(--athena-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--athena-border);
    z-index: 1000;
}

.llm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--athena-border);
}

.llm-header h4 {
    margin: 0;
    color: var(--athena-accent);
    font-size: 1rem;
}

.llm-toggle {
    background: none;
    border: none;
    color: var(--athena-text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.llm-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.llm-content {
    height: 300px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.assistant-message {
    background: rgba(74, 158, 255, 0.1);
    border-radius: var(--athena-radius);
    padding: 12px;
    margin-bottom: 12px;
}

.assistant-message p {
    margin: 0;
    color: var(--athena-text);
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-input {
    display: flex;
    padding: 16px;
    border-top: 1px solid var(--athena-border);
    gap: 8px;
}

#chatInput {
    flex: 1;
    background: var(--athena-bg);
    border: 1px solid var(--athena-border);
    color: var(--athena-text);
    padding: 8px 12px;
    border-radius: var(--athena-radius);
    font-family: var(--font-stack);
}

.send-btn {
    background: var(--athena-accent);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: var(--athena-radius);
    font-family: var(--font-stack);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.send-btn:hover {
    background: var(--athena-accent-hover);
}

/* Responsive Design */
@media (max-width: 768px) {
    .athena-module {
        padding: 16px;
    }
    
    .context-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .context-controls .save-context-btn,
    .context-controls .export-json-btn {
        align-self: stretch;
    }
    
    .llm-panel {
        position: relative;
        bottom: auto;
        right: auto;
        width: 100%;
        margin-top: 32px;
    }
    
    .instrument-tabs {
        flex-direction: column;
    }
    
    .capture-actions,
    .performance-actions {
        flex-direction: column;
    }
}

/* Transitions and Animations */
.drawer-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

.athena-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

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

::-webkit-scrollbar-track {
    background: var(--athena-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--athena-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--athena-text-muted);
}