
/*
 * AmeriCOM LearnPress Profile Tweaks v1.3.7
 * Changes requested 2025-11-11:
 * 1) Remove all table borders & images from all tables on all tabs under /new-profile/*
 * 2) Align all text left
 * 3) Add spacing above the "Explore all Course offerings" button
 * 4) Remove all references/visuals of the Cover Image in the profile
 */

/* Scope broadly to LearnPress profile areas while being conservative elsewhere */
.lp-user-profile,
.learnpress .lp-user-profile {
  text-align: left !important;
}

/* Tables: remove all borders and lines */
.lp-user-profile table,
.lp-user-profile table th,
.lp-user-profile table td,
.learnpress .lp-user-profile table,
.learnpress .lp-user-profile table th,
.learnpress .lp-user-profile table td {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Ensure border-collapse and divider styles are neutralized */
.lp-user-profile table {
  border-collapse: collapse !important;
}

/* Remove all images inside tables in profile tabs */
.lp-user-profile table img,
.learnpress .lp-user-profile table img {
  display: none !important;
}

/* Also remove any thumbnails or images within profile tab content lists */
.lp-user-profile .learn-press-profile-course__thumbnail,
.lp-user-profile .course-thumbnail,
.lp-user-profile .lp-course-thumbnail {
  display: none !important;
}

/* Align text left across typical profile components */
.lp-user-profile * {
  text-align: left !important;
}

/* Add spacing above the Explore button */
#americom-explore-courses-btn,
.americom-explore-courses-btn,
.lp-user-profile .americom-explore-courses-btn {
  display: inline-block;
  margin-top: 16px !important;
}

/* Remove Cover Image areas */
.lp-user-profile .profile-cover,
.lp-user-profile .lp-profile-cover,
.lp-user-profile .user-profile-cover,
.lp-user-profile .cover-image,
.lp-user-profile .lp-user-landing .cover,
.lp-user-profile .lp-profile__cover,
.lp-user-profile .lp-profile-cover__inner,
.lp-user-profile .lp-profile-avatar-cover,
.lp-user-profile .lp-profile__header-cover {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

/* If a gap remains where the cover used to be, tighten it up */
.lp-user-profile .lp-profile__header,
.lp-user-profile .lp-profile-header,
.lp-user-profile .profile-header {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border: 0 !important;
}

/* Safety: remove borders on any profile lists/grids masquerading as tables */
.lp-user-profile .lp-list-table,
.lp-user-profile .lp-archive-courses,
.lp-user-profile .list-table,
.lp-user-profile .table,
.lp-user-profile .lp-tab-sections .section-content,
.lp-user-profile .lp-tab-sections .section-content * {
  border: none !important;
  box-shadow: none !important;
}

/* Ensure hover states don't reintroduce borders */
.lp-user-profile table tr:hover td,
.lp-user-profile table tr:hover th {
  border: none !important;
  box-shadow: none !important;
}

/* === v1.3.12 targeted fixes (2025-11-11) === */

/* 1) Certificates page: ensure action buttons are visible/clickable */
  border: none !important;
  box-shadow: none !important;
}
/* Restore visibility for certificate action links/buttons even if images are hidden */
  display: inline-flex !important;
  align-items: center;
  gap: .4rem;
  padding: .5rem .8rem;
  text-decoration: none !important;
  cursor: pointer;
}
/* If certificate previews are images we hid, show a fallback label */
  display: inline-block !important;
}

/* 2) Remove empty first column before Name on Finished & Passed tabs; match In Progress style */
.lp-user-profile table,
.lp-user-profile table * {
  border: none !important;
}
/* Hide first column cells in profile course tables (covers Finished/Passed that include a leading thumbnail/blank col) */
.lp-user-profile table.lp_profile_course_progress :is(th,td):first-child,
.lp-user-profile table[class*="lp_profile_"] :is(th,td):first-child {
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
}

/* 3) Space above Explore button */
#americom-explore-courses-btn,
.americom-explore-courses-btn,
.lp-user-profile .americom-explore-courses-btn {
  margin-top: 16px !important;
}

/* === v1.3.13 targeted adjustments (2025-11-11) === */

/* 1) Remove the blank first column on the Finished tab to match In Progress layout */
.lp-user-profile table.lp_profile_course_finished :is(th,td):first-child,
.lp-user-profile table.lp_profile_course_finished :is(th,td):first-of-type,
.lp-user-profile table.lp_profile_course_finished :is(th,td):nth-child(1),
.lp-user-profile table.lp_profile_course_finished :is(th,td)[data-colname=""] {
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
}

/* 2) Add extra padding above the "Explore all Course Offerings" button */
#americom-explore-courses-btn,
.americom-explore-courses-btn,
.lp-user-profile .americom-explore-courses-btn {
  margin-top: 24px !important;
  padding-top: 12px !important;
}

