/*
 * SLS Workflow Progress Phase Styles
 * Overall progress bars, step indicators, previous phases modal, AI working displays
 * Sprint 7.3: Extracted from monolithic sls-workflow-public.css
 */

/* ===========================================
   OVERALL WORKFLOW PROGRESS BAR
   Sprint 1.6 - Task 1.6.24
   =========================================== */

.sls-overall-progress {
    background: var(--sls-dark-gray);
    border-radius: var(--sls-border-radius);
    padding: 20px; /* Sprint 10: Reduced from 25px for tighter fit */
    margin-bottom: 15px; /* Sprint 10: Reduced from 20px for tighter viewport fit */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--sls-border);
    /* Sprint 10.1: Match width with phase containers (900px max) for consistent alignment */
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.sls-overall-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.sls-overall-progress-header {
    margin-bottom: 15px;
}

.sls-progress-step {
    font-size: 14px;
    color: var(--sls-text-muted);
    font-weight: 500;
}

.sls-progress-project-id {
    font-size: 12px;
    color: var(--sls-text-muted);
    font-weight: 400;
    opacity: 0.8;
}

.sls-progress-phase {
    font-size: 18px;
    color: var(--sls-blue);
    font-weight: 600;
}

.sls-overall-progress-bar {
    width: 100%;
    height: 12px;
    background: var(--sls-gray);
    border-radius: var(--sls-border-radius-xs);
    overflow: hidden;
    margin-bottom: 0;
}

.sls-overall-progress-fill {
    height: 100%;
    background: var(--sls-gradient-accent);
    transition: width 0.6s ease;
    border-radius: var(--sls-border-radius-xs);
}

.sls-overall-progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    /* Bug #3 Fix: Add spacing below progress bar to prevent overlap */
    margin-top: 15px;
}

/* Sprint 7 Bug Fix: Progress step dots (numbered circles 1-7) */
.sls-progress-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2c2f36;
    border: 2px solid #50545d;
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    transition: all 0.3s ease;
    position: relative;
}

.sls-progress-dot.completed {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

.sls-progress-dot.completed::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
}

.sls-progress-dot.current {
    background: var(--sls-gradient-accent);
    border-color: var(--sls-purple);
    color: #fff;
    box-shadow: 0 0 12px rgba(116, 79, 168, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.sls-step-indicator {
    flex: 1;
    text-align: center;
    transition: all 0.3s ease;
}

.sls-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sls-gray);
    color: var(--sls-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px auto;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid var(--sls-border);
}

.sls-step-label {
    font-size: 12px;
    color: var(--sls-text-gray);
    font-weight: 500;
    transition: color 0.3s ease;
}

.sls-step-indicator.completed .sls-step-number {
    background: var(--sls-blue);
    color: white;
    border-color: var(--sls-blue);
}

.sls-step-indicator.completed .sls-step-label {
    color: var(--sls-blue);
}

.sls-step-indicator.current .sls-step-number {
    background: var(--sls-gradient-primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(139, 162, 201, 0.2);
    transform: scale(1.1);
    border: none;
}

.sls-step-indicator.current .sls-step-label {
    color: var(--sls-blue);
    font-weight: 600;
}

/* ===========================================
   PREVIOUS PHASES MODAL
   Sprint 1.6 - Task 1.6.26
   =========================================== */

/* Previous Phases Button */
.sls-previous-phases-button-container {
    margin: 15px 0;
    text-align: center;
}

#sls-view-previous-phases {
    background: #f5f5f5;
    color: #555;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#sls-view-previous-phases:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

#sls-view-previous-phases .dashicons {
    font-size: 18px;
}

/* Modal Overlay and Container */
.sls-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
}

.sls-modal-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    z-index: 99999;
}

.sls-modal-content {
    position: relative;
    background: var(--sls-dark-gray);
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    margin: 5vh auto;
    border-radius: var(--sls-border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow-y: auto !important;
    z-index: 100000;
    border: 1px solid var(--sls-border);
}

/* Modal Header */
.sls-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid var(--sls-border);
    background: var(--sls-gradient-primary);
    border-radius: var(--sls-border-radius) var(--sls-border-radius) 0 0;
}

.sls-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: white;
}

.sls-modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    transition: all 0.2s;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.sls-modal-close:hover {
    color: #dc3232;
    background: rgba(220, 50, 50, 0.1);
}

.sls-modal-close:active {
    background: rgba(220, 50, 50, 0.2);
    transform: scale(0.95);
}

.sls-modal-close .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

/* Modal Body */
.sls-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Previous Phase Sections */
.sls-previous-phase-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.sls-previous-phase-section:last-child {
    border-bottom: none;
}

