/* PE UTMB Card Styles */

.pe-utmb-card {
    background: #111111;
    color: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    box-sizing: border-box;

    /* Horizontal Layout */
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
    align-items: center;
}

.pe-uc-header {
    display: flex;
    gap: 15px;
    align-items: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 20px;
}

.pe-uc-avatar {
    width: 100px;
    height: 100px;
    min-width: 100px;
    min-height: 100px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: #222;
    border: 3px solid #000d44;
    aspect-ratio: 1/1;
    /* UTMB Dark Blue */
}

.pe-uc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pe-uc-avatar-placeholder svg {
    width: 60%;
    height: 60%;
    margin: 20% auto;
    color: #666;
}

.article-content .pe-utmb-card .pe-uc-info h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    line-height: 1.1;
    color: #ffffff !important;
}

.pe-uc-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pe-uc-stat-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pe-uc-stat-badge.utmb-rank {
    background: rgba(0, 219, 255, 0.15);
    /* UTMB Cyan highlight */
    border-color: rgba(0, 219, 255, 0.3);
}

.pe-uc-stat-badge.utmb-rank strong {
    color: #00dbff;
}

.pe-uc-label {
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    color: #999;
}

.pe-uc-stat-badge strong {
    font-size: 14px;
    font-weight: 700;
    color: #eee;
}

.pe-uc-results {
    margin-bottom: 0;
}

.pe-uc-results-title {
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.pe-uc-races-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pe-uc-races-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.pe-uc-races-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pe-uc-race-name {
    font-size: 14px;
    font-weight: 600;
    color: #ccc;
    flex: 1;
    padding-right: 15px;
}

.pe-uc-race-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.pe-uc-race-date {
    font-size: 11px;
    color: #888;
}

.pe-uc-race-pos {
    font-size: 12px;
    color: #aaa;
}

.pe-uc-race-pos strong {
    display: inline-block;
    background: #333;
    padding: 1px 6px;
    border-radius: 4px;
    color: #fff;
    font-weight: 800;
    margin-left: 5px;
    font-size: 13px;
    min-width: 18px;
    text-align: center;
}

/* Gold, Silver, Bronze highlights */
.pe-uc-races-list li:has(.pe-uc-race-pos strong:contains("1")) .pe-uc-race-pos strong {
    background: #ffd700;
    color: #000;
}

.pe-uc-footer {
    grid-column: 1 / -1;
    text-align: right;
    margin-top: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pe-uc-footer a {
    font-size: 12px;
    color: #00dbff;
    /* UTMB Cyan text */
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.pe-uc-footer a:hover {
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pe-utmb-card {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }

    .pe-uc-header {
        display: grid;
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
        gap: 10px 15px;
        align-items: center;
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 15px;
    }

    .pe-uc-avatar {
        grid-column: 1;
        grid-row: 1 / 3;
        width: 80px;
        height: 80px;
        min-width: 80px;
        min-height: 80px;
        margin: 0 auto;
    }

    .pe-uc-info {
        grid-column: 2;
        grid-row: 1 / 3;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .pe-uc-info h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .pe-uc-stats {
        gap: 6px;
    }

    .pe-uc-races-list li {
        flex-direction: row;
        align-items: center;
        padding: 8px 0;
    }

    .pe-uc-race-name {
        font-size: 13px;
        padding-right: 10px;
        line-height: 1.2;
    }

    .pe-uc-race-meta {
        align-items: flex-end;
        text-align: right;
        min-width: 100px;
    }

    .pe-uc-race-date {
        font-size: 10px;
    }

    .pe-uc-race-pos {
        font-size: 11px;
    }

    .pe-uc-race-pos strong {
        font-size: 12px;
        padding: 1px 5px;
        margin-left: 4px;
        min-width: 16px;
    }
}