/* public/css/ns-drills.css */

/* Base namespace */
.lfl-drills {
    --lfl-gap: 1rem;
}

/* Header */
.lfl-drills__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--lfl-gap);
}

.lfl-drills__title {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
}

.lfl-drills__meta {
    opacity: 0.85;
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.lfl-drills__mode,
.lfl-drills__count,
.lfl-drills__voice {
    font-weight: 600;
}

/* Toolbar */
.lfl-drills__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: .25rem 0 .75rem;
}

.lfl-drills__counter {
    font-weight: 600;
}

/* Empty state */
.lfl-drills__empty {
    border: 1px dashed #cfcfcf;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

/* Deck / Cards */
.lfl-drills__deck {
    position: relative;
}

.lfl-drill-card {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .03);
}

.lfl-drill-card.lfl-drill--hidden {
    display: none;
}

.lfl-drill-card.lfl-drill--current {
    display: block;
}

.lfl-drill-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .5rem;
}

.lfl-drill-card__instruction {
    font-weight: 600;
}

.lfl-drill-card__progress {
    opacity: .8;
    font-size: .95rem;
}

.lfl-drill-card__sentence {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: .5rem 0 1rem;
}

.lfl-drill-hl {
    background: #fff3b0;
    padding: .05rem .25rem;
    border-radius: .25rem;
}

.lfl-drill-card__input input.lfl-drill-answer {
    width: 100%;
    padding: .65rem .8rem;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    font-size: 1rem;
}

.lfl-drill-card__feedback {
    min-height: 1.25rem;
    margin-top: .5rem;
    font-weight: 600;
}

.lfl-drill-card__feedback.lfl-is-good {
    color: #157347;
}

.lfl-drill-card__feedback.lfl-is-bad {
    color: #b02a37;
}

.lfl-drill-card__feedback.lfl-is-reveal {
    color: #333;
}

/* Buttons (scoped) */
.lfl-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid #ccc;
    background: #f6f6f6;
    padding: .5rem .8rem;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: .95rem;
}

.lfl-btn:hover {
    background: #efefef;
}

.lfl-btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

.lfl-btn.lfl-btn--secondary {
    background: #f0f0f0;
}

/* Card footer */
.lfl-drill-card__foot {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .75rem;
}

/* Completion message */
.lfl-drills__complete {
    text-align: center;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px dashed #cfcfcf;
    margin-top: .5rem;
}

/* Actions row (back) */
.lfl-drills__actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 480px) {
    .lfl-drills__header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Modern progress */
.lfl-drills__progressbar {
    margin-bottom: 1rem;
}

.lfl-progress {
    height: 8px;
    background: #f0f0f0;
    border-radius: 999px;
    overflow: hidden;
}

.lfl-progress__bar {
    height: 100%;
    background: #4f46e5;
    /* indigo */
    transform-origin: left center;
    transform: scaleX(var(--progress, 0));
    transition: transform 0.3s ease;
}

.lfl-progress__meta {
    margin-top: .25rem;
    font-size: 0.9rem;
    color: #666;
    text-align: right;
}

/* Modern card appearance */
.lfl-drill-card {
    border: 1px solid #e6e6e6;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    transition: transform .15s ease, box-shadow .15s ease, border-color .2s ease;
}

.lfl-drill-card:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.lfl-drill-card__foot {
    justify-content: space-between;
}

.lfl-btn {
    border-radius: 10px;
    padding: 0.6rem 1rem;
}

.lfl-drill-hl {
    background: #e0e7ff;
    border-radius: 6px;
    padding: 0 0.3rem;
}