.sls-previous-phase-section h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: var(--sls-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sls-previous-phase-section .sls-checkmark {
    flex-shrink: 0;
}

.sls-previous-phase-content {
    background: var(--sls-gray);
    padding: 20px;
    border-radius: var(--sls-border-radius-sm);
    border-left: 4px solid var(--sls-blue);
}

/* Phase-Specific Styles */
.sls-phase-note {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
    font-style: italic;
}

.sls-no-data {
    color: #999;
    font-style: italic;
    margin: 10px 0;
}

/* Interview History */
.sls-conversation-list {
    max-height: 400px;
    overflow-y: auto;
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.sls-message {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 6px;
    background: #f5f5f5;
}

.sls-message.user {
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.sls-message.assistant {
    background: #f3e5f5;
    border-left: 3px solid #9c27b0;
}

.sls-message strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.sls-message p {
    margin: 0;
    line-height: 1.5;
}

/* Genre Selection */
.sls-genre-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sls-genre-tag {
    background: #007cba;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
}

/* Lyrics Display */
.sls-lyrics-box {
    background: white;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.sls-genre-used {
    margin-top: 15px;
    font-size: 14px;
    color: #555;
}

/* Production Display */
.sls-production-display p {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.6;
}

.sls-production-details {
    margin-top: 15px;
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.sls-production-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #007cba;
    user-select: none;
}

.sls-production-details summary:hover {
    color: #005a87;
}

.sls-production-full {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    line-height: 1.6;
}

/* Artwork Display */
.sls-artwork-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 15px auto;
}

/* Modal Footer */
.sls-modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
}

#sls-return-to-current {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    min-width: 160px;
    justify-content: center;
}

#sls-return-to-current:hover {
    background: #005a87;
}

#sls-return-to-current:active {
    background: #004a73;
    transform: scale(0.98);
}

/* Prevent body scroll when modal is open */
body.sls-modal-open {
    overflow: hidden;
}

/* ===========================================
   WORKFLOW PHASES - COMMON ELEMENTS
   Used across lyrics, production, artwork phases
   =========================================== */

.sls-workflow-interface {
    padding: 30px 20px;
}

.sls-phase-header h2 {
    font-size: 28px;
}

.sls-phase-header p {
    font-size: 16px;
}

.sls-ai-working-display {
    padding: 40px 20px;
}

.sls-ai-animation h3 {
    font-size: 22px;
}

.sls-ai-animation p {
    font-size: 16px;
}

.sls-spinner {
    width: 50px;
    height: 50px;
    border-width: 5px;
}

.sls-content-preview {
    padding: 25px 20px;
}

.sls-preview-success h3 {
    font-size: 24px;
}

.sls-success-icon {
    font-size: 48px;
}

.sls-preview-box {
    padding: 20px;
}

/* ===========================================
   MOBILE RESPONSIVE - PROGRESS
   =========================================== */

@media (max-width: 768px) {
    /* Overall Progress */
    .sls-overall-progress {
        padding: 20px 15px;
    }

    .sls-overall-progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .sls-progress-phase {
        font-size: 16px;
    }

    .sls-overall-progress-steps {
        gap: 4px;
    }

    .sls-step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .sls-step-label {
        font-size: 10px;
    }

    .sls-step-indicator.current .sls-step-number {
        box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2);
    }

    /* Previous Phases Modal */
    .sls-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 5vh auto;
        border-radius: 12px 12px 0 0;
    }

    .sls-modal-header {
        padding: 20px;
        -webkit-tap-highlight-color: transparent;
    }

    .sls-modal-header h2 {
        font-size: 20px;
        padding-right: 10px;
    }

    .sls-modal-close {
        min-width: 48px;
        min-height: 48px;
        padding: 12px;
    }

    .sls-modal-close .dashicons {
        width: 24px;
        height: 24px;
    }

    .sls-modal-body {
        padding: 20px;
        scroll-behavior: smooth;
    }

    .sls-previous-phase-section h3 {
        font-size: 18px;
    }

    .sls-previous-phase-content {
        padding: 15px;
        -webkit-tap-highlight-color: rgba(0, 124, 186, 0.1);
    }

    .sls-conversation-list {
        max-height: 300px;
    }

    .sls-lyrics-box {
        max-height: 300px;
        font-size: 13px;
    }

    .sls-modal-footer {
        padding: 20px;
        position: sticky;
        bottom: 0;
        background: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    #sls-return-to-current {
        width: 100%;
        font-size: 16px;
        padding: 14px 24px;
        min-height: 52px;
    }

    .sls-modal-overlay {
        -webkit-tap-highlight-color: transparent;
    }

    /* Workflow Phase Common Elements */
    .sls-workflow-interface {
        padding: 20px 15px;
    }

    .sls-phase-header h2 {
        font-size: 22px;
    }

    .sls-phase-header p {
        font-size: 14px;
    }

    .sls-ai-working-display {
        padding: 30px 15px;
    }

    .sls-ai-animation h3 {
        font-size: 18px;
    }

    .sls-ai-animation p {
        font-size: 14px;
    }

    .sls-spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }

    .sls-content-preview {
        padding: 20px 15px;
    }

    .sls-preview-success h3 {
        font-size: 20px;
    }

    .sls-success-icon {
        font-size: 36px;
    }

    .sls-preview-box {
        padding: 15px;
    }
}

/* Very Small Mobile - Sprint 1.6 Task 1.6.30 */
@media (max-width: 480px) {
    /* Hide horizontal progress stepper on mobile */
    .sls-overall-progress-steps {
        display: none !important;
    }

    .sls-progress-phase {
        font-size: 18px !important;
        font-weight: 600 !important;
    }

    .sls-progress-step {
        font-size: 15px !important;
    }

    /* Previous Phases Modal */
    .sls-modal-content {
        width: 100%;
        max-height: 95vh;
        margin: 5vh 0 0 0;
        border-radius: 16px 16px 0 0;
    }

    .sls-modal-header {
        padding: 16px;
    }

    .sls-modal-header h2 {
        font-size: 18px;
    }

    .sls-modal-body {
        padding: 16px;
    }

    .sls-modal-footer {
        padding: 16px;
    }

    #sls-return-to-current {
        min-height: 48px;
        font-size: 15px;
    }
}
