/**
 * Helen Deal Analysis CSS
 */

/* Font Awesome Icon Support */
.helen-tool-button i,
.sfpe-tool-icon i {
    font-size: 24px;
    color: #6CFFC4;
}

/* Tool Overlay */
.helen-tool-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.helen-tool-overlay.active {
    opacity: 1;
}

/* Tool Container */
.helen-tool-container {
    background: #FFFFE7;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    max-height: 800px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.helen-tool-overlay.active .helen-tool-container {
    transform: scale(1);
}

/* Tool Header */
.helen-tool-header {
    background: linear-gradient(135deg, #0D353E 0%, #1a5a66 100%);
    color: #6CFFC4;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.helen-tool-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.helen-tool-close {
    background: none;
    border: none;
    color: #6CFFC4;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.helen-tool-close:hover {
    background: rgba(108, 255, 196, 0.2);
}

/* Tool Body */
.helen-tool-body {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    color: #0D353E;
}

.tool-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
    text-align: center;
}

/* Deal Process Flow Styles */
.deal-stages-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    height: calc(100% - 60px);
}

.stages-pool, .stages-sequence {
    background: rgba(13, 53, 62, 0.05);
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
}

.stages-pool h3, .stages-sequence h3 {
    margin-top: 0;
    color: #0D353E;
    font-size: 18px;
    margin-bottom: 20px;
}

.draggable-stages {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.deal-stage {
    background: white;
    border: 2px solid #0D353E;
    border-radius: 6px;
    padding: 15px;
    cursor: move;
    transition: all 0.3s ease;
}

.deal-stage:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 53, 62, 0.2);
}

.deal-stage.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.stage-header {
    font-weight: 600;
    color: #0D353E;
    margin-bottom: 5px;
}

.stage-description {
    font-size: 14px;
    color: #666;
}

