/*
Theme Name:   Edumall Child – Haiku Academy v2
Theme URI:    https://academy.tiendahaiku.com
Description:  Child theme – Haiku Academy
Author:       Haiku
Version:      2.5.0
Template:     edumall
*/

:root {
  --hk: #97C33D;
  --hk-dk: #7BA832;
  --hk-lt: #EDF5D8;
  --hk-txt: #333;
  --hk-txt2: #666;
  --hk-txt3: #999;
  --hk-bg: #fff;
  --hk-bg2: #F8F8F8;
  --hk-bdr: #E5E5E5;
  --hk-bdr2: #EFEFEF;
  --hk-bar: 56px;
  --hk-side: 355px;
  --hk-bottom: 64px;
  --hk-r: 8px;
  --hk-pad: 32px;
  --hk-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── RESET ── */
body.single-lesson { margin:0; padding:0; font-family:var(--hk-font); color:var(--hk-txt); background:var(--hk-bg); -webkit-font-smoothing:antialiased; }
body.single-lesson #page-title-bar, body.single-lesson .page-title-bar-inner, body.single-lesson .site-header, body.single-lesson .site-footer, body.single-lesson footer.site-footer, body.single-lesson .footer-wrapper { display:none!important; }

/* ── TOPBAR ── */
.hk-topbar { position:fixed; top:0; left:0; right:0; z-index:1000; height:var(--hk-bar); background:var(--hk-bg); border-bottom:1px solid var(--hk-bdr); display:flex; align-items:center; padding:0 14px; gap:10px; }
.hk-topbar__logo { flex-shrink:0; display:flex; text-decoration:none; }
.hk-topbar__back { display:flex; align-items:center; gap:3px; font-size:13px; font-weight:500; color:var(--hk-txt); text-decoration:none; max-width:200px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hk-topbar__back:hover { color:var(--hk); }
.hk-topbar__back svg { flex-shrink:0; opacity:.5; }
.hk-topbar__back span { overflow:hidden; text-overflow:ellipsis; }
.hk-topbar__divider { width:1px; height:22px; background:var(--hk-bdr); flex-shrink:0; }
.hk-topbar__lesson { font-size:13px; color:var(--hk-txt2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.hk-topbar__spacer { flex:1; }
.hk-topbar__prog { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.hk-topbar__prog-track { width:72px; height:5px; background:var(--hk-bdr); border-radius:3px; overflow:hidden; }
.hk-topbar__prog-fill { height:100%; background:var(--hk); border-radius:3px; transition:width .6s ease; }
.hk-topbar__prog-pct { font-size:12px; font-weight:600; color:var(--hk); }

/* Mark complete button - VERY SPECIFIC to override theme */
.hk-topbar__mark { flex-shrink:0; }
.hk-topbar__mark button, .hk-topbar__mark input[type="submit"],
.hk-topbar__mark .tutor-btn, .hk-topbar__mark [type="submit"],
.hk-topbar__mark .tutor-lesson-complete-form-wrap button,
.hk-topbar__mark .tutor-lesson-complete-form-wrap input[type="submit"] {
  background:var(--hk)!important; color:#fff!important; border:none!important;
  border-radius:6px!important; padding:8px 16px!important; font-size:12px!important;
  font-weight:600!important; cursor:pointer!important; line-height:1.3!important;
  box-shadow:0 1px 3px rgba(151,195,61,.3)!important; transition:background .2s!important;
}
.hk-topbar__mark button:hover, .hk-topbar__mark input[type="submit"]:hover,
.hk-topbar__mark .tutor-btn:hover { background:var(--hk-dk)!important; }
.tutor-lesson-complete-form-wrap { margin:0!important; padding:0!important; }

/* Toggle sidebar button */
.hk-topbar__toggle { flex-shrink:0!important; background:var(--hk-bg2)!important; border:1px solid var(--hk-bdr)!important;
  border-radius:6px!important; width:38px!important; height:38px!important; display:flex!important;
  align-items:center!important; justify-content:center!important; cursor:pointer!important;
  color:var(--hk-txt)!important; transition:all .2s!important; padding:0!important; }
.hk-topbar__toggle:hover { border-color:var(--hk)!important; color:var(--hk)!important; background:var(--hk-lt)!important; }
.hk-topbar__toggle svg { width:18px!important; height:18px!important; stroke:currentColor!important; display:block!important; }

/* ── LAYOUT ── */
.hk-layout { margin-top:var(--hk-bar); display:flex; min-height:calc(100vh - var(--hk-bar)); position:relative; }
.hk-main { flex:1; min-width:0; margin-right:var(--hk-side); padding-bottom:var(--hk-bottom); transition:margin .25s ease; }
.hk-main.is-full { margin-right:0; }

/* ── VIDEO ── */
.hk-video { background:#000; width:100%; }
.hk-video iframe, .hk-video video, .hk-video .tutor-video-player, .hk-video .plyr, .hk-video .tutor-single-lesson-video-player { width:100%!important; max-height:65vh!important; }
.tutor-video-player .plyr__control--overlaid { background:var(--hk)!important; }

/* ── TABS — full width, LEFT aligned ── */
.hk-tabs-bar { display:flex; gap:0; border-bottom:2px solid var(--hk-bdr2); background:var(--hk-bg);
  position:sticky; top:var(--hk-bar); z-index:50; padding:4px 0 0 var(--hk-pad); justify-content:flex-start; }
.hk-tab { display:inline-flex; align-items:center; gap:5px; padding:13px 18px; font-size:13px; font-weight:500;
  color:var(--hk-txt3); background:none; border:none; border-bottom:2px solid transparent; margin-bottom:-2px;
  cursor:pointer; transition:all .2s; white-space:nowrap; }
.hk-tab:hover { color:var(--hk-txt); }
.hk-tab.is-active { color:var(--hk); border-bottom-color:var(--hk); font-weight:600; }
.hk-tab svg { opacity:.5; }
.hk-tab.is-active svg { opacity:1; stroke:var(--hk); }
.hk-tab__count { display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px;
  padding:0 5px; background:var(--hk); color:#fff; font-size:10px; font-weight:700; border-radius:9px; }

/* ── CONTENT — LEFT aligned, no centering ── */
.hk-content { padding:0 var(--hk-pad) 32px; max-width:850px; }

/* ── PANELS ── */
.hk-pane { display:none; padding:24px 0 16px; animation:hkFade .25s ease; }
.hk-pane.is-active { display:block; }
@keyframes hkFade { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }

.hk-title { font-size:24px; font-weight:700; line-height:1.35; color:var(--hk-txt); margin:0 0 16px; }
.hk-subtitle { font-size:15px; font-weight:600; color:var(--hk-txt); margin:0 0 14px; }

/* Body */
.hk-body { font-size:15px; line-height:1.75; color:var(--hk-txt); }
.hk-body p { margin-bottom:14px; }
.hk-body strong { font-weight:600; }
.hk-body ul, .hk-body ol { padding-left:22px; margin-bottom:14px; }
.hk-body ul li { list-style:disc; margin-bottom:6px; }
.hk-body ul li::marker { color:var(--hk); }
.hk-body ol li { list-style:decimal; margin-bottom:6px; }
.hk-body h2,.hk-body h3,.hk-body h4 { margin:24px 0 10px; font-weight:600; }
.hk-body img { max-width:100%; height:auto; border-radius:var(--hk-r); margin:12px 0; }
.hk-body a { color:var(--hk); text-decoration:underline; }

/* Files */
.hk-files { display:flex; flex-direction:column; gap:6px; }
.hk-file { display:flex; align-items:center; gap:12px; padding:12px 14px; background:var(--hk-bg2); border:1px solid var(--hk-bdr2); border-radius:var(--hk-r); text-decoration:none; transition:all .2s; }
.hk-file:hover { border-color:var(--hk); background:var(--hk-lt); }
.hk-file__ext { flex-shrink:0; width:42px; height:42px; display:flex; align-items:center; justify-content:center; background:var(--hk-bg); border:1px solid var(--hk-bdr2); border-radius:6px; font-size:10px; font-weight:700; color:var(--hk-txt2); letter-spacing:.5px; }
.hk-file__info { flex:1; min-width:0; }
.hk-file__info strong { display:block; font-size:13px; font-weight:500; color:var(--hk-txt); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hk-file__info small { font-size:11px; color:var(--hk-txt3); }
.hk-file__arrow { flex-shrink:0; color:var(--hk-txt3); transition:color .2s; }
.hk-file:hover .hk-file__arrow { color:var(--hk); }

.hk-empty { text-align:center; padding:40px 20px; }
.hk-empty p { font-size:13px; color:var(--hk-txt3); margin:10px 0 0; }

/* Notes */
.hk-hint { font-size:12px; color:var(--hk-txt3); margin:0 0 10px; }
.hk-textarea { width:100%; min-height:180px; padding:14px; font-family:var(--hk-font); font-size:14px; line-height:1.6;
  color:var(--hk-txt); background:var(--hk-bg2); border:1px solid var(--hk-bdr); border-radius:var(--hk-r);
  resize:vertical; outline:none; box-sizing:border-box; transition:border .2s, box-shadow .2s; }
.hk-textarea:focus { border-color:var(--hk); box-shadow:0 0 0 3px rgba(151,195,61,.15); }
.hk-textarea::placeholder { color:#bbb; }
.hk-notes-actions { display:flex; align-items:center; justify-content:space-between; margin-top:10px; }
#hk-notes-msg { font-size:12px; }
#hk-notes-msg.hk-saved { color:var(--hk); }
#hk-notes-msg.hk-err { color:#e74c3c; }
.hk-btn { display:inline-flex; align-items:center; gap:5px; padding:8px 16px; font-size:13px; font-weight:600; border:none; border-radius:6px; cursor:pointer; transition:background .2s; }
.hk-btn--green { background:var(--hk); color:#fff; }
.hk-btn--green:hover { background:var(--hk-dk); }

/* ── PRODUCT CARDS ── */
.hk-products-section { margin-top:32px; padding-top:24px; border-top:1px solid var(--hk-bdr2); }
.hk-products { display:grid; gap:16px; margin-top:12px; }
.hk-products--cols-1 { grid-template-columns:1fr; }
.hk-products--cols-2 { grid-template-columns:repeat(2,1fr); }
.hk-products--cols-3 { grid-template-columns:repeat(3,1fr); }
.hk-products--cols-4 { grid-template-columns:repeat(4,1fr); }

.hk-product-card { background:var(--hk-bg); border:1px solid var(--hk-bdr); border-radius:var(--hk-r); overflow:hidden; transition:box-shadow .2s, border-color .2s; }
.hk-product-card:hover { border-color:var(--hk); box-shadow:0 4px 12px rgba(0,0,0,.08); }
.hk-product-card__img { aspect-ratio:1; overflow:hidden; background:var(--hk-bg2); }
.hk-product-card__img img { width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.hk-product-card:hover .hk-product-card__img img { transform:scale(1.04); }
.hk-product-card__body { padding:14px; }
.hk-product-card__name { font-size:14px; font-weight:600; color:var(--hk-txt); margin:0 0 6px; line-height:1.3; }
.hk-product-card__price { display:block; font-size:15px; font-weight:700; color:var(--hk); margin-bottom:12px; }
.hk-product-card__btn { display:inline-block; padding:8px 20px; background:var(--hk); color:#fff; font-size:13px; font-weight:600; border-radius:6px; text-decoration:none; text-align:center; transition:background .2s; }
.hk-product-card__btn:hover { background:var(--hk-dk); color:#fff; }

/* ── TABLE ── */
.hk-table-wrap { margin:20px 0; }
.hk-table-title { font-size:15px; font-weight:600; margin:0 0 10px; color:var(--hk-txt); }
.hk-table-scroll { overflow-x:auto; }
.hk-table { width:100%; border-collapse:collapse; font-size:14px; }
.hk-table th { background:var(--hk-lt); color:var(--hk-dk); font-weight:600; text-align:left; padding:10px 14px; border-bottom:2px solid var(--hk); }
.hk-table td { padding:10px 14px; border-bottom:1px solid var(--hk-bdr2); }
.hk-table tbody tr:hover { background:var(--hk-bg2); }

/* ── BOTTOM NAV ── */
.hk-bottomnav { position:fixed; bottom:0; left:0; right:0; z-index:800; height:var(--hk-bottom); background:var(--hk-bg); border-top:1px solid var(--hk-bdr); display:flex; align-items:center; justify-content:space-between; padding:0 20px; margin-right:var(--hk-side); transition:margin .25s ease; }
.hk-main.is-full ~ .hk-bottomnav, .hk-sidebar.is-hidden ~ .hk-bottomnav { margin-right:0; }

.hk-bottomnav__link { display:flex; align-items:center; gap:8px; text-decoration:none; padding:8px 16px; border:1px solid var(--hk-bdr); border-radius:var(--hk-r); transition:all .2s; max-width:45%; }
.hk-bottomnav__link:hover { border-color:var(--hk); background:var(--hk-lt); }
.hk-bottomnav__link div { min-width:0; }
.hk-bottomnav__link small { display:block; font-size:11px; color:var(--hk-txt3); line-height:1.2; }
.hk-bottomnav__link span { display:block; font-size:13px; font-weight:500; color:var(--hk-txt); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.3; }
.hk-bottomnav__link svg { flex-shrink:0; color:var(--hk-txt3); }
.hk-bottomnav__link:hover svg { color:var(--hk); }
.hk-bottomnav__link--next { margin-left:auto; text-align:right; }
.hk-bottomnav__link--next span, .hk-bottomnav__link--next small { text-align:right; }

/* ── SIDEBAR ── */
.hk-sidebar { position:fixed; top:var(--hk-bar); right:0; bottom:0; width:var(--hk-side); background:var(--hk-bg); border-left:1px solid var(--hk-bdr); display:flex; flex-direction:column; z-index:900; transition:transform .25s ease; overflow:hidden; }
.hk-sidebar.is-hidden { transform:translateX(100%); }

.hk-sidebar__tabs { display:flex; border-bottom:1px solid var(--hk-bdr); flex-shrink:0; }
.hk-stab { flex:1; display:inline-flex; align-items:center; justify-content:center; gap:5px; padding:13px 10px; font-size:11px; font-weight:600; letter-spacing:.5px; color:var(--hk-txt3); background:none; border:none; border-bottom:2px solid transparent; cursor:pointer; transition:all .2s; }
.hk-stab:hover { color:var(--hk-txt); }
.hk-stab.is-active { color:var(--hk); border-bottom-color:var(--hk); }

.hk-sidebar__prog { padding:12px 18px; border-bottom:1px solid var(--hk-bdr2); flex-shrink:0; }
.hk-sidebar__prog span { display:block; font-size:12px; color:var(--hk); font-weight:500; margin-bottom:6px; }
.hk-sidebar__prog-track { width:100%; height:4px; background:var(--hk-bdr); border-radius:2px; overflow:hidden; }
.hk-sidebar__prog-fill { height:100%; background:var(--hk); border-radius:2px; transition:width .8s; }

.hk-spanel { display:none; flex:1; overflow-y:auto; overscroll-behavior:contain; }
.hk-spanel.is-active { display:block; }
.hk-qa-inner { padding:14px 18px; }

/* Modules */
.hk-mod { border-bottom:1px solid var(--hk-bdr2); }
.hk-mod__head { display:flex; align-items:center; gap:8px; width:100%; padding:12px 18px; background:none; border:none; cursor:pointer; font-family:var(--hk-font); text-align:left; transition:background .2s; }
.hk-mod__head:hover { background:var(--hk-bg2); }
.hk-mod__num { width:24px; height:24px; display:flex; align-items:center; justify-content:center; background:var(--hk); color:#fff; font-size:11px; font-weight:700; border-radius:50%; flex-shrink:0; }
.hk-mod__name { flex:1; font-size:13px; font-weight:600; color:var(--hk-txt); min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hk-mod__cnt { font-size:11px; color:var(--hk-txt3); flex-shrink:0; }
.hk-mod__chev { flex-shrink:0; color:var(--hk-txt3); transition:transform .3s; }
.hk-mod.is-open .hk-mod__chev { transform:rotate(180deg); }
.hk-mod__body { max-height:0; overflow:hidden; transition:max-height .35s ease; }
.hk-mod.is-open .hk-mod__body { max-height:2000px; }

/* Lesson items */
.hk-li { display:flex; align-items:center; gap:8px; padding:9px 18px 9px 30px; text-decoration:none; transition:background .15s; }
.hk-li:hover { background:var(--hk-bg2); }
.hk-li.is-current { background:var(--hk-lt); border-left:3px solid var(--hk); padding-left:27px; }
.hk-li__ico { width:16px; height:16px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.hk-li__dot { width:7px; height:7px; border:2px solid var(--hk-bdr); border-radius:50%; display:block; }
.hk-li__name { flex:1; font-size:13px; color:var(--hk-txt); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hk-li.is-done .hk-li__name { color:var(--hk-txt3); }
.hk-li.is-current .hk-li__name { font-weight:600; color:var(--hk-dk); }
.hk-li__dur { font-size:11px; color:var(--hk-txt3); flex-shrink:0; }

/* Overlay */
.hk-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:850; }
.hk-overlay.is-visible { display:block; }

/* ── RESPONSIVE ── */
@media(max-width:1024px){
  .hk-main { margin-right:0; }
  .hk-bottomnav { margin-right:0!important; }
  .hk-sidebar { transform:translateX(100%); }
  .hk-sidebar.is-mobile-open { transform:translateX(0); box-shadow:-4px 0 20px rgba(0,0,0,.1); }
  .hk-topbar__lesson,.hk-topbar__divider { display:none; }
}
@media(max-width:768px){
  :root { --hk-pad:16px; }
  .hk-topbar { padding:0 10px; gap:6px; }
  .hk-topbar__back span { max-width:120px; font-size:12px; }
  .hk-topbar__mark button, .hk-topbar__mark input[type="submit"] { padding:6px 10px!important; font-size:11px!important; }
  .hk-title { font-size:20px; }
  .hk-body { font-size:14px; }
  .hk-tab { padding:10px 12px; font-size:12px; }
  .hk-sidebar { width:100%; max-width:360px; }
  .hk-bottomnav { padding:0 12px; }
  .hk-bottomnav__link { padding:6px 10px; }
  .hk-products--cols-3,.hk-products--cols-4 { grid-template-columns:repeat(2,1fr); }
}
@media(max-width:480px){
  .hk-topbar__prog { display:none; }
  .hk-tab { padding:9px 8px; font-size:11px; gap:3px; }
  .hk-tab svg { width:13px; height:13px; }
  .hk-products--cols-2,.hk-products--cols-3,.hk-products--cols-4 { grid-template-columns:1fr; }
}

/* ── ADMIN BAR ── */
.admin-bar .hk-topbar { top:32px; }
.admin-bar .hk-layout { margin-top:calc(var(--hk-bar) + 32px); }
.admin-bar .hk-sidebar { top:calc(var(--hk-bar) + 32px); }
.admin-bar .hk-tabs-bar { top:calc(var(--hk-bar) + 32px); }
@media(max-width:782px){
  .admin-bar .hk-topbar { top:46px; }
  .admin-bar .hk-layout { margin-top:calc(var(--hk-bar) + 46px); }
  .admin-bar .hk-sidebar { top:calc(var(--hk-bar) + 46px); }
  .admin-bar .hk-tabs-bar { top:calc(var(--hk-bar) + 46px); }
}

/* ── MISC ── */
.tutor-single-page-top-bar { display:none!important; }
.hk-spanel::-webkit-scrollbar { width:4px; }
.hk-spanel::-webkit-scrollbar-thumb { background:var(--hk-bdr); border-radius:2px; }
.hk-tab:focus-visible,.hk-stab:focus-visible,.hk-mod__head:focus-visible,.hk-li:focus-visible,.hk-topbar__toggle:focus-visible { outline:2px solid var(--hk); outline-offset:2px; }
::selection { background:rgba(151,195,61,.2); }
