/* ============================================================
 * MatLuk FotoChallenge — Duell-Badges (Iter V.6)
 *
 * - Rotes Badge am mittleren Foto-CTA-Button (offene Duell-Einladungen)
 * - Rotes "Du wurdest herausgefordert!"-Badge auf der Duell-Card
 * - Limit-Warning im Duell-Hub-Modal wenn 3/3 erreicht
 * ============================================================ */

/* === Badge am mittleren CTA-Button === */
.bn-cta {
    position: relative;  /* damit absolute Badge sich daran ausrichtet */
}

.bn-cta-badge {
    position: absolute;
    top: 2px;
    right: 14px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 800;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5),
                0 0 0 2px rgba(11, 13, 18, 0.92);
    line-height: 1;
    z-index: 2;
    /* Pulse-Animation um Aufmerksamkeit zu lenken */
    animation: bn-cta-badge-pulse 2.4s ease-in-out infinite;
}

@keyframes bn-cta-badge-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5),
                    0 0 0 2px rgba(11, 13, 18, 0.92);
    }
    50% {
        transform: scale(1.12);
        box-shadow: 0 2px 12px rgba(239, 68, 68, 0.85),
                    0 0 0 2px rgba(11, 13, 18, 0.92);
    }
}

[data-theme="light"] .bn-cta-badge {
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5),
                0 0 0 2px white;
}

/* === Pending-Invite-Badge auf Duell-Card === */
.qx-card-overlay-badge.pending-invite-badge {
    background: #ef4444 !important;
    color: white !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    animation: pending-invite-pulse 2s ease-in-out infinite;
}

@keyframes pending-invite-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Card mit pending-invite: Border-Glow */
.qx-card.qx-card-duel.has-pending-invite {
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.6),
                0 4px 12px rgba(239, 68, 68, 0.25);
    animation: card-glow 2.4s ease-in-out infinite;
}

@keyframes card-glow {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.6),
                    0 4px 12px rgba(239, 68, 68, 0.25);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.9),
                    0 6px 18px rgba(239, 68, 68, 0.45);
    }
}

/* Alert-Text auf der Card */
.qx-card-info.qx-card-info-alert {
    color: #ef4444;
    font-weight: 600;
}

[data-theme="light"] .qx-card-info.qx-card-info-alert {
    color: #b91c1c;
}

@media (prefers-color-scheme: dark) {
    .qx-card-info.qx-card-info-alert {
        color: #fca5a5;
    }
}

/* === Duell-Limit-Warning im Hub-Modal === */
.duel-limit-warning {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg,
        rgba(239, 68, 68, 0.10),
        rgba(245, 158, 11, 0.06));
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    margin-bottom: 16px;
}

.duel-limit-warning-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.duel-limit-warning-text {
    flex: 1;
    min-width: 0;
}

.duel-limit-warning-text strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #b91c1c;
    margin-bottom: 4px;
}

.duel-limit-warning-text small {
    display: block;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text, #111827);
    margin-bottom: 10px;
}

.duel-limit-warning-btn {
    margin-top: 4px;
}

@media (prefers-color-scheme: dark) {
    .duel-limit-warning-text strong {
        color: #fca5a5;
    }
}
