/* === CARD INFO FLIP (Issue #24, #26, #27, #28) === */
/* Wrapper folgt der Kartenbreite aus game.css (auch Media-Queries) — NICHT fix. */
.wq-flipper {
    position: relative;
    width: fit-content;
    margin: 0 auto;
    perspective: 1200px;
}

.wq-card-inner {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.wq-flipper.flipped .wq-card-inner {
    transform: rotateY(180deg);
}

.wq-card-front {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.wq-info-back {
    position: absolute;
    inset: 0;
    transform: rotateY(180deg);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    color: #dff3ff;
    background: linear-gradient(145deg, #12325a 0%, #0e2a4a 100%);
    padding: 14px 14px 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* --- #26: Info-Icon im Fact-Bereich (card-footer), hellgrau --- */
.wq-info-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    background: rgba(30, 60, 114, 0.06);
    border: 1px solid rgba(30, 60, 114, 0.25);
    color: #8a94a3;
    font-weight: 700;
    font-size: 0.9em;
    font-style: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, color 0.2s;
    user-select: none;
    -webkit-user-select: none;
}

.wq-info-icon:hover {
    background: rgba(30, 60, 114, 0.12);
    color: #5d6b7d;
    transform: scale(1.08);
}

/* card-footer als Fact-Bereich: Text links, Icon rechts */
.card-footer.wq-has-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.card-footer.wq-has-info .wq-info-icon {
    align-self: flex-start;
    margin-top: 0;
}

.card-footer .card-fact-text {
    flex: 1;
}

/* --- #28: Kategorie-Badges auf der Rueckseite --- */
.wq-fact-cat {
    display: block;
    width: fit-content;
    font-size: 0.62em;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7fd8ff;
    background: rgba(0, 212, 255, 0.12);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 1px 7px;
    margin-bottom: 5px;
}

.wq-info-close {
    align-self: flex-end;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #dff3ff;
    border-radius: 12px;
    padding: 4px 14px;
    font-size: 0.85em;
    cursor: pointer;
    transition: background 0.2s;
}

.wq-info-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.wq-info-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.wq-info-head h3 {
    margin: 0;
    font-size: 1.1em;
    color: #ffffff;
}

.wq-info-head .sci {
    font-style: italic;
    opacity: 0.75;
    font-size: 0.75em;
}

.wq-info-facts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.wq-info-facts li {
    font-size: 0.8em;
    line-height: 1.45;
    padding: 7px 9px;
    background: rgba(255, 255, 255, 0.07);
    border-left: 3px solid #00d4ff;
    border-radius: 6px;
}

.wq-info-src {
    margin-top: 12px;
    font-size: 0.72em;
    opacity: 0.8;
}

.wq-info-src a {
    color: #7fd8ff;
    text-decoration: underline;
}

@media (hover: none) {
    .wq-info-icon:hover {
        transform: none;
    }
}
