/* Custom CSS for AI Talent Camp Progress Dashboard */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Prose styling for README rendering */
.prose {
    color: #374151;
    max-width: 65ch;
}

.prose h1 {
    font-size: 2.25em;
    margin-top: 0;
    margin-bottom: 0.8888889em;
    line-height: 1.1111111;
    font-weight: 800;
}

.prose h2 {
    font-size: 1.5em;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3333333;
    font-weight: 700;
}

.prose h3 {
    font-size: 1.25em;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    line-height: 1.6;
    font-weight: 600;
}

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    line-height: 1.75;
}

.prose a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

.prose a:hover {
    color: #1d4ed8;
}

.prose strong {
    color: #111827;
    font-weight: 600;
}

.prose code {
    color: #111827;
    font-weight: 600;
    font-size: 0.875em;
    background-color: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
}

.prose pre {
    color: #e5e7eb;
    background-color: #1f2937;
    overflow-x: auto;
    font-size: 0.875em;
    line-height: 1.7142857;
    margin-top: 1.7142857em;
    margin-bottom: 1.7142857em;
    border-radius: 0.375rem;
    padding: 0.8571429em 1.1428571em;
}

.prose pre code {
    background-color: transparent;
    border-width: 0;
    border-radius: 0;
    padding: 0;
    font-weight: 400;
    color: inherit;
    font-size: inherit;
    font-family: inherit;
    line-height: inherit;
}

.prose ul {
    list-style-type: disc;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose ol {
    list-style-type: decimal;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose table {
    width: 100%;
    table-layout: auto;
    text-align: left;
    margin-top: 2em;
    margin-bottom: 2em;
    font-size: 0.875em;
    line-height: 1.7142857;
}

.prose thead {
    border-bottom-width: 1px;
    border-bottom-color: #d1d5db;
}

.prose thead th {
    color: #111827;
    font-weight: 600;
    vertical-align: bottom;
    padding-right: 0.5714286em;
    padding-bottom: 0.5714286em;
    padding-left: 0.5714286em;
}

.prose tbody tr {
    border-bottom-width: 1px;
    border-bottom-color: #e5e7eb;
}

.prose tbody td {
    vertical-align: top;
    padding: 0.5714286em;
}

.prose blockquote {
    font-weight: 500;
    font-style: italic;
    color: #111827;
    border-left-width: 0.25rem;
    border-left-color: #e5e7eb;
    quotes: "\201C""\201D""\2018""\2019";
    margin-top: 1.6em;
    margin-bottom: 1.6em;
    padding-left: 1em;
}

.prose hr {
    border-color: #e5e7eb;
    border-top-width: 1px;
    margin-top: 3em;
    margin-bottom: 3em;
}

/* Chart containers */
canvas {
    max-width: 100%;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-green {
    background-color: #10b981;
    color: white;
}

.badge-orange {
    background-color: #f59e0b;
    color: white;
}

.badge-red {
    background-color: #ef4444;
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .prose {
        font-size: 0.875rem;
    }
}

/* Status Legend Styles */
.status-legend {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    border: 1px solid #e5e7eb;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.legend-text {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Tooltip Styles */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: pre-line;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s;
    min-width: 150px;
}

/* Tooltip Arrow */
.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

/* Show tooltip on hover */
.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Team Card Styles */
.team-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-card:hover {
    border-color: #cbd5e1;
}

/* Responsive legend for mobile */
@media (max-width: 640px) {
    .status-legend {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Leaderboard Styles */
.leaderboard {
    max-width: 100%;
}

.leaderboard-table {
    border-collapse: collapse;
    font-size: 0.8rem;
}

.leaderboard-table th {
    text-align: left;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f8fafc;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.leaderboard-table td {
    padding: 0.35rem 0.6rem;
    vertical-align: middle;
}

.leaderboard-row {
    transition: all 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
    min-height: 2.25rem;
}

.leaderboard-row:hover {
    background-color: #f8fafc;
    transform: translateX(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

/* Rank badges */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.65rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Badge improvements */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.badge-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.badge-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.badge-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* Responsive leaderboard */
@media (min-width: 1280px) {
    .leaderboard-table {
        font-size: 0.85rem;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.45rem 0.7rem;
    }

    .rank-badge {
        width: 1.6rem;
        height: 1.6rem;
        font-size: 0.7rem;
    }
}
