/* ===== AppTech Downloads – Avada-barát, slide-over menü ===== */

/* Alap változók */
.apptech-dl-wrap{
  --gap:20px; --muted:#667; --border:#e5e7eb; --bg:#fff; --tile:#f6f7f9; --speed:240ms;
}
/* biztos, ami biztos: ne tudjon szélességből „kicsúszni” semmi */
.apptech-dl-wrap, .apptech-dl-wrap * { box-sizing:border-box; }

/* Fejléc + kereső */
.apptech-dl-header{display:flex;gap:var(--gap);align-items:center;justify-content:space-between;flex-wrap:wrap;margin:0 0 14px}
.apptech-dl-header h2{margin:0;font-size:1.25rem;font-weight:700}
.apptech-dl-search{display:flex;gap:8px}
.apptech-dl-search input[type="search"]{padding:8px 10px;border:1px solid var(--border);border-radius:0;min-width:236px}
.apptech-dl-search button{padding:8px 12px;border:1px solid var(--border);background:#fff;border-radius:0;cursor:pointer}

/* ===== Layout ===== */
.apptech-dl-layout{display:grid;grid-template-columns:1fr;gap:20px}
.apptech-dl-wrap.sidebar-right .apptech-dl-layout{grid-template-areas:"sidebar" "main"}
.apptech-dl-wrap.sidebar-left  .apptech-dl-layout{grid-template-areas:"sidebar" "main"}
.apptech-dl-sidebar{grid-area:sidebar;border:1px solid var(--border);background:var(--bg);border-radius:0;position:sticky;top:var(--sticky-offset,96px);height:max-content;max-height:70vh;overflow:auto;z-index:2}
.apptech-dl-main{grid-area:main;min-width:0}

@media (min-width:992px){
  .apptech-dl-wrap.sidebar-right .apptech-dl-layout{grid-template-columns:1fr 320px;grid-template-areas:"main sidebar";column-gap:32px}
  .apptech-dl-wrap.sidebar-left  .apptech-dl-layout{grid-template-columns:320px 1fr;grid-template-areas:"sidebar main";column-gap:32px}
  .apptech-dl-wrap.sidebar-right .apptech-dl-main{padding-right:64px}
  .apptech-dl-wrap.sidebar-left  .apptech-dl-main{padding-left:64px}
}

/* ===== Oldalsávos menü ===== */
.apptech-dl-sidemenu{font-size:.98rem}
.apptech-dl-sidemenu .panel{position:relative}
.apptech-dl-sidemenu .panel .panel-header{display:flex;align-items:center;gap:10px}
.apptech-dl-sidemenu .panel .panel-header i{display:inline-flex;font-size:22px;line-height:1}
.apptech-dl-sidemenu .panel .panel-header .fa-fallback{display:none}
.apptech-dl-sidemenu .btn-back{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;background:#fff;border-radius:0;text-decoration:none;color:inherit;line-height:1}
.apptech-dl-sidemenu .btn-back.hidden{display:none}
.apptech-dl-sidemenu .crumbs{color:var(--muted);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Master-fa rejtve (JS olvassa) */
.apptech-dl-sidemenu .dl-tree-master{display:none}

/* --- Stage + slide-over --- */
.apptech-dl-sidemenu .panel .stage{ position:relative; overflow:hidden; }
.apptech-dl-sidemenu .panel .panel-list{
  position:absolute; left:0; right:0; top:0;
  margin:0; padding:0; list-style:none;
  will-change:transform;
  transform:translateX(0);
  transition:transform var(--speed) cubic-bezier(.22,.61,.36,1);
  pointer-events:auto;
}
.apptech-dl-sidemenu .panel .panel-list.enter-right{ transform:translateX(100%); }
.apptech-dl-sidemenu .panel .panel-list.enter-left { transform:translateX(-100%); }
.apptech-dl-sidemenu .panel .panel-list.leave-left { transform:translateX(-100%); pointer-events:none; }
.apptech-dl-sidemenu .panel .panel-list.leave-right{ transform:translateX(100%);  pointer-events:none; }

/* Teljes szélességre kifutó sorok a sidebar 12px padding mellett */
.apptech-dl-sidebar{overflow-x:hidden}
.apptech-dl-sidemenu .panel .panel-list > li{margin:0 -12px;padding:0 12px;position:relative}
.apptech-dl-sidemenu .panel .panel-list > li::after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:var(--border)}
.apptech-dl-sidemenu .panel .panel-list > li:last-child::after{display:none}
.apptech-dl-sidemenu .panel .panel-list > li > a{display:block;padding:10px 12px;text-decoration:none;color:inherit;outline:none;box-shadow:none}
.apptech-dl-sidemenu .panel .panel-list > li > a:hover{ background:#f7fafe; }
.apptech-dl-sidemenu .panel .panel-list > li.current > a{ background:rgba(107,107,107,.06); }
.apptech-dl-sidemenu .panel .panel-list > li:hover::after,
.apptech-dl-sidemenu .panel .panel-list > li.current::after{ opacity:0 }

/* ===== Fájllista ===== */
.apptech-dl-filelist{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.apptech-dl-filelist.list-mode{grid-template-columns:1fr !important}
.apptech-dl-file{display:flex;flex-direction:column;gap:6px;border:1px solid var(--border);background:#fff;border-radius:0;padding:14px; overflow:hidden}
.apptech-dl-file .row{display:flex;align-items:center;justify-content:space-between;gap:10px; width:100%}

/* Ikonok */
.apptech-dl-file .file-link{display:flex;gap:10px;align-items:center;text-decoration:none;color:inherit;min-width:0;flex:1 1 auto}
.apptech-dl-file .ico{display:inline-block;width:42px;height:42px;flex:0 0 42px;background-repeat:no-repeat;background-position:center;background-size:contain;border:1px solid var(--border);background:#fbfbfb;border-radius:4px;line-height:42px;text-align:center;font-weight:700;color:#e53935}
.apptech-dl-file .ico:not([style*="background-image"]){content:"PDF"}
.apptech-dl-file .ico-img{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;flex:0 0 42px;border:1px solid var(--border);background:#fbfbfb;border-radius:4px}
.apptech-dl-file .ico-img img{max-width:36px;max-height:36px;width:auto;height:auto;display:block;object-fit:contain}

/* Cím */
.apptech-dl-file .title{font-weight:700;font-size:1.02rem;line-height:1.25;overflow:hidden;text-overflow:ellipsis;text-align:left;margin:0;max-width:100%}

/* Akció gombok */
.apptech-dl-file .actions{display:flex;gap:6px;flex:0 0 auto}
.apptech-dl-file .act{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--border);border-radius:0;background:#fff;text-decoration:none}
.apptech-dl-file .act:hover{background:#f7fafe;border-color:#e3eefc}
.apptech-dl-file .act .sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Meta sor */
.meta-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.meta-row .meta{color:var(--muted);font-size:.9rem}
.meta-row .left{text-align:left}
.meta-row .right{text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Üres/hiba */
.apptech-dl-empty,.apptech-dl-error{border:1px solid var(--border);background:#fff;border-radius:0;padding:12px}

/* Lapozó */
.apptech-dl-pagination{margin-top:16px}
.apptech-dl-pagination ul{list-style:none;margin:0;padding:0;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.apptech-dl-pagination a,.apptech-dl-pagination span{display:inline-block;padding:6px 10px;border:1px solid var(--border);background:#fff;border-radius:0;text-decoration:none;color:inherit}
.apptech-dl-pagination .active span{font-weight:700}
.apptech-dl-pagination .disabled span{color:var(--muted)}
.apptech-dl-pagination .dots span{border-style:dashed}

/* ===== Mobil – KILÓGÁS FIX ===== */
@media (max-width:768px){
  .apptech-dl-sidebar{position:static;top:auto;max-height:none}
  .apptech-dl-layout{grid-template-columns:1fr;grid-template-areas:"sidebar" "main";gap:14px}
  .apptech-dl-header h2{font-size:1.05rem}
  .apptech-dl-search input[type="search"]{min-width:160px;padding:6px 8px}
  .apptech-dl-search button{padding:6px 8px}

  /* fontos: ne „tolja ki” a sort semmi */
  .apptech-dl-file .row{justify-content:flex-start; gap:8px;}
  .apptech-dl-file .actions{margin-left:auto; flex:0 0 auto;}
  .apptech-dl-file .file-link{min-width:0; flex:1 1 auto; max-width:calc(100% - 72px);} /* 2×32px + gap */
  .apptech-dl-file .title{overflow-wrap:anywhere;} /* hosszú fájlnevek törése */

  .apptech-dl-file{padding:12px}
  .apptech-dl-file .ico,.apptech-dl-file .ico-img{width:34px;height:34px;flex-basis:34px}
  .apptech-dl-file .ico-img img{max-width:28px;max-height:28px}
  .apptech-dl-file .title{font-size:.96rem;line-height:1.3}
  .meta-row .meta{font-size:.82rem}
  .apptech-dl-file .act{width:30px;height:30px}
}

@media (max-width:380px){
  .apptech-dl-file .row{gap:6px;}
  .apptech-dl-file .file-link{max-width:calc(100% - 64px);} /* még szűkebb kijelzőre */
  .apptech-dl-file .act{width:28px;height:28px}
  .apptech-dl-file .ico,.apptech-dl-file .ico-img{width:28px;height:28px;flex-basis:28px}
  .apptech-dl-file .ico-img img{max-width:24px;max-height:24px}
  .apptech-dl-file .title{font-size:.90rem}
  .meta-row .meta{font-size:.8rem}
}
