﻿/* ============================
   EmotionTeachingCard (visuals only)
   Layout/centering/buttons handled by PageShell + layout.css/app.css
   ============================ */

/* Theme tokens scoped to this page */
.eqn-page.etc.kai {
    --ninja-color: #f7b32b;
    --card-bg: #fdf8e4;
    --vert-bg: #fdf8e4;
}

.eqn-page.etc.ryu {
    --ninja-color: #b22222;
    --card-bg: #ffe6e6;
    --vert-bg: #ffefef;
}

.eqn-page.etc.haru {
    --ninja-color: #4cae4c;
    --card-bg: #eaffea;
    --vert-bg: #f3fff3;
}

.eqn-page.etc.sora {
    --ninja-color: #3b4d72;
    --card-bg: #e0f0ff;
    --vert-bg: #eef6ff;
}

/* ---------- Header (avatar + title) ---------- */
.eqn-page.etc .etc-title {
    text-align: center;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ninja-color, #222);
}

/* Optional: refine avatar if not using .eqn-img */
.eqn-page.etc .etc-header img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f0f0f0;
    padding: 0.25rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

/* ---------- Text blocks (visuals only) ---------- */
.eqn-page.etc .etc-definition {
    margin: .1rem 0;
    font-size: 1rem;
    font-style: italic;
    color: #444;
    text-align: center;
}

.eqn-page.etc .etc-section-label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 600;
    font-size: 1.05rem;
    text-align: center;
}

/* ---------- Horizontal cards (responsive grid) ---------- */
.eqn-page.etc .etc-cards-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* default */
    gap: .75rem;
    justify-items: center;
}

    /* Exactly three cards: always 3 across, even on mobile */
    .eqn-page.etc .etc-cards-row.count-3 {
        grid-template-columns: repeat(3, 1fr);
    }

/* Default large-screen layout (for counts other than 3) */
@media (min-width: 840px) {
    .eqn-page.etc .etc-cards-row:not(.count-3) {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.eqn-page.etc .etc-card {
    width: 100%;
    max-width: 180px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--card-bg, #fafafa);
    border-radius: 1rem;
    padding: .75rem;
    text-align: center;
    font-size: .9rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    transition: background-color .2s ease, transform .15s ease, box-shadow .2s ease;
}

    .eqn-page.etc .etc-card:active {
        transform: scale(.98);
    }

    .eqn-page.etc .etc-card img {
        max-width: 48px;
        max-height: 48px;
        margin-bottom: .25rem;
        object-fit: contain;
        display: block;
    }

    .eqn-page.etc .etc-card .card-label {
        font-weight: 600;
    }

/* ---------- Vertical cue cards ---------- */
.eqn-page.etc .etc-vert-list {
    display: grid;
    gap: 0.5rem;
}

.eqn-page.etc .etc-vert-card {
    background: var(--vert-bg, #f7fafe);
    border-radius: 1rem;
    padding: .5rem .75rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    font-size: .95rem;
    font-weight: 500;
    text-align: left;
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 56px;
    transition: background-color .2s ease, transform .15s ease, box-shadow .2s ease;
}

    .eqn-page.etc .etc-vert-card img {
        width: 36px;
        height: 36px;
        object-fit: contain;
        flex-shrink: 0;
        border-radius: 50%;
    }

    /* ---------- Audio highlight state ---------- */
    .eqn-page.etc .etc-card.highlighted,
    .eqn-page.etc .etc-vert-card.highlighted {
        background-color: rgba(255, 249, 196, .5);
        box-shadow: 0 0 0 3px var(--ninja-color, #f7b32b);
        animation: etc-pulse-card .4s ease-in-out;
    }

@keyframes etc-pulse-card {
    0% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.01)
    }

    100% {
        transform: scale(1)
    }
}
