/* PE Case Study Simulator - Public Styles */

.pecs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header Styles */
.pecs-header {
    background: linear-gradient(135deg, #00695c 0%, #00897b 100%);
    color: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 105, 92, 0.3);
}

.pecs-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    color: white;
}

.pecs-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1em;
}

/* User Stats Bar */
.pecs-user-stats-bar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.stats-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #00796b;
}

/* Filters */
.pecs-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.pecs-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
    background: white;
}

/* Case Grid */
.pecs-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.pecs-case-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pecs-case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.case-card-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.case-card-header h4 {
    margin: 0 0 10px 0;
    color: #00796b;
}

.case-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.industry-tag {
    display: inline-block;
    background: #e0f2f1;
    color: #00695c;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.pe-type-tag {
    display: inline-block;
    background: #f3e5f5;
    color: #7b1fa2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.business-model {
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9em;
    color: #6c757d;
    line-height: 1.4;
}

.case-card-body {
    padding: 20px;
}

.company-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.metric {
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 3px;
}

.metric-value {
    display: block;
    font-weight: bold;
    color: #212529;
}

/* Buttons */
.pecs-btn-primary {
    background: linear-gradient(135deg, #00796b 0%, #00897b 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 16px rgba(0, 121, 107, 0.3);
}

.pecs-btn-primary:hover {
    background: linear-gradient(135deg, #00695c 0%, #00796b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 121, 107, 0.4);
}

.pecs-btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pecs-btn-secondary:hover {
    background: #5a6268;
}

/* Workspace Styles */
.pecs-workspace {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    padding: 30px;
}

.pecs-timer-container {
    text-align: right;
    margin-bottom: 20px;
}

#pecs-timer {
    font-size: 1.5em;
    font-weight: bold;
    color: #00796b;
}

/* Navigation Tabs */
.pecs-nav-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 30px;
}

.nav-tab {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 1em;
    cursor: pointer;
    color: #6c757d;
    position: relative;
    transition: color 0.3s ease;
}

.nav-tab.active {
    color: #00796b;
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00796b 0%, #00897b 100%);
    border-radius: 2px;
}

/* Form Styles */
.pecs-form {
    max-width: 800px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.pecs-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.pecs-input,
.pecs-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
}

.pecs-textarea {
    resize: vertical;
}

.pecs-range {
    width: 100%;
}

/* Section Styles */
.pecs-section {
    display: none;
}

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

/* Results Container */
.pecs-results-container {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
}

#lbo-chart {
    max-width: 600px;
    margin: 20px auto;
}

/* Feedback Container */
.pecs-feedback-container {
    background: #e0f2f1;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    border-left: 4px solid #00796b;
    box-shadow: 0 4px 12px rgba(0, 121, 107, 0.1);
}

.feedback-score {
    font-size: 2em;
    font-weight: bold;
    color: #00695c;
    margin-bottom: 10px;
}

.feedback-item {
    margin: 10px 0;
    padding-left: 20px;
    position: relative;
}

.feedback-item::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
}

/* Modal Styles */
.pecs-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #6c757d;
}

.close:hover {
    color: #212529;
}

/* Action Buttons */
.pecs-action-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* DD Questions */
.dd-questions {
    max-width: 800px;
}

.dd-question {
    margin-bottom: 25px;
}

.dd-question h4 {
    margin-bottom: 10px;
    color: #00796b;
}

/* Exit Options */
.exit-route-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: #00796b;
    background: #e0f2f1;
}

.radio-option input[type="radio"] {
    margin-right: 10px;
}

/* LBO Model Styles */
.lbo-model-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
    overflow-x: auto;
}

.lbo-nav-btn {
    background: none;
    border: none;
    padding: 15px 20px;
    font-size: 0.9em;
    cursor: pointer;
    color: #6c757d;
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 180px;
}

.lbo-nav-btn.active {
    color: #00796b;
    font-weight: 600;
}

.lbo-nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00796b 0%, #00897b 100%);
    border-radius: 2px;
}

.lbo-nav-btn:hover:not(.active) {
    color: #00897b;
    background: rgba(0, 137, 123, 0.05);
}

