/* Business Model Canvas Analysis Styles */

/* Results Overlay Styles */
.business-canvas-results-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8fafc;
    z-index: 10000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

.business-canvas-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 1rem 1.5rem;
    position: relative;
    top: 0;
    z-index: 1001;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.business-canvas-header .header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.business-canvas-header .analysis-title h1 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.business-canvas-header .analysis-subtitle {
    opacity: 0.85;
    font-size: 0.85rem;
}

.business-canvas-header .header-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.business-canvas-header .action-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}

.business-canvas-header .action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.business-canvas-header .input-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.business-canvas-header .summary-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.business-canvas-header .summary-card strong {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

/* Input Summary Toggle */
.business-canvas-header .input-summary-wrapper {
    margin-top: 0.5rem;
}

.business-canvas-header .toggle-summary-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}

.business-canvas-header .toggle-summary-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.business-canvas-header .toggle-icon {
    transition: transform 0.2s ease;
    font-size: 0.7rem;
}

.business-canvas-header .input-summary.collapsed {
    display: none;
}

.business-canvas-header .input-summary:not(.collapsed) {
    display: grid;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

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

/* Content Styles */
.business-canvas-content {
    max-width: 1600px;
    padding: 2rem;
    margin: 0 auto;
}

/* Analysis Tabs */
.analysis-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: wrap;
}

.analysis-tab {
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.analysis-tab:hover {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.05);
}

.analysis-tab.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    background: rgba(79, 70, 229, 0.05);
}

.analysis-tab-content {
    min-height: 600px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeInPanel 0.3s ease-out;
}

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

/* Canvas Panel - 9 Building Blocks Grid */
.canvas-panel {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.canvas-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* grid-template-rows: repeat(4, 1fr); */
    gap: 1rem;
    min-height: 800px;
}

.canvas-block {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.canvas-block:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.canvas-block h3 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.canvas-content {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #475569;
}

/* Specific positioning for BMC blocks */
.key-partners {
    grid-column: 1;
    grid-row: 1 / 3;
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 20%);
    border-color: #f59e0b;
}

.key-activities {
    grid-column: 2;
    grid-row: 1;
    background: linear-gradient(135deg, #ecfdf5 0%, #10b981 20%);
    border-color: #059669;
}

.key-resources {
    grid-column: 2;
    grid-row: 2;
    background: linear-gradient(135deg, #ecfdf5 0%, #10b981 20%);
    border-color: #059669;
}

.value-propositions {
    grid-column: 3;
    grid-row: 1 / 3;
    background: linear-gradient(135deg, #ede9fe 0%, #8b5cf6 20%);
    border-color: #7c3aed;
    font-weight: 500;
}

.customer-relationships {
    grid-column: 4;
    grid-row: 1;
    background: linear-gradient(135deg, #fce7f3 0%, #ec4899 20%);
    border-color: #db2777;
}

.channels {
    grid-column: 4;
    grid-row: 2;
    background: linear-gradient(135deg, #fce7f3 0%, #ec4899 20%);
    border-color: #db2777;
}

.customer-segments {
    grid-column: 5;
    grid-row: 1 / 3;
    background: linear-gradient(135deg, #dbeafe 0%, #3b82f6 20%);
    border-color: #2563eb;
}

.cost-structure {
    grid-column: 1 / 3;
    grid-row: 3;
    background: linear-gradient(135deg, #fee2e2 0%, #ef4444 20%);
    border-color: #dc2626;
}

.revenue-streams {
    grid-column: 3 / 6;
    grid-row: 3;
    background: linear-gradient(135deg, #dcfce7 0%, #22c55e 20%);
    border-color: #16a34a;
}

/* Value and segment highlighting */
.value-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.value-tag {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.segment-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.segment-tag {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Analysis Panel */
.analysis-panel {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.analysis-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.analysis-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #4f46e5;
}

.analysis-section h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
}

.analysis-content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #475569;
}

/* Implementation Panel */
.implementation-panel {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.phase-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.phase-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s;
}

.phase-card:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.phase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.75rem;
}

.phase-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
}

.phase-duration {
    background: #4f46e5;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.phase-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.phase-objective,
.phase-deliverables,
.phase-metrics {
    font-size: 0.85rem;
}

.phase-objective strong,
.phase-deliverables strong,
.phase-metrics strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #1e293b;
    font-weight: 600;
}

.phase-objective p {
    margin: 0;
    color: #475569;
    line-height: 1.5;
}

.phase-deliverables ul,
.phase-metrics ul {
    margin: 0;
    padding-left: 1rem;
    color: #475569;
    line-height: 1.5;
}

.action-items-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.action-items-section h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
}

.action-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.action-item {
    background: #fefce8;
    border: 1px solid #eab308;
    border-radius: 6px;
    padding: 1rem;
}

.action-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.action-details {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #64748b;
}

.action-owner,
.action-timeline {
    font-weight: 500;
}

/* Visual Panel */
.visuals-panel {
    background: white;
    border-radius: 12px;
    padding: 0rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.diagram-section {
    margin-bottom: 3rem;
}

.diagram-section h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

.diagram-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
}

.mermaid-diagram {
    text-align: center;
    margin-bottom: 1rem;
}

.download-diagram-btn {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}

.download-diagram-btn:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

.diagram-error {
    color: #dc2626;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* Modal Styles */
.business-canvas-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
}

.modal-body p {
    margin: 0 0 1.5rem 0;
    color: #64748b;
    line-height: 1.6;
}

.input-section {
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1e293b;
}

.text-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    resize: vertical;
    font-family: inherit;
}

.text-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-help {
    margin-top: 0.25rem;
}

.input-help small {
    color: #64748b;
    font-size: 0.8rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.cancel-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.cancel-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.analyze-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.analyze-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .canvas-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        gap: 1rem;
    }
    
    .key-partners,
    .value-propositions,
    .customer-segments,
    .cost-structure,
    .revenue-streams {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 768px) {
    .business-canvas-content {
        padding: 1rem;
    }
    
    .canvas-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .analysis-sections {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .phase-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .business-canvas-header .input-summary {
        grid-template-columns: 1fr;
    }
    
    .business-canvas-header .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .analysis-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .modal-body {
        padding: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .action-items {
        grid-template-columns: 1fr;
    }
} 