/* =====================================================
   LEARNPRESS DASHBOARD
   - Layout: sidebar | content (desktop) / tabs-top (mobile)
   - Brand-accent на активних табах
   - Блоки статистики не чіпаємо — LP рендерить їх правильно сам
   ===================================================== */

/* 1) Відступ під фіксовану шапку */
#learn-press-profile,
.learnpress,
.learn-press-archive-courses,
.lp-archive-courses,
.learnpress-page,
.lp-content-wrapper,
.lp-courses,
#learn-press-course {
  padding-top: 72px;
}

#learn-press-profile .lp-content-area:first-child {
  padding-top: 0;
}

/* 2) Контейнер дашборду: центрувати, обмежити ширину */
#learn-press-profile {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* 3) HERO (шапка з аватаром) */
#learn-press-profile .wrapper-profile-header.wrap-fullwidth {
  background: var(--bg-secondary);
  border-radius: 0;
  margin: 0 0 24px;
  padding: 24px 32px;
}

#learn-press-profile .wrapper-profile-header .lp-content-area {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0;
  max-width: 100%;
}

#learn-press-profile .user-avatar img.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

#learn-press-profile .lp-profile-username {
  margin: 0;
  font-size: 1.25rem;
}

/* 4) Layout: sidebar зліва, контент справа */
#learn-press-profile #profile-sidebar,
#learn-press-profile #profile-content {
  display: inline-block;
  vertical-align: top;
}

#learn-press-profile #profile-sidebar {
  width: 240px;
  margin-right: 24px;
}

#learn-press-profile #profile-content {
  width: calc(100% - 272px);
}

/* 5) Sidebar nav — без скруглень */
#learn-press-profile .lp-profile-nav-tabs {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
}

#learn-press-profile .lp-profile-nav-tabs li {
  border-bottom: 1px solid var(--border);
}
#learn-press-profile .lp-profile-nav-tabs li:last-child { border-bottom: 0; }

#learn-press-profile .lp-profile-nav-tabs li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition);
}

#learn-press-profile .lp-profile-nav-tabs li a:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

#learn-press-profile .lp-profile-nav-tabs li.active a {
  background: var(--accent);
  color: #fff;
}

#learn-press-profile .lp-profile-nav-tabs li.active a i { color: #fff; }

/* 6) Контент-картки */
#learn-press-profile .lp-profile-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* 7) Таби (Все / В процессе / Закончено / ...) */
#learn-press-profile .learn-press-profile-course__tab .nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
}

/* 8) Mobile: sidebar зверху, таби скролом */
@media (max-width: 900px) {
  #learn-press-profile {
    padding-left: 8px;
    padding-right: 8px;
  }

  #learn-press-profile #profile-sidebar,
  #learn-press-profile #profile-content {
    display: block;
    width: 100%;
    margin-right: 0;
  }

  #learn-press-profile #profile-sidebar {
    margin-bottom: 16px;
  }

  /* На мобілці nav-tabs стає горизонтальною стрічкою */
  #learn-press-profile .lp-profile-nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #learn-press-profile .lp-profile-nav-tabs li {
    border-bottom: 0;
    border-right: 1px solid var(--border);
    flex: 0 0 auto;
  }
  #learn-press-profile .lp-profile-nav-tabs li:last-child { border-right: 0; }

  #learn-press-profile .lp-profile-nav-tabs li a {
    padding: 10px 14px;
    white-space: nowrap;
    font-size: 0.9rem;
  }

  /* Hero на мобілці — компактний, горизонтальний */
  #learn-press-profile .wrapper-profile-header.wrap-fullwidth {
    padding: 10px 16px;
    margin-bottom: 16px;
  }

  #learn-press-profile .wrapper-profile-header .lp-content-area {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 12px;
  }

  #learn-press-profile .lp-profile-left,
  #learn-press-profile .lp-profile-right {
    width: auto;
    text-align: left;
  }

  #learn-press-profile .user-avatar {
    display: inline-block;
    position: relative;
    flex-shrink: 0;
  }

  #learn-press-profile .user-avatar img.avatar {
    width: 40px;
    height: 40px;
  }

  #learn-press-profile .lp-profile-username {
    font-size: 0.95rem;
    line-height: 1.2;
  }

  /* Кнопка "edit avatar" — ховаємо на мобілці */
  #learn-press-profile .lp-btn-to-edit-avatar {
    display: none;
  }

  /* Контент-картка теж без зайвих padding */
  #learn-press-profile .lp-profile-content {
    padding: 16px;
  }

  /* Таблиця курсів — горизонтальний скрол */
  #learn-press-profile table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }
}