/**
 * YCCD Display Styles
 * ===================
 * Styles for displaying YCCD codes in PD slides
 * Supports both Learneris and QD 3439 code formats
 */

/* YCCD Badge Container */
.yccd-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

/* Base YCCD badge style */
.yccd-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Learneris YCCD (HB-NT.1.1 format) - Purple theme */
.yccd-learneris {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: 1px solid #7c3aed;
}

/* QD 3439 YCCD (L1.A1.1-1 format) - Blue theme */
.yccd-qd3439 {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: 1px solid #2563eb;
}

/* Compact version for inline display */
.yccd-inline {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: var(--purple, #8b5cf6);
    margin-top: 8px;
}

/* Vertical stacked badges for overview cards */
.yccd-badges-vertical {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.yccd-badges-vertical .yccd-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.yccd-badges-vertical .yccd-badge {
    font-size: 10px;
    padding: 2px 6px;
}

/* YCCD section in overview cards */
.yccd-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.yccd-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 6px;
}

/* YCCD tooltip on hover */
.yccd-badge[data-tooltip] {
    position: relative;
    cursor: help;
}

.yccd-badge[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #1e293b;
    color: white;
    font-size: 12px;
    font-family: sans-serif;
    font-weight: normal;
    white-space: nowrap;
    border-radius: 6px;
    z-index: 100;
    margin-bottom: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Grade version indicator */
.yccd-version {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 4px;
}

.yccd-version-v1 {
    background: #fef3c7;
    color: #92400e;
}

.yccd-version-v2 {
    background: #dbeafe;
    color: #1e40af;
}

/* YCCD Overview Card (for topic/lesson overview) */
.yccd-overview-card {
    background: var(--bg-card, #334155);
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
}

.yccd-overview-card .yccd-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.yccd-overview-card .yccd-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.yccd-overview-card .yccd-label {
    min-width: 100px;
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
}

.yccd-overview-card .yccd-codes {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .yccd-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    .yccd-overview-card .yccd-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