/* === v1.3.14: force-fix selectors for Finished tab first column + Explore spacing === */

/* 1) FINISHED tab: hide the blank first column robustly */
#learn-press-user-profile .lp-tab-sections [data-tab="finished"] table tr > th:first-child,
#learn-press-user-profile .lp-tab-sections [data-tab="finished"] table tr > td:first-child,
.lp-user-profile .lp-tab-sections [data-tab="finished"] table tr > th:first-child,
.lp-user-profile .lp-tab-sections [data-tab="finished"] table tr > td:first-child,
#learn-press-user-profile table.lp_profile_course_finished tr > th:first-child,
#learn-press-user-profile table.lp_profile_course_finished tr > td:first-child,
.lp-user-profile table.lp_profile_course_finished tr > th:first-child,
.lp-user-profile table.lp_profile_course_finished tr > td:first-child {
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* 2) Add spacing above Explore all Course Offerings button */
#americom-explore-courses-btn,
.lp-user-profile #americom-explore-courses-btn,
.lp-user-profile .americom-explore-courses-btn {
  display: inline-block !important;
  margin-top: 24px !important;
}


/* === v1.3.16 focused fixes (repaired) === */

/* Certificates page: ensure grid/list and thumbnails are visible */
.lp-user-profile .lp-certificates,
.lp-user-profile .lp-certificates .lp-certificate__items,
.lp-user-profile .lp-certificates .lp-certificate__item,
.lp-user-profile .learn-press-subtab-content[data-tab="certificates"] {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
}

/* Certificates: allow images/thumbnails to display (we previously hid images globally) */
.lp-user-profile .lp-certificates img,
.lp-user-profile .lp-certificates .lp-certificate__item img {
  display: block !important;
  visibility: visible !important;
}

/* Certificates: ensure action links/buttons are visible and clickable */
.lp-user-profile .lp-certificates a,
.lp-user-profile .lp-certificates .lp-certificate__item a,
.lp-user-profile .lp-certificates .lp-certificate__item .button,
.lp-user-profile .lp-certificates .lp-button {
  display: inline-flex !important;
  align-items: center;
  gap: .4rem;
  padding: .45rem .8rem !important;
  text-decoration: none !important;
  cursor: pointer;
}
/* Explore button: add exactly 20px spacing above */
#americom-explore-courses-btn,
.lp-user-profile #americom-explore-courses-btn,
.lp-user-profile .americom-explore-courses-btn {
  margin-top: 20px !important;
  display: inline-block !important;
}


/* === v1.3.17 targeted fixes === */

/* Certificates tab: force-show tiles and thumbnails regardless of earlier image-hiding rules */
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
  display: inline-block !important;
}

/* Certificates: ensure any link/button inside tiles is visible and clickable */
  display: inline-flex !important;
  align-items: center;
}

/* Explore button: add exactly 20px spacing above, and make sure it's not positioned flush */
.lp-user-profile #americom-explore-courses-btn,
.lp-user-profile .americom-explore-courses-btn,
#learn-press-user-profile #americom-explore-courses-btn {
  display: inline-block !important;
  margin-top: 20px !important;
}

/* In case the button lives inside the profile header wrappers */
.lp-user-profile .lp-profile__header #americom-explore-courses-btn,
.lp-user-profile .lp-profile-header #americom-explore-courses-btn {
  margin-top: 20px !important;
}

/* === v1.3.18: Explore spacing + Certificates thumbnails/download === */

/* 1) Put the Explore button on its own line, with clear spacing above */
#americom-explore-courses-btn,
.lp-user-profile #americom-explore-courses-btn,
.lp-user-profile .americom-explore-courses-btn {
  display: block !important;   /* ensure margin-top is respected */
  margin-top: 20px !important; /* exact spacing requested */
}

/* 2) Certificates: force thumbnail/preview visibility and clickable actions */
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* In case the preview is a background div instead of an <img>, ensure it has height */
  min-height: 120px;
}

/* Make sure download/view anchors show */
  display: inline-flex !important;
  align-items: center;
  gap: .4rem;
  text-decoration: none !important;
  cursor: pointer;
}

/* v1.3.19: allow images in Certificates area (was hidden by a broad img rule) */
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* v1.3.19: ensure 20px spacing above Explore button in profile header */
#americom-explore-courses-btn,
.lp-user-profile #americom-explore-courses-btn,
.lp-user-profile .americom-explore-courses-btn,
.lp-user-profile .lp-profile__header a#americom-explore-courses-btn,
.lp-user-profile .lp-profile__header a.americom-explore-courses-btn,
#learn-press-user-profile .lp-profile__header a#americom-explore-courses-btn,
#learn-press-user-profile .lp-profile__header a.americom-explore-courses-btn,
#learn-press-user-profile .lp-profile__header a[href*="course"] {
  display: block !important;
  margin-top: 20px !important;
  clear: both !important;
}