.sequence-slots {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sequence-slot {
    background: white;
    border: 2px dashed #ccc;
    border-radius: 6px;
    padding: 15px;
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.sequence-slot.slot-hover {
    border-color: #6CFFC4;
    background: rgba(108, 255, 196, 0.1);
}

.slot-number {
    background: #0D353E;
    color: #6CFFC4;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.slot-content {
    flex: 1;
    color: #999;
}

.sequence-slot .deal-stage {
    margin: 0;
    width: 100%;
}

.check-sequence-btn {
    background: linear-gradient(135deg, #0D353E 0%, #1a5a66 100%);
    color: #6CFFC4;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.check-sequence-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 53, 62, 0.3);
}

.sequence-feedback {
    margin-top: 20px;
}

.feedback-message {
    padding: 15px;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
}

.feedback-message.success {
    background: rgba(108, 255, 196, 0.2);
    color: #0D353E;
    border: 2px solid #6CFFC4;
}

.feedback-message.partial {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
    border: 2px solid #ffc107;
}

.deal-stage.correct-position {
    background: rgba(108, 255, 196, 0.3);
    border-color: #6CFFC4;
}

.deal-stage.incorrect-position {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
}

/* Due Diligence Checklist Styles */
.dd-workstreams-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    height: calc(100% - 60px);
}

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

.priority-level {
    background: rgba(13, 53, 62, 0.05);
    border-radius: 8px;
    padding: 20px;
    flex: 1;
}

.priority-level h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.priority-level.critical h3 {
    color: #dc3545;
}

.priority-level.high h3 {
    color: #fd7e14;
}

.priority-level.medium h3 {
    color: #ffc107;
}

.priority-slots {
    min-height: 100px;
    border: 2px dashed #ccc;
    border-radius: 6px;
    padding: 10px;
}

.priority-slots.slots-hover {
    border-color: #6CFFC4;
    background: rgba(108, 255, 196, 0.1);
}

.workstreams-list {
    background: rgba(13, 53, 62, 0.05);
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
}

.dd-workstream {
    background: white;
    border: 2px solid #0D353E;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: move;
}

.workstream-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.workstream-description {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.workstream-items {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.workstream-items ul {
    margin: 0;
    padding-left: 20px;
}

.workstream-items li {
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

.expand-toggle {
    color: #666;
    font-size: 12px;
}

.workstream-placeholder {
    background: rgba(108, 255, 196, 0.2);
    border: 2px dashed #6CFFC4;
    height: 80px;
    margin-bottom: 10px;
}

.save-checklist-btn {
    background: linear-gradient(135deg, #0D353E 0%, #1a5a66 100%);
    color: #6CFFC4;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    transition: all 0.3s ease;
}

/* Investment Thesis Styles */
.thesis-builder {
    max-width: 800px;
    margin: 0 auto;
}

.company-info {
    margin-bottom: 30px;
}

.company-info label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #0D353E;
}

.company-name {
    width: 100%;
    padding: 12px;
    border: 2px solid #0D353E;
    border-radius: 6px;
    font-size: 16px;
    background: white;
}

.thesis-sections {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.thesis-section {
    background: rgba(13, 53, 62, 0.05);
    border-radius: 8px;
    padding: 25px;
}

.thesis-section h3 {
    margin: 0 0 20px 0;
    color: #0D353E;
    font-size: 20px;
}

.section-prompts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.prompt-item label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #666;
}

.prompt-response {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    background: white;
    transition: border-color 0.3s ease;
}

.prompt-response:focus {
    outline: none;
    border-color: #6CFFC4;
}

.thesis-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.save-thesis-btn, .export-thesis-btn {
    flex: 1;
    background: linear-gradient(135deg, #0D353E 0%, #1a5a66 100%);
    color: #6CFFC4;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-thesis-btn {
    background: linear-gradient(135deg, #6CFFC4 0%, #4fb99f 100%);
    color: #0D353E;
}

/* Market Sizing Styles */
.market-calculator {
    max-width: 600px;
    margin: 0 auto;
}

.input-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.field-group {
    display: flex;
    flex-direction: column;
}

.field-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #0D353E;
}

.market-input {
    padding: 12px;
    border: 2px solid #0D353E;
    border-radius: 6px;
    font-size: 16px;
    background: white;
}

.field-help {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.calculate-market-btn {
    width: 100%;
    background: linear-gradient(135deg, #0D353E 0%, #1a5a66 100%);
    color: #6CFFC4;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.market-results {
    margin-top: 30px;
    padding: 25px;
    background: rgba(13, 53, 62, 0.05);
    border-radius: 8px;
}

.market-results h3 {
    margin-top: 0;
    color: #0D353E;
}

.projections-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

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

.projections-table th {
    background: #0D353E;
    color: #6CFFC4;
    font-weight: 600;
}

.projections-table tr:hover {
    background: rgba(108, 255, 196, 0.1);
}

/* Synergies Styles */
.synergies-mapper {
    max-width: 900px;
    margin: 0 auto;
}

.deal-info {
    margin-bottom: 30px;
}

.deal-info label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #0D353E;
}

.deal-name {
    width: 100%;
    padding: 12px;
    border: 2px solid #0D353E;
    border-radius: 6px;
    font-size: 16px;
    background: white;
}

.synergy-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.synergy-category {
    background: rgba(13, 53, 62, 0.05);
    border-radius: 8px;
    padding: 20px;
}

.synergy-category h3 {
    margin: 0 0 15px 0;
    color: #0D353E;
    font-size: 18px;
}

.synergy-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.synergy-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.synergy-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.synergy-item label {
    flex: 1;
    cursor: pointer;
    font-size: 14px;
}

.synergy-value {
    width: 100px;
    padding: 5px 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.add-custom-synergy {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.custom-synergy-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.add-synergy-btn {
    background: #6CFFC4;
    color: #0D353E;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}

.synergy-summary {
    background: white;
    border: 2px solid #0D353E;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.synergy-summary h3 {
    margin: 0 0 20px 0;
    color: #0D353E;
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 16px;
}

.summary-row.total {
    border-top: 2px solid #0D353E;
    padding-top: 15px;
    font-weight: 600;
    font-size: 18px;
}

.save-synergies-btn {
    width: 100%;
    background: linear-gradient(135deg, #0D353E 0%, #1a5a66 100%);
    color: #6CFFC4;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .helen-tool-container {
        width: 95%;
        height: 95%;
        max-height: none;
    }
    
    .deal-stages-container,
    .dd-workstreams-container {
        grid-template-columns: 1fr;
    }
    
    .synergy-categories {
        grid-template-columns: 1fr;
    }
    
    .thesis-actions {
        flex-direction: column;
    }
}