/* Frontend Styles for Ethical Assessment Tool */

.eat-assessment {
    --eat-primary: #00d9ff;
    --eat-secondary: #00ff88;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Dark Style */
.eat-style-dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e8e8e8;
    border-radius: 16px;
}

/* Light Style */
.eat-style-light {
    background: #f8f9fa;
    color: #333;
}

.eat-style-light .eat-category {
    background: #fff;
    border-color: #dee2e6;
}

.eat-style-light .eat-table th {
    background: #f1f3f4;
    color: #333;
}

.eat-style-light .eat-answer-option {
    background: #f8f9fa;
    color: #666;
}

.eat-style-light .eat-score-panel,
.eat-style-light .eat-results {
    background: #fff;
    border-color: #dee2e6;
}

/* Transparent Style */
.eat-style-transparent {
    background: transparent;
}

/* Header */
.eat-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.eat-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, var(--eat-primary), var(--eat-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.eat-subtitle {
    margin: 0;
    opacity: 0.7;
}

/* Score Panel */
.eat-score-panel {
    position: sticky;
    top: 1rem;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.eat-score-item {
    text-align: center;
    padding: 0.5rem 1rem;
}

.eat-score-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

.eat-score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--eat-primary);
}

.eat-total-score {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--eat-primary), var(--eat-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.eat-progress-wrap {
    width: 100%;
}

.eat-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.eat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--eat-primary), var(--eat-secondary));
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Categories */
.eat-category {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.eat-category-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.eat-category-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--eat-primary);
    margin: 0;
}

/* Table */
.eat-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.eat-table th,
.eat-table td {
    vertical-align: top;
}

.eat-table th {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 0.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.eat-table th:first-child {
    width: 25%;
    text-align: left;
    padding-left: 1.5rem;
}

/* Dynamic column colors */
.eat-col-1 { color: #ff6b6b; }
.eat-col-2 { color: #ffa502; }
.eat-col-3 { color: #ffd93d; }
.eat-col-4 { color: #6bcb77; }
.eat-col-5 { color: #00d9ff; }
.eat-col-6 { color: #a855f7; }
.eat-col-7 { color: #ec4899; }

/* Question rows */
.eat-question-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.eat-question-row:last-child {
    border-bottom: none;
}

.eat-question-row > td {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.eat-question-row > td:last-child {
    border-right: none;
}

.eat-question-cell {
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    width: 25%;
}

.eat-question-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.eat-question-desc {
    font-size: 0.85rem;
    opacity: 0.7;
    line-height: 1.5;
}

/* Answer cells */
.eat-answer-cell {
    padding: 0.75rem 0.5rem;
    text-align: center;
}

.eat-answer-option {
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
    color: #a0a0a0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    height: 100%;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.4;
}

.eat-answer-option:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.eat-answer-option.selected {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Selected state colors based on score */
.eat-answer-option.selected.eat-score-1 {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
}

.eat-answer-option.selected.eat-score-2 {
    background: rgba(255, 165, 2, 0.2);
    border-color: #ffa502;
}

.eat-answer-option.selected.eat-score-3 {
    background: rgba(255, 217, 61, 0.2);
    border-color: #ffd93d;
}

.eat-answer-option.selected.eat-score-4 {
    background: rgba(107, 203, 119, 0.2);
    border-color: #6bcb77;
}

.eat-answer-option.selected.eat-score-5 {
    background: rgba(0, 217, 255, 0.2);
    border-color: #00d9ff;
}

.eat-answer-option.selected.eat-score-6 {
    background: rgba(168, 85, 247, 0.2);
    border-color: #a855f7;
}

.eat-answer-option.selected.eat-score-7 {
    background: rgba(236, 72, 153, 0.2);
    border-color: #ec4899;
}

/* Results Section */
.eat-results {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.eat-results-title {
    font-size: 1.5rem;
    margin: 0 0 1.5rem 0;
    color: var(--eat-primary);
}

.eat-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.eat-result-row:last-of-type {
    border-bottom: none;
}

.eat-result-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(0, 217, 255, 0.3);
}

.eat-result-name {
    font-weight: 500;
}

.eat-result-total .eat-result-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.eat-result-score {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.eat-result-bar {
    width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.eat-result-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.eat-result-bar-fill.low { background: #ff6b6b; }
.eat-result-bar-fill.medium-low { background: #ffa502; }
.eat-result-bar-fill.medium { background: #ffd93d; }
.eat-result-bar-fill.medium-high { background: #6bcb77; }
.eat-result-bar-fill.high { background: var(--eat-primary); }

.eat-result-number {
    font-weight: 700;
    min-width: 80px;
    text-align: right;
}

.eat-result-total .eat-result-number {
    font-size: 1.2rem;
    color: var(--eat-primary);
}

/* Export Button */
.eat-export-btn {
    background: linear-gradient(135deg, var(--eat-primary), var(--eat-secondary));
    color: #1a1a2e;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.eat-export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.4);
}

/* Legend */
.eat-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.eat-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.eat-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.eat-legend-1 { background: #ff6b6b; }
.eat-legend-2 { background: #ffa502; }
.eat-legend-3 { background: #ffd93d; }
.eat-legend-4 { background: #6bcb77; }
.eat-legend-5 { background: #00d9ff; }
.eat-legend-6 { background: #a855f7; }
.eat-legend-7 { background: #ec4899; }

/* Responsive */
@media (max-width: 1200px) {
    .eat-answer-option {
        font-size: 0.65rem;
        padding: 0.5rem 0.25rem;
        min-height: 70px;
    }
}

@media (max-width: 900px) {
    .eat-assessment {
        padding: 1rem;
    }
    
    .eat-title {
        font-size: 1.5rem;
    }
    
    .eat-score-panel {
        position: relative;
        top: 0;
    }
    
    .eat-category {
        overflow-x: auto;
    }
    
    .eat-table {
        min-width: 700px;
    }
    
    .eat-result-bar {
        width: 100px;
    }
}
