/* Public collection page. The page shell (title, meta, errors, buttons) comes
   from learn-lesson.css; this file styles the list, the inline lesson view and
   the "Посмотреть" toggle. */

.learn-description {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--fc-color-text-muted);
}

.learn-collection {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.learn-collection__item {
    padding: 14px 16px;
    border: 1px solid var(--fc-color-border);
    border-radius: 14px;
    background: var(--fc-color-surface);
}

.learn-collection__row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.learn-collection__index {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--fc-color-surface-soft);
    color: var(--fc-color-text-muted);
    font-size: 13px;
    font-weight: 700;
}

.learn-collection__body {
    display: grid;
    flex: 1 1 auto;
    gap: 2px;
    min-width: 0;
}

.learn-collection__title {
    overflow: hidden;
    color: var(--fc-color-text);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.learn-collection__title:hover,
.learn-collection__title:focus-visible {
    color: var(--fc-color-primary-hover);
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.learn-collection__meta {
    font-size: 13px;
    color: var(--fc-color-text-muted);
}

/* White button with a light border, matching the quiet actions on the lesson
   page (the shared .fc-secondary-btn fills the row below 768px, which would
   push the card apart here). */

.learn-collection__toggle {
    flex: 0 0 auto;
    gap: 6px;
    width: auto;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--fc-color-surface);
    font-size: 14px;
}

.learn-collection__toggle:hover,
.learn-collection__toggle:focus-visible {
    background: var(--fc-color-surface-soft);
}

.learn-collection__toggle i {
    font-size: 12px;
    transition: transform 0.15s ease;
}

.learn-collection__toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.learn-collection__panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--fc-color-border);
}

.learn-collection__preview {
    overflow: hidden;
    border: 1px solid var(--fc-color-border);
    border-radius: 14px;
}

.learn-collection__preview .learn-preview__frame {
    height: 560px;
}

.learn-collection__preview .learn-preview__cover {
    min-height: 320px;
    padding: 24px;
}

.learn-collection__actions {
    margin-top: 14px;
}

.learn-collection__error {
    margin-top: 10px;
}

@media (max-width: 640px) {
    .learn-collection__row {
        flex-wrap: wrap;
    }

    .learn-collection__body {
        flex: 1 1 60%;
    }

    .learn-collection__toggle {
        flex: 1 1 100%;
        justify-content: center;
    }

    .learn-collection__class {
        flex: 1 1 100%;
        justify-content: center;
    }

    .learn-collection__preview .learn-preview__frame {
        height: 480px;
    }
}
