﻿.step-content {
    display: none;
    animation: fadeIn .35s ease-in-out;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.draggable-chip {
    display: flex;
    align-items: flex-start;
    cursor: grab;
    font-size: .94rem;
    line-height: 1.3;
    height: 10rem;
    overflow-y: auto;
    touch-action: manipulation;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.draggable-chip:hover,
.draggable-chip:focus-visible,
.draggable-chip.chip-selected {
    scrollbar-color: rgba(100, 116, 139, .45) transparent;
}

.draggable-chip::-webkit-scrollbar {
    width: .38rem;
    background: transparent;
}

.draggable-chip:hover::-webkit-scrollbar,
.draggable-chip:focus-visible::-webkit-scrollbar,
.draggable-chip.chip-selected::-webkit-scrollbar {
    width: .38rem;
}

.draggable-chip::-webkit-scrollbar-track {
    background: transparent;
}

.draggable-chip::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
}

.draggable-chip:hover::-webkit-scrollbar-thumb,
.draggable-chip:focus-visible::-webkit-scrollbar-thumb,
.draggable-chip.chip-selected::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, .45);
}

.draggable-chip::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.draggable-chip:hover,
.draggable-chip.chip-selected {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 118, 110, .12);
}

.chip-selected {
    border-color: #0d9488 !important;
    background: #f0fdfa !important;
    color: #134e4a !important;
}

.exercise-board {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.exercise-source-card {
    overflow: hidden;
}

.exercise-chip {
    width: 100%;
}

.exercise-zones {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1fr;
}

.exercise-zone-card {
    height: 100%;
}

.exercise-card.zone-ready {
    border-color: #14b8a6;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, .12);
}

.drop-slot {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-height: 3.5rem;
    border: 1px dashed #cbd5e1;
    border-radius: .75rem;
    padding: .75rem;
    background: rgba(248, 250, 252, .8);
}

.source-list {
    flex-direction: row;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: .5rem;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 transparent;
}

.source-list::-webkit-scrollbar {
    height: .55rem;
}

.source-list::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 999px;
}

.source-list .exercise-chip {
    flex: 0 0 20rem;
}

.sortable-ghost {
    opacity: .82;
}

.sortable-chosen {
    cursor: grabbing;
}

.sortable-drag {
    cursor: grabbing;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .16);
}

.sortable-swap-highlight {
    box-shadow: 0 0 0 2px rgba(20, 184, 166, .2);
}

.sortable-fallback {
    transform: rotate(1deg);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
}

.chip-correct {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
    color: #166534 !important;
}

.chip-wrong {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #991b1b !important;
}

#wordcloud-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.image-zoom-trigger {
    width: 100%;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    text-align: inherit;
}

.image-zoom-trigger-compact {
    max-width: 32rem;
    margin: 0 auto;
}

.image-zoom-trigger img {
    display: block;
    width: 100%;
    transition: transform .15s ease, box-shadow .15s ease;
}

.image-zoom-trigger:hover img,
.image-zoom-trigger:focus-visible img {
    transform: scale(1.01);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}

.image-lightbox-open {
    overflow: hidden;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, .78);
}

.image-lightbox[hidden] {
    display: none;
}

.image-lightbox-panel {
    position: relative;
    width: min(92vw, 70rem);
    max-height: 92vh;
    padding: 1rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}

.image-lightbox-close {
    position: absolute;
    top: .75rem;
    right: .75rem;
    border: 0;
    border-radius: 999px;
    width: 2.4rem;
    height: 2.4rem;
    background: rgba(15, 23, 42, .08);
    color: #0f172a;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
    background: rgba(15, 23, 42, .14);
}

.image-lightbox-figure {
    margin: 0;
}

.image-lightbox-image {
    display: block;
    width: 100%;
    max-height: calc(92vh - 5.5rem);
    object-fit: contain;
    border-radius: .75rem;
    border: 1px solid #e2e8f0;
}

.image-lightbox-caption {
    margin-top: .75rem;
    padding-right: 2.75rem;
    font-size: .875rem;
    color: #475569;
}

.word-list-item {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .65rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}

.word-list-label {
    font-size: .875rem;
    color: #334155;
}

.word-vote-button {
    border: 1px solid #0f766e;
    border-radius: 999px;
    padding: .28rem .62rem;
    background: #f0fdfa;
    color: #0f766e;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.word-vote-button:hover {
    background: #ccfbf1;
}

.word-vote-button.is-active {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}

.word-vote-button.is-active:hover {
    background: #115e59;
    border-color: #115e59;
}

.word-action-button {
    border: 0;
    border-radius: 999px;
    padding: .2rem .45rem;
    background: #0f766e;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.word-action-button:hover {
    background: #115e59;
}

.word-action-button-subtle {
    background: #e2e8f0;
    color: #334155;
}

.word-action-button-subtle:hover {
    background: #cbd5e1;
}

.word-action-button-danger {
    background: #fee2e2;
    color: #991b1b;
}

.word-action-button-danger:hover {
    background: #fecaca;
}

.focus-group-card {
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.focus-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.focus-card-column {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.focus-option-card {
    width: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: .65rem;
    padding: .95rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: .9rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    text-align: left;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease, transform .15s ease;
}

.focus-option-card:hover {
    border-color: #0f766e;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.focus-option-card.is-active {
    border-color: #0f766e;
    background: linear-gradient(180deg, #f0fdfa 0%, #ccfbf1 100%);
    box-shadow: 0 0 0 2px rgba(15, 118, 110, .08);
}

.focus-option-text {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    min-width: 0;
}

.focus-option-header {
    display: flex;
    align-items: center;
}

.focus-option-title {
    font-size: .96rem;
    font-weight: 700;
    color: #0f172a;
}

.focus-option-description {
    font-size: .79rem;
    line-height: 1.45;
    color: #475569;
}

.focus-option-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: .75rem;
    min-width: 0;
}

.focus-option-count {
    font-size: .78rem;
    font-weight: 700;
    color: #0f766e;
    white-space: nowrap;
    margin-left: auto;
}

.focus-option-action {
    font-size: .72rem;
    color: #64748b;
    line-height: 1.35;
    text-wrap: balance;
}

.focus-group-badge {
    display: inline-flex;
    align-items: center;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: .72rem;
    font-weight: 700;
}

.focus-group-badge.is-custom {
    background: #ede9fe;
    color: #6d28d9;
}

@media (max-width: 767px) {
    .focus-option-footer {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

@media (min-width: 768px) {
    .focus-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .exercise-zones {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .exercise-zones-wide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
