/**
 * FEATURE-024: Project Quality Evaluation UI Styles
 * 
 * Styles for the quality evaluation view in Workplace.
 */

/* =============================================================================
   CSS Variables - Quality Theme
   ============================================================================= */

:root {
    --quality-primary: #0d9488;
    --quality-primary-light: #14b8a6;
    --quality-primary-dark: #0f766e;
    --quality-bg: #f0fdfa;
    --quality-border: #99f6e4;
    
    /* Metric status colors */
    --quality-status-good: #22c55e;
    --quality-status-warn: #f59e0b;
    --quality-status-bad: #ef4444;
}

/* =============================================================================
   Main Container
   ============================================================================= */

.quality-eval-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bs-body-bg);
}

/* =============================================================================
   Action Bar
   ============================================================================= */

.quality-action-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.quality-action-bar .btn-evaluate {
    background: var(--quality-primary);
    border-color: var(--quality-primary);
    color: white;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
}

.quality-action-bar .btn-evaluate:hover {
    background: var(--quality-primary-dark);
    border-color: var(--quality-primary-dark);
}

/* Refactoring Dropdown */
.quality-action-bar .dropdown-refactoring {
    position: relative;
}

.quality-action-bar .dropdown-refactoring .btn-refactoring {
    background: transparent;
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.quality-action-bar .dropdown-refactoring .btn-refactoring:hover {
    background: var(--bs-secondary-bg);
}

.quality-action-bar .dropdown-refactoring .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 0.25rem 0;
    margin-top: 2px;
}

.quality-action-bar .dropdown-refactoring:hover .dropdown-menu {
    display: block;
}

.quality-action-bar .dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--bs-body-color);
    text-decoration: none;
    cursor: pointer;
}

.quality-action-bar .dropdown-menu .dropdown-item:hover {
    background: var(--bs-secondary-bg);
}

.quality-action-bar .dropdown-menu .dropdown-item i {
    width: 1rem;
    text-align: center;
    color: var(--bs-secondary-color);
}

.quality-action-bar .dropdown-menu .dropdown-divider {
    height: 0;
    margin: 0.25rem 0;
    border-top: 1px solid var(--bs-border-color);
}

/* =============================================================================
   Version Timeline
   ============================================================================= */

.quality-version-timeline {
    display: flex;
    gap: 0;
    padding: 0 1rem;
    background: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.quality-version-tab {
    padding: 0.625rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    transition: all 0.15s ease;
}

.quality-version-tab:hover {
    color: var(--bs-body-color);
    background: var(--bs-secondary-bg);
}

.quality-version-tab.active {
    color: var(--quality-primary);
    border-bottom-color: var(--quality-primary);
    font-weight: 500;
}

.quality-version-tab .version-number {
    font-weight: 500;
}

.quality-version-tab .version-date {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
}

.quality-version-tab.active .version-date {
    color: var(--quality-primary);
    opacity: 0.8;
}

/* =============================================================================
   Markdown Preview
   ============================================================================= */

.quality-markdown-preview {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.quality-markdown-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.quality-markdown-content h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--quality-border);
    color: var(--quality-primary-dark);
}

.quality-markdown-content h2 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--bs-heading-color);
}

.quality-markdown-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.quality-markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.quality-markdown-content table th,
.quality-markdown-content table td {
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--bs-border-color);
    text-align: left;
}

.quality-markdown-content table th {
    background: var(--bs-tertiary-bg);
    font-weight: 600;
}

.quality-markdown-content table tr:hover {
    background: var(--bs-secondary-bg);
}

.quality-markdown-content code {
    background: var(--bs-tertiary-bg);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.quality-markdown-content pre {
    background: var(--bs-tertiary-bg);
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.quality-markdown-content pre code {
    background: transparent;
    padding: 0;
}

.quality-markdown-content ul,
.quality-markdown-content ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.quality-markdown-content li {
    margin: 0.25rem 0;
}

/* =============================================================================
   Empty State
   ============================================================================= */

.quality-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 3rem;
    text-align: center;
}

.quality-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--quality-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.quality-empty-icon i {
    font-size: 2.5rem;
    color: var(--quality-primary);
}

.quality-empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--bs-heading-color);
}

.quality-empty-desc {
    color: var(--bs-secondary-color);
    margin-bottom: 1.5rem;
    max-width: 400px;
}

.quality-empty-state .btn-evaluate {
    background: var(--quality-primary);
    border-color: var(--quality-primary);
    color: white;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
}

.quality-empty-state .btn-evaluate:hover {
    background: var(--quality-primary-dark);
    border-color: var(--quality-primary-dark);
}

/* =============================================================================
   Loading State
   ============================================================================= */

.quality-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.quality-loading .spinner-border {
    width: 2rem;
    height: 2rem;
    color: var(--quality-primary);
}
