/**
 * Aamir Khan - Market Intelligence CSS
 * Styles for all market intelligence tools and exercises
 */

/* Base container styles */
.aamir-market-intelligence {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Tool navigation */
.market-intelligence-tools {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.aamir-tool-btn {
    padding: 12px 24px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.aamir-tool-btn:hover {
    background: #34495e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.aamir-tool-btn.active {
    background: #3498db;
}

/* Industry Mapping Styles */
.aamir-industry-mapping {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.industry-mapping-container {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 20px;
    margin: 20px 0;
    min-height: 500px;
}

.industries-panel,
.trends-panel {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.industries-panel h4,
.trends-panel h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
}

.industry-node,
.trend-item {
    background: #3498db;
    color: white;
    padding: 10px 15px;
    margin: 8px 0;
    border-radius: 6px;
    cursor: move;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
}

.industry-node:hover,
.trend-item:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.trend-item {
    background: #27ae60;
}

.trend-item:hover {
    background: #229954;
}

.mapping-canvas {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 20px;
}

.canvas-area {
    position: relative;
    height: 100%;
    min-height: 400px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    overflow: hidden;
}

.canvas-area .industry-node,
.canvas-area .trend-item {
    position: absolute !important;
    z-index: 10;
}

.canvas-area .industry-node.connecting {
    box-shadow: 0 0 0 3px #3498db;
}

.connection-line {
    position: absolute;
    height: 2px;
    background: #7f8c8d;
    transform-origin: 0 0;
    z-index: 5;
}

.connection-line.temp {
    background: #e74c3c;
    opacity: 0.7;
}

.mapping-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.mapping-controls button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-validate-mapping {
    background: #27ae60;
    color: white;
}

.btn-validate-mapping:hover {
    background: #229954;
}

.btn-save-mapping {
    background: #3498db;
    color: white;
}

.btn-save-mapping:hover {
    background: #2980b9;
}

.btn-reset-mapping {
    background: #e74c3c;
    color: white;
}

.btn-reset-mapping:hover {
    background: #c0392b;
}

.mapping-score {
    text-align: center;
    margin: 20px 0;
}

.mapping-score h4 {
    font-size: 24px;
    color: #2c3e50;
    margin: 10px 0;
}

#mapping-score-value {
    color: #3498db;
    font-weight: bold;
}

.score-feedback {
    margin: 10px 0;
}

.score-feedback p {
    padding: 15px;
    border-radius: 6px;
    margin: 0;
}

.score-feedback .success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.score-feedback .good {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.score-feedback .improve {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Competitive Positioning Styles */
.aamir-competitive-positioning {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.positioning-setup {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.positioning-setup label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #2c3e50;
}

.positioning-setup input,
.positioning-setup select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.positioning-matrix {
    position: relative;
    margin: 30px 0;
}

.matrix-labels {
    position: relative;
    height: 40px;
}

.y-axis-label {
    position: absolute;
    left: -60px;
    top: 200px;
    transform: rotate(-90deg);
    font-weight: 600;
    color: #7f8c8d;
}

.x-axis-label {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 600;
    color: #7f8c8d;
}

.matrix-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    background: #7f8c8d;
    padding: 2px;
    height: 400px;
    position: relative;
}

.quadrant {
    background: white;
    padding: 20px;
    position: relative;
}

.quadrant h5 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 18px;
}

.quadrant p {
    margin: 0 0 15px 0;
    color: #7f8c8d;
    font-size: 12px;
}

.quadrant[data-quadrant="stars"] {
    background: #e8f8f5;
}

.quadrant[data-quadrant="question-marks"] {
    background: #ebf5fb;
}

.quadrant[data-quadrant="cash-cows"] {
    background: #fef9e7;
}

.quadrant[data-quadrant="dogs"] {
    background: #fadbd8;
}

.drop-zone {
    min-height: 200px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 10px;
}

.drop-zone.drop-hover {
    background: rgba(52, 152, 219, 0.1);
    border-color: #3498db;
}

.competitors-list {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.competitor-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.competitor-item {
    background: #3498db;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: move;
    font-size: 14px;
    transition: all 0.3s ease;
}

.competitor-item:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.btn-add-competitor {
    padding: 8px 16px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-add-competitor:hover {
    background: #7f8c8d;
}

.analysis-results {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.analysis-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.analysis-section h5 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.analysis-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

/* Disruption Timeline Styles */
.aamir-disruption-timeline {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.timeline-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
}

.timeline-track {
    position: relative;
    margin: 40px 0;
}

.timeline-years {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 20px;
}

.year-marker {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.timeline-events {
    display: flex;
    height: 120px;
    background: #ecf0f1;
    border-radius: 8px;
    padding: 10px;
    gap: 5px;
}

.timeline-dropzone {
    flex: 1;
    border: 2px dashed #bdc3c7;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.timeline-dropzone.dropzone-hover {
    background: rgba(52, 152, 219, 0.1);
    border-color: #3498db;
}

.disruption-events-panel {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.disruption-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.disruption-event {
    background: #34495e;
    color: white;
    padding: 12px;
    border-radius: 6px;
    cursor: move;
    text-align: center;
    transition: all 0.3s ease;
}

.disruption-event:hover {
    background: #2c3e50;
    transform: scale(1.05);
}

.event-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 5px;
}

.event-name {
    font-size: 12px;
    font-weight: 600;
}

.timeline-impact-analysis {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.impact-metrics {
    margin: 20px 0;
}

.metric {
    margin: 15px 0;
}

.metric label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.impact-slider {
    width: 100%;
    margin: 10px 0;
}

.impact-value {
    color: #3498db;
    font-weight: bold;
}

.dynamics-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Market Attractiveness Scorer Styles */
.aamir-market-attractiveness {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.market-setup {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.market-setup label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.market-setup input,
.market-setup select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.scoring-criteria {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.criteria-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.criteria-item h5 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
}

.criteria-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.weight-input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.score-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-slider {
    flex: 1;
}

.score-display {
    font-weight: bold;
    color: #3498db;
    min-width: 20px;
    text-align: center;
}

.criteria-notes textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 60px;
    font-size: 13px;
}

.weight-validator {
    text-align: center;
    margin: 20px 0;
}

#total-weight {
    font-weight: bold;
    color: #3498db;
}

.weight-warning {
    color: #e74c3c;
    font-weight: 600;
    margin-top: 5px;
}

.attractiveness-results {
    margin-top: 30px;
}

.btn-calculate-score {
    display: block;
    margin: 0 auto;
    padding: 12px 30px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-calculate-score:hover:not(:disabled) {
    background: #229954;
}

.btn-calculate-score:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.results-display {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-top: 20px;
}

.score-meter {
    text-align: center;
    margin: 20px 0;
}

.score-value {
    font-size: 48px;
    font-weight: bold;
    color: #2c3e50;
}

.score-bar {
    width: 100%;
    height: 30px;
    background: #ecf0f1;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.score-fill {
    height: 100%;
    background: linear-gradient(to right, #e74c3c, #f39c12, #27ae60);
    transition: width 0.5s ease;
}

.score-interpretation {
    font-size: 20px;
    font-weight: 600;
    color: #7f8c8d;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.breakdown-table th,
.breakdown-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.breakdown-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.recommendations {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.recommendation-list {
    margin: 10px 0;
    padding-left: 20px;
}

.recommendation-list li {
    margin: 8px 0;
    color: #2c3e50;
}

.btn-save-analysis,
.btn-export-pdf {
    margin: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save-analysis {
    background: #3498db;
    color: white;
}

.btn-save-analysis:hover {
    background: #2980b9;
}

.btn-export-pdf {
    background: #95a5a6;
    color: white;
}

.btn-export-pdf:hover {
    background: #7f8c8d;
}

/* Trend Impact Analyzer Styles */
.aamir-trend-impact {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.trend-selector {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.trend-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.trend-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trend-checkboxes label:hover {
    background: #e9ecef;
}

.trend-checkboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.industry-impact-matrix {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.impact-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.impact-table th,
.impact-table td {
    padding: 12px;
    border: 1px solid #e9ecef;
}

.impact-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.impact-table select,
.impact-table input[type="range"] {
    width: 100%;
}

.trend-opportunities {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.opportunity-generator {
    margin-top: 15px;
}

.btn-generate-opportunities {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-generate-opportunities:hover {
    background: #2980b9;
}

.opportunities-list {
    margin-top: 20px;
}

.opportunity-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.opportunity-item h5 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.opportunity-trends {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 10px;
}

/* Competitive Moat Evaluator Styles */
.aamir-competitive-moat {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.company-input {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.company-input label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.company-input input,
.company-input select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.moat-factors {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
}

.moat-factor {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.moat-factor h5 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.moat-factor p {
    margin: 0 0 15px 0;
    color: #7f8c8d;
    font-size: 14px;
}

.factor-evaluation {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.moat-strength {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.factor-evidence {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 60px;
}

.moat-durability {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.durability-factors {
    margin-top: 15px;
}

.durability-factors label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    cursor: pointer;
}

.moat-evaluation-results {
    margin-top: 30px;
}

.btn-evaluate-moat {
    display: block;
    margin: 0 auto;
    padding: 12px 30px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

.btn-evaluate-moat:hover {
    background: #229954;
}

.moat-results {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-top: 20px;
}

.moat-score-visual {
    text-align: center;
    margin: 20px 0;
}

.moat-rating {
    margin: 20px 0;
}

.rating-label {
    font-size: 18px;
    color: #7f8c8d;
}

.rating-value {
    font-size: 36px;
    font-weight: bold;
    color: #2c3e50;
    display: block;
    margin-top: 10px;
}

.moat-summary,
.investment-implications {
    margin: 30px 0;
}

.moat-summary h5,
.investment-implications h5 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.summary-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.implications-list {
    margin: 10px 0;
    padding-left: 20px;
}

.implications-list li {
    margin: 8px 0;
    color: #2c3e50;
}

.btn-save-moat-analysis {
    display: block;
    margin: 20px auto 0;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-save-moat-analysis:hover {
    background: #2980b9;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #7f8c8d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .industry-mapping-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .matrix-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .positioning-setup,
    .market-setup,
    .company-input {
        flex-direction: column;
    }
    
    .criteria-grid {
        grid-template-columns: 1fr;
    }
    
    .trend-checkboxes {
        grid-template-columns: 1fr;
    }
}

/* Print styles */
@media print {
    .btn-save-analysis,
    .btn-export-pdf,
    .btn-calculate-score,
    .btn-evaluate-moat,
    .mapping-controls {
        display: none;
    }
    
    .aamir-market-intelligence {
        max-width: 100%;
    }
}