.lbo-section {
    display: none;
}

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

.assumption-group {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #00796b;
}

.assumption-group h5 {
    margin: 0 0 15px 0;
    color: #00695c;
    font-size: 1.1em;
    font-weight: 600;
}

.section-description {
    background: #e0f2f1;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    color: #00695c;
    font-style: italic;
    border-left: 4px solid #00796b;
}

/* LBO Results Styles */
#lbo-summary-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.lbo-metric-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #00796b;
}

.lbo-metric-label {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 8px;
}

.lbo-metric-value {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #00695c;
}

#lbo-charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

#lbo-sensitivity-table {
    overflow-x: auto;
    margin-bottom: 20px;
}

.sensitivity-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sensitivity-table th,
.sensitivity-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.sensitivity-table th {
    background: linear-gradient(135deg, #00695c 0%, #00897b 100%);
    color: white;
    font-weight: 600;
}

.sensitivity-table tr:hover {
    background: #f8f9fa;
}

#lbo-recommendation {
    background: #e0f2f1;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #00796b;
}

.recommendation-header {
    color: #00695c;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 15px;
}

.recommendation-score {
    font-size: 2em;
    font-weight: bold;
    color: #00695c;
    margin-bottom: 10px;
}

/* IC Memo Section Styles */
.ic-memo-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 4px solid #00796b;
}

.ic-memo-section h4 {
    color: #00695c;
    margin: 0 0 20px 0;
    font-size: 1.2em;
    font-weight: 600;
    border-bottom: 2px solid #e0f2f1;
    padding-bottom: 10px;
}

.ic-memo-section .form-group {
    margin-bottom: 20px;
}

.ic-memo-section .form-group:last-child {
    margin-bottom: 0;
}

.ic-memo-section label {
    color: #00695c;
    font-weight: 600;
    font-size: 1em;
    margin-bottom: 8px;
    display: block;
}

.ic-memo-section textarea {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 12px;
    font-size: 0.95em;
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ic-memo-section textarea:focus {
    border-color: #00796b;
    box-shadow: 0 0 0 0.2rem rgba(0, 121, 107, 0.25);
    outline: none;
}

/* Company Overview Styles */
.company-overview {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #00796b;
}

.company-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
}

.company-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.company-section h4 {
    color: #00695c;
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 600;
}

.company-section h5 {
    color: #00796b;
    font-size: 1.1em;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.metric-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 121, 107, 0.15);
}

.metric-card .metric-label {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.metric-card .metric-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #00695c;
}

.highlight-box {
    background: linear-gradient(135deg, #e0f2f1 0%, #f1f8e9 100%);
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.competitive-advantages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.advantage-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid #00796b;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

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

.revenue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.revenue-item:last-child {
    border-bottom: none;
}

.revenue-label {
    font-weight: 600;
    color: #495057;
}

.revenue-amount {
    color: #00695c;
    font-weight: 600;
}

.key-metrics-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.key-metrics-table th,
.key-metrics-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.key-metrics-table th {
    background: linear-gradient(135deg, #00695c 0%, #00897b 100%);
    color: white;
    font-weight: 600;
    font-size: 0.95em;
}

.key-metrics-table tr:hover {
    background: #f8f9fa;
}

.key-metrics-table td:last-child {
    font-weight: 600;
    color: #00695c;
}

/* Button improvements */
.form-row {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
}

.form-row .pecs-btn-secondary,
.form-row .pecs-btn-primary {
    min-width: 150px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pecs-case-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    
    .pecs-user-stats-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .pecs-filters {
        flex-direction: column;
    }
    
    .exit-route-options {
        grid-template-columns: 1fr;
    }
    
    .pecs-nav-tabs {
        flex-wrap: wrap;
    }
    
    .nav-tab {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    
    .lbo-model-nav {
        flex-direction: column;
    }
    
    .lbo-nav-btn {
        min-width: auto;
        text-align: left;
    }
    
    #lbo-charts-container {
        grid-template-columns: 1fr;
    }
    
    #lbo-summary-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}