/* Course Certificates Lite — Frontend */
:root {
    --gold:   #b49650;
    --green:  #2d7a4f;
    --dark:   #1a1a1a;
    --text:   #555;
    --bg:     #faf7f0;
    --border: #e8e0d0;
    --r:      10px;
    --sh:     0 2px 14px rgba(0,0,0,.08);
}

/* ── Кнопки ── */
.wccc-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 9px 20px; border-radius: 6px;
    background: var(--gold); color: #fff !important;
    font-size: 13px; font-weight: 600; cursor: pointer;
    border: 2px solid transparent; text-decoration: none;
    transition: background .18s, transform .1s;
    margin: 3px 4px 3px 0; white-space: nowrap;
}
.wccc-btn:hover            { background: #9a7c3a; transform: translateY(-1px); }
.wccc-btn:disabled         { background: #ccc; cursor: default; transform: none; }
.wccc-btn-outline          { background: transparent; border-color: var(--gold); color: var(--gold) !important; }
.wccc-btn-outline:hover    { background: var(--gold); color: #fff !important; }
.wccc-btn-done             { background: var(--green); }
.wccc-btn-cert             { background: #6f42c1; }
.wccc-btn-cert:hover       { background: #5a329a; }
.wccc-btn-sm               { padding: 6px 14px; font-size: 12px; }

/* ── Закрытый урок ── */
.wccc-locked {
    text-align: center; padding: 50px 24px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--r); margin: 24px 0;
}
.wccc-locked-icon { font-size: 44px; margin-bottom: 14px; }
.wccc-locked h3   { font-size: 20px; margin-bottom: 10px; color: var(--dark); }
.wccc-locked p    { color: var(--text); margin-bottom: 18px; }

/* ── Футер урока ── */
.wccc-lesson-footer {
    margin-top: 36px; padding: 20px 24px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--r); display: flex; flex-wrap: wrap;
    align-items: center; gap: 10px;
}

/* ── Шорткод: сертификаты ── */
.wccc-empty {
    text-align: center; padding: 40px 20px; color: var(--text);
}
.wccc-empty-icon { font-size: 44px; display: block; margin-bottom: 12px; }

.wccc-certs-wrap { display: grid; gap: 16px; }
.wccc-cols-1 { grid-template-columns: 1fr; }
.wccc-cols-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.wccc-cols-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.wccc-cert-card {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas: "body qr" "body qr";
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--r); box-shadow: var(--sh);
    overflow: hidden; transition: box-shadow .2s;
}
.wccc-cert-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.wccc-cert-thumb { grid-area: none; display: none; } /* скрываем превью — мешает в компактном виде */
.wccc-cert-body  {
    grid-area: body; padding: 18px;
    display: flex; flex-direction: column; gap: 4px;
}
.wccc-cert-trophy { font-size: 28px; margin-bottom: 6px; }
.wccc-cert-title  { font-size: 15px; color: var(--dark); font-weight: 700; margin: 0; }
.wccc-cert-date   { font-size: 12px; color: #aaa; margin: 0; }
.wccc-cert-num    { font-size: 11px; color: #bbb; font-family: monospace; margin: 0; }
.wccc-cert-num span { color: #888; }
.wccc-cert-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }

.wccc-cert-qr {
    grid-area: qr; padding: 14px 14px 14px 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; opacity: .7; transition: opacity .2s;
}
.wccc-cert-qr:hover { opacity: 1; }
.wccc-cert-qr p { font-size: 9px; color: #bbb; text-align: center; margin: 0; }

/* ── Шорткод: грид уроков ── */
.wccc-lessons-grid { display: grid; gap: 20px; }

.wccc-lesson-card {
    border: 1px solid var(--border); border-radius: var(--r);
    background: #fff; box-shadow: var(--sh);
    overflow: hidden; transition: box-shadow .2s, transform .15s;
}
.wccc-lesson-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.1); transform: translateY(-2px); }
.wccc-lesson-card.is-done { border-color: #86efac; background: #f6fdf9; }

.wccc-lesson-card-img {
    position: relative; overflow: hidden; aspect-ratio: 16/9;
    background: #f0ece0;
}
.wccc-lesson-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wccc-lesson-no-img {
    width: 100%; height: 100%; display: flex;
    align-items: center; justify-content: center; font-size: 36px;
}
.wccc-lesson-card.is-locked .wccc-lesson-card-img { filter: grayscale(.4); }

.wccc-badge-done,
.wccc-badge-locked {
    position: absolute; top: 10px; right: 10px;
    padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.wccc-badge-done   { background: var(--green); color: #fff; }
.wccc-badge-locked { background: rgba(0,0,0,.55); color: #fff; }

.wccc-lesson-card-body { padding: 16px; }
.wccc-lesson-card-body h3 { font-size: 15px; margin: 0 0 6px; color: var(--dark); }
.wccc-lesson-card-body h3 a { color: inherit; text-decoration: none; }
.wccc-lesson-card-body h3 a:hover { color: var(--gold); }
.wccc-lesson-desc { font-size: 13px; color: #999; margin: 0 0 12px; line-height: 1.5; }

/* ── Адаптив ── */
@media (max-width: 600px) {
    .wccc-cols-2,
    .wccc-cols-3,
    .wccc-lessons-grid { grid-template-columns: 1fr; }
    .wccc-cert-card { grid-template-columns: 1fr; }
    .wccc-cert-qr   { flex-direction: row; justify-content: flex-start; padding: 0 14px 14px; }
}
