/**
 * KM Maturity Assessment - Public Styles
 */

/* ===== Container ===== */
.kmma-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ===== Header ===== */
.kmma-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

.kmma-header h2 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.kmma-description {
    font-size: 16px;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== Progress Bar ===== */
.kmma-progress-container {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.kmma-progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.kmma-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.kmma-progress-text {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* ===== Form Sections ===== */
.kmma-section {
    margin-bottom: 30px;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: none;
}

.kmma-section:first-child,
.kmma-section.active {
    display: block;
}

.kmma-section h3 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

/* ===== Organization Info Form ===== */
.kmma-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.kmma-form-field {
    display: flex;
    flex-direction: column;
}

.kmma-form-field label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

.kmma-form-field input,
.kmma-form-field select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.kmma-form-field input:focus,
.kmma-form-field select:focus {
    outline: none;
    border-color: #667eea;
}

/* ===== Dimension Header ===== */
.kmma-dimension-header {
    margin-bottom: 25px;
}

.kmma-dimension-description {
    color: #6c757d;
    font-size: 15px;
    margin-top: 5px;
}

/* ===== Questions ===== */
.kmma-questions {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.kmma-question {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.kmma-question-number {
    width: 32px;
    height: 32px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.kmma-question-content {
    flex: 1;
}

.kmma-question-text {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 500;
}

/* ===== Options ===== */
.kmma-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.kmma-option {
    flex: 1;
    min-width: 120px;
}

.kmma-option input[type="radio"] {
    display: none;
}

.kmma-option-label {
    display: block;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.kmma-option input[type="radio"]:checked + .kmma-option-label {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.kmma-option:hover .kmma-option-label {
    border-color: #667eea;
}

/* ===== Navigation Buttons ===== */
.kmma-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    min-height: 60px;
}

.kmma-navigation .kmma-btn-prev {
    margin-right: auto;
}

.kmma-navigation .kmma-btn-next,
.kmma-navigation .kmma-btn-submit {
    margin-left: auto;
}

.kmma-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.kmma-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.kmma-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.kmma-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
}

.kmma-btn-secondary:hover {
    background: #e9ecef;
}

.kmma-btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

/* ===== Results Section ===== */
.kmma-results {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
}

.kmma-results .kmma-section {
    display: block !important;
    margin-bottom: 30px;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.kmma-results-header {
    text-align: center;
    margin-bottom: 40px;
}

.kmma-overall-result {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
}

.kmma-overall-score {
    font-size: 72px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
}

.kmma-overall-label {
    font-size: 24px;
    font-weight: 600;
}

.kmma-overall-label small {
    display: block;
    font-size: 16px;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 5px;
}

/* ===== Dashboard Styles ===== */
.kmma-dashboard {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.kmma-dashboard h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 30px;
}

.kmma-dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.kmma-dashboard-card h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.kmma-overall-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.kmma-overall-card h3 {
    color: white;
    border-bottom-color: rgba(255,255,255,0.3);
}

.kmma-overall-score-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.kmma-score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(white calc(var(--score) * 1%), transparent 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.kmma-score-circle::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}

.kmma-score-value {
    font-size: 48px;
    font-weight: 700;
    color: white;
    position: relative;
    z-index: 1;
}

.kmma-score-max {
    font-size: 20px;
    color: rgba(255,255,255,0.8);
    position: relative;
    z-index: 1;
}

.kmma-maturity-info {
    text-align: center;
}

.kmma-maturity-badge-large {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.kmma-maturity-desc {
    font-size: 16px;
    opacity: 0.9;
}

/* ===== Chart Container ===== */
.kmma-chart-container {
    max-width: 500px;
    margin: 0 auto;
}

/* ===== Dimensions Grid ===== */
.kmma-dimensions-grid {
    display: grid;
    gap: 20px;
}

.kmma-dimension-card {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.kmma-dimension-score-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
}

.kmma-score-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.kmma-dimension-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.kmma-dimension-name {
    font-weight: 600;
    color: #2c3e50;
}

.kmma-dimension-score {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.kmma-dimension-level {
    font-size: 13px;
    font-weight: 600;
}

/* ===== Gap Analysis ===== */
.kmma-gap-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kmma-gap-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid;
}

.kmma-gap-item.high-priority {
    border-left-color: #dc3545;
}

.kmma-gap-item.medium-priority {
    border-left-color: #ffc107;
}

.kmma-gap-dimension {
    font-weight: 600;
    color: #2c3e50;
}

.kmma-gap-details {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6c757d;
}

.kmma-gap-current {
    font-weight: 600;
    color: #dc3545;
}

.kmma-gap-target {
    font-weight: 600;
    color: #28a745;
}

.kmma-gap-size {
    font-size: 13px;
}

/* ===== Recommendations ===== */
.kmma-recommendations-list {
    list-style: none;
    padding: 0;
}

.kmma-recommendations-list li {
    padding: 18px 20px;
    background: #e7f3ff;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid #0066cc;
    font-size: 15px;
    line-height: 1.6;
}

/* ===== Dashboard Actions ===== */
.kmma-dashboard-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* ===== History Table ===== */
.kmma-history {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.kmma-history h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 30px;
}

.kmma-history-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.kmma-history-table th,
.kmma-history-table td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.kmma-history-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kmma-history-table tr:hover {
    background: #f8f9fa;
}

.kmma-level-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
    color: white;
}

/* ===== Comparison Tool ===== */
.kmma-comparison {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.kmma-comparison h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 30px;
}

.kmma-comparison-selector {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.kmma-comparison-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.kmma-comparison-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.kmma-comparison-option:hover {
    background: #e9ecef;
}

.kmma-comparison-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ===== Loading State ===== */
.kmma-loading {
    text-align: center;
    padding: 40px;
}

.kmma-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .kmma-container {
        padding: 15px;
    }
    
    .kmma-header h2 {
        font-size: 24px;
    }
    
    .kmma-section {
        padding: 20px;
    }
    
    .kmma-question {
        flex-direction: column;
        gap: 10px;
    }
    
    .kmma-options {
        flex-direction: column;
    }
    
    .kmma-option {
        min-width: auto;
    }
    
    .kmma-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .kmma-btn {
        width: 100%;
    }
    
    .kmma-overall-score-section {
        flex-direction: column;
        gap: 20px;
    }
    
    .kmma-dashboard-card {
        padding: 20px;
    }
    
    .kmma-history-table {
        font-size: 14px;
    }
    
    .kmma-history-table th,
    .kmma-history-table td {
        padding: 12px 15px;
    }
}

/* ===== Print Styles ===== */
@media print {
    .kmma-navigation,
    .kmma-dashboard-actions {
        display: none;
    }
    
    .kmma-section {
        break-inside: avoid;
    }
}