/* === v1.3.20: Certificates visibility + Explore spacing (minimal, scoped) === */

/* Certificates tiles and previews: ensure they render */
  border: none !important;
  box-shadow: none !important;
}
/* Common LearnPress certificate selectors */
  display: block !important;
}
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
/* If previews are background divs */
  min-height: 120px !important;
  display: block !important;
}

/* Ensure view/download anchors appear */
  display: inline-flex !important;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
}

/* Explore button spacing: apply when the button directly follows the username heading */
.lp-user-profile .lp-profile__header h1 + a,
.lp-user-profile .lp-profile__header h2 + a,
#learn-press-user-profile .lp-profile__header h1 + a,
#learn-press-user-profile .lp-profile__header h2 + a {
  display: inline-block !important;
  margin-top: 20px !important;
  clear: both !important;
}

/* Fallbacks targeting the specific id/class if present */
#americom-explore-courses-btn,
.lp-user-profile #americom-explore-courses-btn,
.lp-user-profile .americom-explore-courses-btn {
  display: inline-block !important;
  margin-top: 20px !important;
}

/* === v1.3.24 targeted changes === */

/* 1) Hide My Courses top statistic cards (Enrolled/In Progress/etc.) */
.lp-user-profile .lp-profile-statistics,
.lp-user-profile .lp-profile-statistics *,
.lp-user-profile .lp-profile-overview .lp-profile-statistics {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* 2) Add 20px white space above Explore All Course Offerings button */
.lp-user-profile #americom-explore-courses-btn,
.lp-user-profile .americom-explore-courses-btn,
#americom-explore-courses-btn {
  display: block !important;
  margin-top: 20px !important;
}

/* === v1.3.25: Remove My Courses statistic cards + force spacing above Explore button === */

/* Remove the statistic cards block on My Courses */
.lp-user-profile .lp-profile-overview .lp-profile-statistics,
.lp-user-profile .lp-profile-overview .lp-statistics,
.lp-user-profile .lp-profile-overview .profile-statistics,
.lp-user-profile .lp-profile-overview [class*="statistics"],
#learn-press-user-profile .lp-profile-overview [class*="statistics"],
.lp-user-profile .lp-profile-overview .lp-profile-summary,
.lp-user-profile .lp-profile-overview .lp-profile-boxes {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Make sure the tab bar moves up when cards are hidden */
.lp-user-profile .lp-profile-overview { 
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Force the Explore button onto its own line with 20px top spacing */
.lp-user-profile .lp-profile__header a#americom-explore-courses-btn,
#learn-press-user-profile .lp-profile__header a#americom-explore-courses-btn,
.lp-user-profile .lp-profile__header a.americom-explore-courses-btn,
#learn-press-user-profile .lp-profile__header a.americom-explore-courses-btn {
  display: block !important;
  margin-top: 20px !important;
  clear: both !important;
}

/* === v1.3.26: Hide LP stats cards on My Courses + enforce Explore spacing === */

/* Hide LearnPress statistic cards on My Courses */
.learn-press-profile-course__statistic,
.learn-press-profile-course__statistic *,
#dashboard-statistic,
#dashboard-statistic *,
.dashboard-statistic__row,
.dashboard-statistic__row *,
.statistic-box,
.statistic-box * {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Tighten subtab content spacing after removing cards */
.learn-press-subtab-content { margin-top: 0 !important; padding-top: 0 !important; }

/* Add 20px spacing above the Explore button and force it onto its own line */
#learn-press-user-profile .lp-profile__header a#americom-explore-courses-btn,
#learn-press-user-profile .lp-profile-header a#americom-explore-courses-btn,
.lp-user-profile .lp-profile__header a#americom-explore-courses-btn,
.lp-user-profile .lp-profile-header a#americom-explore-courses-btn {
  display: block !important;
  margin-top: 20px !important;
  clear: both !important;
}

/* === v1.3.27: Kill the My Courses statistic cards with max specificity === */

/* Hide the whole statistic section container */
#learn-press-user-profile .learn-press-profile-course__statistic,
.lp-user-profile .learn-press-profile-course__statistic {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Hide the internal wrappers just in case the container is reinserted */
#learn-press-user-profile #dashboard-statistic,
#learn-press-user-profile .dashboard-statistic__row,
#learn-press-user-profile .dashboard-statistic__row .statistic-box,
.lp-user-profile #dashboard-statistic,
.lp-user-profile .dashboard-statistic__row,
.lp-user-profile .dashboard-statistic__row .statistic-box {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Remove any gap left by the statistics block */
#learn-press-user-profile .learn-press-subtab-content { 
  margin-top: 0 !important; 
  padding-top: 0 !important; 
}
