/* ==========================================
   CLEANED: docs/css/awde-wizard.css
   WIZARD-SPECIFIC STYLES ONLY
   ========================================== */

/* ==========================================
   WIZARD LAYOUT
   ========================================== */

/* Status Bar Styles - FIXED: Not sticky, flows with content */
.wizard-status-bar {
    background: #1e293b;
    border-bottom: 2px solid #334155;
    padding: 0.75rem 1rem;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-bar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.status-bar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.status-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.status-label {
    color: #94a3b8;
    font-weight: 500;
}

.status-value {
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', monospace;
    background: #0f172a;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    border: 1px solid #334155;
}

#outputDirectoryDisplay {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#agentNameDisplay {
    font-weight: 600;
    color: #60a5fa;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.25rem;
}

.status-indicator.connected {
    background: #10b981;
    box-shadow: 0 0 4px #10b981;
}

.status-indicator.disconnected {
    background: #ef4444;
    box-shadow: 0 0 4px #ef4444;
}

.status-indicator.checking {
    background: #f59e0b;
    animation: pulse 2s infinite;
}

/* Backup Toggle in Status Bar */
.backup-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.backup-toggle label {
    color: #94a3b8;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    width: 36px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #475569;
    transition: 0.3s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #3b82f6;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(16px);
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Main container - no extra padding needed */
.main-container {
    padding-top: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .status-bar-container {
        gap: 1rem;
    }

    .status-item {
        font-size: 0.75rem;
    }

    #outputDirectoryDisplay {
        max-width: 200px;
    }

    .status-bar-left,
    .status-bar-right {
        width: 100%;
        justify-content: center;
    }
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid rgba(148, 163, 184, 0.2);
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 30px 25px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    text-align: center;
}

.sidebar-header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    /* Fallback */
}

.sidebar-header p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0;
}

/* Phase navigation in sidebar */
.phase-navigation {
    padding: 25px;
}

.phase-navigation h3 {
    color: #cbd5e1;
    font-size: 1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.phase-list {
    list-style: none;
}

.phase-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.phase-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #cbd5e1;
    border-color: rgba(59, 130, 246, 0.3);
}

.phase-link.active {
    background: rgba(59, 130, 246, 0.2);
    color: #f1f5f9;
    border-color: #3b82f6;
}

.phase-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

.phase-link.active .phase-number {
    background: #3b82f6;
    color: white;
}

/* Main wizard content */
.main-content {
    flex: 1;
    margin-left: 300px;
    padding: 40px;
    background: rgba(30, 41, 59, 0.3);
}

.wizard-header {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 12px;
    padding: 20px;
    /* Reduced from 30px */
    margin-bottom: 30px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* ==========================================
   WIZARD FORM SECTIONS
   ========================================== */

.form-section {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    display: none;
}

.form-section.active {
    display: block;
}

.section-title {
    background: rgba(15, 23, 42, 0.6);
    padding: 20px 30px;
    margin: 0;
    font-size: 1.3rem;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px 12px 0 0;
}

.section-description {
    padding: 15px 30px 0;
    color: #94a3b8;
    margin: 0;
}

.form-content {
    padding: 30px;
}

/* Make all form sections match agentDataSection styling */
.form-section {
    padding: 20px !important;
    margin: 20px 0 0 !important;
    background-color: rgba(30, 41, 59, 0.6) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

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

.nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.3);
    color: #cbd5e1;
}

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================
   WIZARD PHASE OVERVIEW
   ========================================== */

.phase-overview {
    background: rgba(30, 41, 59, 0.6);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.phase-overview h2 {
    margin: 0 0 15px 0;
    color: #f1f5f9;
    font-size: 1.4rem;
}

.phase-overview p {
    margin: 0;
    color: #94a3b8;
    line-height: 1.6;
}

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

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .wizard-header h1 {
        font-size: 1.8rem;
    }
}

/* Sidebar toggle for mobile */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
    }
}

/* ========================================
   PHASE 1-9 FORM STYLES
   ======================================== */
/* Additional styles for Phase 1-9 forms - Matching existing design */

/* Generation Prompt Card - Matching artifact-summary style */
.generation-prompt {
    margin: 2rem 0;
}

.prompt-card {
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.prompt-card h3 {
    color: #60a5fa;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.prompt-card p {
    color: #e2e8f0;
    line-height: 1.6;
    margin: 0.75rem 0;
}

.prompt-card ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.prompt-card li {
    color: #94a3b8;
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.prompt-card li:before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: #60a5fa;
}

/* Generation Results - Matching existing generation-status style */
.generation-results {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.generation-results h3 {
    color: #60a5fa;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.results-content {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.results-content pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.results-content code {
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Ensure Phase 1 textarea matches existing style */
#processNarrative {
    background: #1e293b;
    border: 1px solid #475569;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
}

#processNarrative:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

#processNarrative::placeholder {
    color: #64748b;
}

/* Keep generation status indicator animation */
.generation-status .status-indicator {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .prompt-card {
        padding: 1.5rem;
    }

    .results-content {
        max-height: 300px;
    }
}

.regenerate-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.regenerate-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.regenerate-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.artifact-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #374151;
}

.artifact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.artifact-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
}

/* ============================================
 * Pass indicator styles
 * ============================================ */

/* Updated pass indicator to support button */
.pass-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.pass-indicator .pass-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pass-indicator .pass-name {
    font-weight: 600;
    font-size: 14px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pass-indicator .pass-progress {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

/* Copy Output Button */
.copy-output-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.copy-output-btn:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.copy-output-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.copy-output-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toast animations */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Copy toast styling */
.copy-toast {
    position: fixed;
    bottom: 80px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 500;
}

.copy-toast-success {
    background: #10b981;
    color: white;
}

.copy-toast-error {
    background: #ef4444;
    color: white;
}

.copy-toast-info {
    background: #3b82f6;
    color: white;
}

/* ==========================================
   COMPACT WIZARD HEADER STYLES
   ========================================== */

.wizard-header-compact {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Agent Info Line */
.agent-info-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.agent-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0;
}

.agent-type-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agent-type-badge.workflow {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.agent-type-badge.task {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.agent-type-badge.service {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.agent-type-badge.interface {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.4);
}

.agent-domain {
    padding: 4px 12px;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 6px;
    font-size: 0.875rem;
    color: #94a3b8;
}

.path-indicator {
    font-size: 0.75rem;
    color: #64748b;
    font-family: 'Courier New', monospace;
    margin-left: auto;
}

/* Progress Bar Container */
.progress-bar-container {
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 4px;
    position: relative;
    overflow: visible;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-markers {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 2px;
}

.marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.3);
    border: 2px solid rgba(30, 41, 59, 0.8);
    transition: all 0.3s ease;
    cursor: pointer;
}

.marker.complete {
    background: #22c55e;
    border-color: #16a34a;
}

.marker.active {
    background: #3b82f6;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.progress-label {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-size: 0.875rem;
    color: #94a3b8;
}

/* ==========================================
   AGENT DATA SECTION STYLES
   ========================================== */

.agent-data-section {
    background: rgba(30, 41, 59, 0.6);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.agent-data-section .section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.agent-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.data-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.data-item.full-width {
    grid-column: 1 / -1;
}

.data-item label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* FIXED: Allow data values to wrap */
.data-value {
    font-size: 0.95rem;
    color: #e2e8f0;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

.goals-list {
    margin: 8px 0 0 0;
    padding: 0 0 0 20px;
    color: #cbd5e1;
}

.goals-list li {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .agent-info-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .path-indicator {
        margin-left: 0;
    }

    .agent-data-grid {
        grid-template-columns: 1fr;
    }
}