/*
 * Coding Ireland proprietary interactive activity
 * Copyright (c) 2017-2026 Coding Ireland. All rights reserved.
 *
 * Part of the Coding Ireland online learning platform. Licensed for use only
 * as delivered on the platform. Copying, redistributing, or adapting this
 * file, in whole or in part, for use in any other product or service is not
 * permitted. Ref: CI-digital-media-literacy-feed-ranker
 */
/* feed-ranker — "be the algorithm" (Digital Media Literacy, Strand 2).
 * Builds on activity-common.css + maths-activity.css (header, controls and
 * display-mode header-hiding come from those). Component styles below. */

.fr-stage { display: flex; flex-direction: column; gap: 16px; padding: 4px 2px 8px; }

.fr-scenario {
    background: #eef3f8;
    border-left: 5px solid #457b9d;
    border-radius: 10px;
    padding: 12px 16px;
    font-weight: 600;
    color: #1d3557;
}

.fr-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr);
    gap: 18px;
    align-items: start;
}
@media (max-width: 760px) { .fr-layout { grid-template-columns: 1fr; } }

.fr-feed-wrap { display: flex; flex-direction: column; gap: 8px; }
.fr-feed-label { font-weight: 800; color: #1d3557; display: flex; align-items: center; gap: 8px; }

.fr-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fr-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 2px solid #d9e2ec;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 4px 12px rgba(29, 53, 87, .06);
    transition: border-color .15s ease, transform .15s ease, background .3s ease;
}
.fr-card.is-ranked { animation: frRank .4s ease; }
@keyframes frRank { from { background: #fff7e6; transform: translateY(4px); } to { background: #fff; transform: translateY(0); } }

.fr-rank {
    flex: 0 0 auto;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #1d3557; color: #fff;
    font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
}
.fr-card-emoji { font-size: 1.7rem; line-height: 1; flex: 0 0 auto; }
.fr-card-body { flex: 1 1 auto; min-width: 0; }
.fr-card-label { display: block; font-weight: 700; color: #20303f; }
.fr-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.fr-tag {
    font-size: .78rem;
    background: #eef3f8;
    color: #44607a;
    border-radius: 999px;
    padding: 2px 9px;
    white-space: nowrap;
}
.fr-moves { flex: 0 0 auto; display: flex; flex-direction: column; gap: 4px; }
.fr-move {
    border: none;
    background: #e7eef5;
    color: #1d3557;
    width: 32px; height: 26px;
    border-radius: 7px;
    cursor: pointer;
    transition: background .12s ease;
}
.fr-move:hover:not(:disabled) { background: #cfe0ee; }
.fr-move:disabled { opacity: .3; cursor: default; }

.fr-side { display: flex; flex-direction: column; gap: 14px; }
.fr-goal-label { font-weight: 800; color: #1d3557; margin-bottom: 8px; }
.fr-goal-options { display: flex; flex-direction: column; gap: 9px; }
.fr-goal-btn {
    text-align: left;
    border: 2px solid #c7d4e2;
    background: #fff;
    color: #1d3557;
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 1.02rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease, transform .1s ease;
}
.fr-goal-btn:hover { border-color: #457b9d; transform: translateY(-1px); }
.fr-goal-btn.is-active { border-color: #2a9d8f; background: #e7f6f3; }
.fr-goal-hint { font-size: .9rem; color: #8a5a00; }

.fr-reveal {
    background: #fff4d6;
    border: 2px solid #f0cd93;
    border-radius: 14px;
    padding: 14px 16px;
    opacity: 0;
    transform: translateY(6px);
}
.fr-reveal.is-in { animation: frReveal .35s ease forwards; }
@keyframes frReveal { to { opacity: 1; transform: translateY(0); } }
.fr-reveal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.fr-reveal-badge {
    width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #e9a23b; color: #fff; flex: 0 0 auto;
}
.fr-reveal-label { font-weight: 800; color: #1d3557; }
.fr-reveal-explain { margin: 0; color: #2c3e50; line-height: 1.5; }

.fr-discuss { border-top: 1px dashed #cdd9e5; padding-top: 12px; }
.fr-discuss-btn {
    border: 2px solid #457b9d; background: #fff; color: #457b9d;
    border-radius: 999px; padding: 8px 16px; font-weight: 700; cursor: pointer;
}
.fr-discuss-btn:disabled { opacity: .45; cursor: default; }
.fr-discuss-hint { font-size: .88rem; color: #8a5a00; margin-top: 6px; }
.fr-discuss-list { margin: 10px 0 0; padding-left: 20px; color: #34495e; }
.fr-discuss-list li { margin: 4px 0; }

.fr-empty { text-align: center; color: #5b6b7b; padding: 40px 0; font-style: italic; }

.fr-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* Display mode (IWB): enlarge for whole-class scrutiny; framework hides header. */
body.display-mode .fr-card-label { font-size: 1.35rem; }
body.display-mode .fr-tag { font-size: .95rem; }
body.display-mode .fr-card-emoji { font-size: 2.2rem; }
body.display-mode .fr-goal-btn { font-size: 1.2rem; padding: 14px 18px; }
body.display-mode .fr-reveal-explain { font-size: 1.25rem; }
