/**
 * MegaLab WCAG Analyzer Styles
 * Visual styles for accessibility violation highlighting
 */

/* Violation highlight overlays */
.wcag-violation-highlight {
    border: 3px solid;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

/* Impact-based colors */
.wcag-impact-critical {
    border-color: #dc2626; /* red-600 */
    background-color: rgba(220, 38, 38, 0.1);
}

.wcag-impact-serious {
    border-color: #ea580c; /* orange-600 */
    background-color: rgba(234, 88, 12, 0.1);
}

.wcag-impact-moderate {
    border-color: #ca8a04; /* yellow-600 */
    background-color: rgba(202, 138, 4, 0.1);
}

.wcag-impact-minor {
    border-color: #2563eb; /* blue-600 */
    background-color: rgba(37, 99, 235, 0.1);
}

/* Violation number badges */
.wcag-violation-badge {
    background-color: #dc2626;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.wcag-impact-serious .wcag-violation-badge {
    background-color: #ea580c;
}

.wcag-impact-moderate .wcag-violation-badge {
    background-color: #ca8a04;
}

.wcag-impact-minor .wcag-violation-badge {
    background-color: #2563eb;
}

.wcag-violation-badge:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* WCAG Panel specific styles */
.wcag-panel {
    font-family: system-ui, -apple-system, sans-serif;
}

.wcag-score-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.wcag-score-item {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    background: white;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wcag-score-value {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.wcag-score-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Score colors */
.wcag-score-excellent {
    color: #16a34a; /* green-600 */
}

.wcag-score-good {
    color: #2563eb; /* blue-600 */
}

.wcag-score-warning {
    color: #ea580c; /* orange-600 */
}

.wcag-score-critical {
    color: #dc2626; /* red-600 */
}

/* Violation list */
.wcag-violations-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wcag-violation-card {
    padding: 1rem;
    border-left: 4px solid;
    background: white;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.wcag-violation-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transform: translateX(4px);
}

.wcag-violation-card.impact-critical {
    border-left-color: #dc2626;
}

.wcag-violation-card.impact-serious {
    border-left-color: #ea580c;
}

.wcag-violation-card.impact-moderate {
    border-left-color: #ca8a04;
}

.wcag-violation-card.impact-minor {
    border-left-color: #2563eb;
}

.wcag-violation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.wcag-violation-title {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
}

.wcag-violation-impact {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.wcag-violation-impact.critical {
    background-color: #fecaca;
    color: #991b1b;
}

.wcag-violation-impact.serious {
    background-color: #fed7aa;
    color: #9a3412;
}

.wcag-violation-impact.moderate {
    background-color: #fef3c7;
    color: #92400e;
}

.wcag-violation-impact.minor {
    background-color: #dbeafe;
    color: #1e3a8a;
}

.wcag-violation-description {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.wcag-violation-details {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.wcag-violation-selector {
    font-family: 'Monaco', 'Menlo', monospace;
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

/* Principle cards */
.wcag-principles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.wcag-principle-card {
    padding: 0.75rem;
    background: white;
    border-radius: 0.375rem;
    border: 2px solid #e5e7eb;
    text-align: center;
}

.wcag-principle-name {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.wcag-principle-count {
    font-size: 1.5rem;
    font-weight: bold;
}

.wcag-principle-perceivable .wcag-principle-count {
    color: #dc2626;
}

.wcag-principle-operable .wcag-principle-count {
    color: #ea580c;
}

.wcag-principle-understandable .wcag-principle-count {
    color: #ca8a04;
}

.wcag-principle-robust .wcag-principle-count {
    color: #2563eb;
}

/* Remediation modal */
.wcag-remediation-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
    z-index: 10000;
}

.wcag-remediation-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.wcag-remediation-content h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #111827;
}

.wcag-remediation-content h5 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
}

.wcag-remediation-content pre {
    background: #f3f4f6;
    padding: 0.75rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    font-size: 0.875rem;
}

.wcag-remediation-content code {
    font-family: 'Monaco', 'Menlo', monospace;
}

.wcag-remediation-content ul {
    margin-left: 1.5rem;
}

.wcag-remediation-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f3f4f6;
    border: none;
    border-radius: 0.375rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    color: #6b7280;
}

.wcag-remediation-close:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Loading state */
.wcag-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6b7280;
}

.wcag-loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: wcag-spin 0.6s linear infinite;
    margin-right: 0.75rem;
}

@keyframes wcag-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty state */
.wcag-empty-state {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.wcag-empty-state-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.wcag-empty-state-message {
    font-size: 0.875rem;
}
