/* 
 * Certification Badge Styles
 * Analysis Certification - R Statistical Methods (not AI insights)
 * Important: Certifies calculations, not AI interpretations
 */

/* Main Certification Badge - Subtle distinction */
.certification-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1.5px solid #10B981;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #065F46;
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.1);
    position: relative;
    transition: all 0.3s ease;
    opacity: 0.95;
}

.certification-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.certification-badge .badge-icon {
    font-size: 18px;
    color: #10B981;
}

.certification-badge .badge-text {
    font-size: 13px;
    letter-spacing: 0.5px;
}

.certification-badge .badge-info {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #10B981;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: help;
    margin-left: 4px;
}

/* Hero Section Badge - Floating */
.hero-certification {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    animation: subtlePulse 4s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

/* Sample Reports Certification */
.report-certification {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: 1px solid #10B981;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 11px;
    color: #065F46;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.report-certification::before {
    content: "✓";
    color: #10B981;
    font-weight: bold;
}

/* Certification Tooltip */
.certification-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1F2937;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    z-index: 1000;
}

.certification-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1F2937;
}

.certification-badge:hover .certification-tooltip,
.report-certification:hover .certification-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Certification Details Modal */
.certification-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.certification-modal.active {
    display: flex;
}

.certification-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.certification-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #E5E7EB;
}

.certification-seal {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #10B981 0%, #065F46 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: bold;
}

.certification-title h3 {
    margin: 0;
    color: #1F2937;
    font-size: 24px;
}

.certification-title p {
    margin: 4px 0 0 0;
    color: #6B7280;
    font-size: 14px;
}

.certification-body {
    color: #374151;
    line-height: 1.6;
}

.certification-body h4 {
    color: #1F2937;
    margin-top: 20px;
    margin-bottom: 12px;
    font-size: 18px;
}

.certification-body ul {
    margin: 12px 0;
    padding-left: 24px;
}

.certification-body li {
    margin: 8px 0;
}

.certification-body code {
    background: #F3F4F6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #DC2626;
}

.certification-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #F3F4F6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #6B7280;
    transition: all 0.2s ease;
}

.certification-close:hover {
    background: #E5E7EB;
    color: #1F2937;
}

/* Terminal Certification Line */
.terminal-certified {
    color: #10B981;
    font-weight: 600;
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
}

.terminal-certified::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10B981;
}

/* Visual Distinction Indicators */
.analysis-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    margin: 4px;
}

.analysis-indicator.certified {
    background: #F0FDF4;
    color: #065F46;
    border: 1px solid #10B981;
}

.analysis-indicator.certified::before {
    content: "✓";
    color: #10B981;
    font-weight: bold;
}

.analysis-indicator.ai-insight {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #F59E0B;
}

.analysis-indicator.ai-insight::before {
    content: "✨";
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-certification {
        position: static;
        margin: 20px auto;
        display: flex;
        justify-content: center;
    }
    
    .certification-tooltip {
        width: 240px;
        font-size: 12px;
    }
    
    .certification-content {
        padding: 24px;
    }
}