/* Edvera LMS — course page (buy box, curriculum) and catalogue. Inherits the theme's fonts and
   text colour; accents are variables a theme can override (--edv-accent etc.). They default to
   Settings → Appearance (--edv-brand-*, edvera_brand_css()); font-family:var(--edv-font-stack)
   inherits the theme's font unless a system or custom font is chosen there. Secondary text
   (--edv-muted) is the theme's own text colour at 80%, so it stays readable (4.5:1 and more) on
   light and dark themes alike; without color-mix() support it is simply the text colour.
   Also the embeddable pieces (class-edvera-shortcodes.php): course categories (.edv-ccat), course
   search (.edv-csearch), price (.edv-cprice) and my courses (.edv-mine). Catalogue layouts:
   .edv-cat--grid (default) / --list / --compact; .edv-cols-1…4 = at most N per row, fewer when the
   container is narrow (each card keeps --edv-min), so there is never a horizontal scroll. */
.edv-cbox,.edv-curr,.edv-cat,.edv-ccat,.edv-csearch,.edv-cprice,.edv-cprice-block,.edv-mine{--edv-accent:var(--edv-brand-accent,#17b8a6);--edv-accent-ink:var(--edv-brand-on-accent,#06231f);--edv-line:rgba(127,127,127,.3);--edv-soft:rgba(127,127,127,.08);--edv-muted:color-mix(in srgb,currentColor 80%,transparent);--edv-radius:min(14px,var(--edv-brand-radius,999px));font-family:var(--edv-font-stack)}
.edv-cbox{display:flex;flex-direction:column;gap:14px;margin:0 0 2em;padding:20px;border:1px solid var(--edv-line);border-radius:var(--edv-radius);background:var(--edv-soft)}
.edv-cbox .edv-buy{margin:0}
.edv-cbox-progress{margin:0;font-weight:600}
.edv-cbox-bar{height:8px;border-radius:min(99px,var(--edv-brand-radius,999px));background:var(--edv-line);overflow:hidden}
.edv-cbox-bar span{display:block;height:100%;background:var(--edv-accent)}
.edv-cbox-meta{display:flex;flex-wrap:wrap;gap:10px 24px;margin:0}
.edv-cbox-meta div{min-width:0}
.edv-cbox-meta dt{font-size:.85em;color:var(--edv-muted)}
.edv-cbox-meta dt,.edv-cbox-meta dd{margin:0;padding:0}
.edv-cbox-meta dd{font-weight:600}
.edv-course-desc{margin-block:1em}
.edv-curr{margin:2em 0}
.edv-curr-h{margin:0 0 .6em}
.edv-curr-topic{border:1px solid var(--edv-line);border-radius:var(--edv-radius);margin:0 0 10px;overflow:hidden}
.edv-curr-topic summary{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 16px;cursor:pointer;font-weight:700;background:var(--edv-soft);list-style:none}
.edv-curr-topic summary::-webkit-details-marker{display:none}
.edv-curr-topic summary::after{content:"+";font-weight:400;margin-inline-start:8px}
.edv-curr-topic[open] summary::after{content:"−"}
.edv-curr-tt{flex:1;min-width:0}
.edv-curr-tc{font-weight:400;font-size:.9em;color:var(--edv-muted);white-space:nowrap}
.edv-curr-list{list-style:none;margin:0;padding:0}
.edv-curr-item{display:flex;align-items:center;gap:12px;padding:12px 16px;border-top:1px solid var(--edv-line)}
.edv-curr-ic{flex:0 0 26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:.8em;background:var(--edv-soft);border:1px solid var(--edv-line)}
.edv-curr-ic .edv-icon{width:14px;height:14px}
.edv-curr-lock{display:inline-flex;align-items:center}
.edv-curr-lock .edv-icon{font-size:1.15em}
.edv-curr-item.is-done .edv-curr-ic{background:var(--edv-accent);color:var(--edv-accent-ink);border-color:var(--edv-accent)}
.edv-curr-title{flex:1;min-width:0;overflow-wrap:anywhere}
.edv-curr-dur,.edv-curr-lock{font-size:.85em;color:var(--edv-muted);white-space:nowrap}
.edv-curr-free{font-size:.8em;font-weight:700;padding:2px 10px;border-radius:min(99px,var(--edv-brand-radius,999px));background:var(--edv-accent);color:var(--edv-accent-ink);white-space:nowrap}
.edv-cat-filter{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}
.edv-cat-filter select,.edv-cat-filter input{min-height:44px;padding:0 12px;border:1px solid var(--edv-line);border-radius:min(10px,var(--edv-brand-radius,999px));font:inherit;min-width:0;flex:1 1 180px;box-sizing:border-box}
.edv-cat-filter button{min-height:44px;padding:0 18px;border:0;border-radius:min(10px,var(--edv-brand-radius,999px));background:var(--edv-accent);color:var(--edv-accent-ink);font:inherit;font-weight:700;cursor:pointer}
.edv-cat-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:20px}
.edv-cat-card{margin:0;border:1px solid var(--edv-line);border-radius:var(--edv-radius);overflow:hidden;display:flex;flex-direction:column;min-width:0}
.edv-cat-link{display:flex;flex-direction:column;flex:1 1 auto;width:100%;color:inherit;text-decoration:none}
.edv-cat-link:hover .edv-cat-title,.edv-cat-link:focus-visible .edv-cat-title{text-decoration:underline}
.edv-cat-img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;max-width:100%;height:auto}
.edv-cat-ph{background:linear-gradient(135deg,var(--edv-soft),var(--edv-line))}
.edv-cat-body{display:flex;flex-direction:column;gap:8px;padding:14px 16px;flex:1}
.edv-cat-title{font-weight:700;font-size:1.05em;line-height:1.4}
.edv-cat-excerpt{font-size:.92em;color:var(--edv-muted)}
.edv-cat-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:auto;font-size:.92em}
.edv-cat-price{font-weight:700}
.edv-cat-price del{font-weight:400;color:var(--edv-muted)}
.edv-cat-term{align-self:flex-start;font-size:.8em;font-weight:700;line-height:1.5;padding:1px 10px;border:1px solid var(--edv-line);border-radius:min(99px,var(--edv-brand-radius,999px));background:var(--edv-soft)}
.edv-cat-actions{display:block;padding:0 16px 16px}
.edv-cat-btn{display:flex;align-items:center;justify-content:center;min-height:44px;padding:0 16px;border-radius:min(10px,var(--edv-brand-radius,999px));background:var(--edv-accent);color:var(--edv-accent-ink);font-weight:700;text-decoration:none;text-align:center}
.edv-cat-btn:hover,.edv-cat-btn:focus-visible{text-decoration:underline;filter:brightness(.95)}
.edv-cat-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 16px;margin:0 0 16px}
.edv-cat-heading{margin:0;min-width:0;overflow-wrap:anywhere}
.edv-cat-all{font-weight:600;color:inherit;text-decoration:underline;text-underline-offset:.2em}
.edv-cat-empty{margin:0}
.edv-cat--list :where(.edv-cat-grid){grid-template-columns:minmax(0,1fr);--edv-min:320px}
.edv-cat--list .edv-cat-link{flex-direction:row;flex-wrap:wrap}
.edv-cat--list .edv-cat-link>.edv-cat-img{flex:1 1 220px;width:auto;align-self:flex-start}
.edv-cat--list .edv-cat-body{flex:999 1 260px;min-width:0}
.edv-cat--compact :where(.edv-cat-grid){grid-template-columns:minmax(0,1fr);gap:12px;--edv-gap:12px;--edv-min:240px}
.edv-cat--compact .edv-cat-card{border:0;border-radius:0;border-block-end:1px solid var(--edv-line);padding-block-end:12px;overflow:visible}
.edv-cat--compact .edv-cat-link{flex-direction:row;align-items:center;gap:12px}
.edv-cat--compact .edv-cat-link>.edv-cat-img{flex:0 0 64px;width:64px;height:64px;aspect-ratio:1;border-radius:min(10px,var(--edv-brand-radius,999px))}
.edv-cat--compact .edv-cat-body{padding:0;gap:2px;min-width:0}
.edv-cat--compact .edv-cat-title{font-size:1em}
.edv-cat--compact .edv-cat-foot{margin-top:2px}
.edv-cat--compact .edv-cat-actions{padding:10px 0 0}
.edv-cat--compact .edv-cat-heading,.edv-mine .edv-cat-heading{font-size:1.2em}
.edv-cat-one{max-width:420px;margin-block:1em}
.edv-cat-one.edv-cat--list{max-width:none}
.edv-cat-one>.edv-cat-card{height:100%}
.edv-ccat{margin-block:0 1.5em}
.edv-ccat-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,200px),1fr));gap:12px;--edv-gap:12px;--edv-min:160px}
.edv-ccat-item{margin:0;min-width:0}
.edv-ccat-link{display:flex;flex-direction:column;gap:4px;height:100%;box-sizing:border-box;padding:16px;border:1px solid var(--edv-line);border-radius:var(--edv-radius);background:var(--edv-soft);color:inherit;text-decoration:none}
.edv-ccat-link:hover,.edv-ccat-link:focus-visible{border-color:var(--edv-accent)}
.edv-ccat-link:hover .edv-ccat-name,.edv-ccat-link:focus-visible .edv-ccat-name{text-decoration:underline}
.edv-ccat-name{font-weight:700;overflow-wrap:anywhere}
.edv-ccat-count{font-size:.9em;color:var(--edv-muted)}
.edv-ccat--list :where(.edv-ccat-list){grid-template-columns:minmax(0,1fr);gap:0}
.edv-ccat--list .edv-ccat-link{flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 12px;padding:10px 0;border:0;border-block-end:1px solid var(--edv-line);border-radius:0;background:none}
/* At most N per row (after the layout rules, so a list or compact layout can have columns too). */
.edv-cols-1{grid-template-columns:minmax(0,1fr)}
.edv-cols-2,.edv-cols-3,.edv-cols-4{grid-template-columns:repeat(auto-fill,minmax(max(min(100%,var(--edv-min,180px)),calc((100% - (var(--edv-n) - 1) * var(--edv-gap,20px)) / var(--edv-n))),1fr))}
.edv-cols-2{--edv-n:2}
.edv-cols-3{--edv-n:3}
.edv-cols-4{--edv-n:4}
.edv-csearch{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 1em}
.edv-csearch input[type=search]{flex:1 1 200px;min-width:0;min-height:44px;padding:0 12px;border:1px solid var(--edv-line);border-radius:min(10px,var(--edv-brand-radius,999px));font:inherit;box-sizing:border-box}
.edv-csearch button{min-height:44px;padding:0 18px;border:0;border-radius:min(10px,var(--edv-brand-radius,999px));background:var(--edv-accent);color:var(--edv-accent-ink);font:inherit;font-weight:700;cursor:pointer}
.edv-csearch button:hover,.edv-csearch button:focus-visible{filter:brightness(.92)}
.edv-cprice{font-weight:700}
.edv-cprice del{font-weight:400;color:var(--edv-muted)}
.edv-cprice-block{margin-block:0 1em;font-size:1.25em}
.edv-enroll{margin-block:.5em 1em}
.edv-mine{margin-block:0 1.5em}
.edv-mine-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.edv-mine-item{margin:0;min-width:0}
.edv-mine-link{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid var(--edv-line);border-radius:var(--edv-radius);color:inherit;text-decoration:none}
.edv-mine-link:hover .edv-mine-title,.edv-mine-link:focus-visible .edv-mine-title{text-decoration:underline}
.edv-mine-img{display:block;flex:0 0 56px;width:56px;height:56px;object-fit:cover;border-radius:min(10px,var(--edv-brand-radius,999px))}
.edv-mine-body{display:flex;flex-direction:column;gap:4px;flex:1 1 auto;min-width:0}
.edv-mine-title{font-weight:700;line-height:1.35;overflow-wrap:anywhere}
.edv-mine-status,.edv-mine-pct{font-size:.85em;color:var(--edv-muted)}
.edv-mine-item.is-done .edv-mine-status{color:inherit;font-weight:600}
.edv-mine-bar{display:block;height:6px;border-radius:min(99px,var(--edv-brand-radius,999px));background:var(--edv-line);overflow:hidden}
.edv-mine-bar span{display:block;height:100%;background:var(--edv-accent)}
.edv-mine-note{margin:0}
.edv-mine-note a{font-weight:600}
.edv-cat-pages ul{list-style:none;display:flex;flex-wrap:wrap;gap:6px;padding:0;margin:20px 0 0}
.edv-cat-pages a,.edv-cat-pages span{display:inline-flex;min-width:40px;min-height:40px;align-items:center;justify-content:center;padding:0 10px;border:1px solid var(--edv-line);border-radius:min(10px,var(--edv-brand-radius,999px));text-decoration:none}
.edv-cat-pages .current{background:var(--edv-accent);color:var(--edv-accent-ink);border-color:var(--edv-accent)}
/* Line icons (edvera_icon()): 1em, currentColor; directional ones mirror in RTL, media symbols never. */
.edv-icon{display:inline-block;flex:0 0 auto;vertical-align:-.125em}
[dir=rtl] .edv-i-dir{transform:scaleX(-1)}
[dir=rtl] [dir=ltr] .edv-i-dir{transform:none}
.edv-cbox .screen-reader-text,.edv-curr .screen-reader-text,.edv-cat .screen-reader-text,.edv-ccat .screen-reader-text,.edv-csearch .screen-reader-text,.edv-cprice .screen-reader-text,.edv-mine .screen-reader-text,.edv-curr .edv-vh,.edv-cat .edv-vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
