
/* Course Image Thumbnail */
#main .article-post-thumbnail{
	margin-left:0px;
	margin-right:0px;
}

/*	---------------------
	 COURSE LESSON TABLE
	---------------------
*/

/* Top row of Table */
.pmspace-lesson-table tr:first-child{ border-top:6px solid #FFB416; padding:6px; }
/* Bottom row of Table */
.pmspace-lesson-table tr:last-child{ border-bottom:6px solid #FFB416; padding:6px; }

/* Module title */
.pmspace-lesson-table tr .pm-module-name{ color:var(--global-palette3); font-size:18px; }
/* Module header */
.pm-module-header{ background-color:#EDF2F7; }
/* Module paragraph */
.pmspace-lesson-table tr p{ font-size:14px; margin-top:0px; }

/* Lesson name */
.pmspace-lesson-table tr .pm-lesson-name{ font-weight:600; }
/* Lesson name link */
.pmspace-lesson-table tr a{ text-decoration:none; }	/* remove underline */
/* Lesson description */
.pmspace-lesson-table tr .pm-lesson-desc{ font-size:14px !important; line-height:1em; }

/* remove redundant bullet from lesson list */
.pm-course-lessons { list-style: none; padding-left: 0; }

/* Divider Bar, end of main table */
#main .wp-block-kadence-spacer:nth-child(6) .kt-divider{ margin-top:-20px; }

/*	-----------------
	 LESSON SIDE BAR
	-----------------
*/
/* colour progess icons */
.pm-lesson-status-0 { color: #E74C3C; } /* Red */
.pm-lesson-status-1 { color: #FFB416; } /* Amber/Orange */
.pm-lesson-status-2 { color: #27AE60; } /* Green */

/* Lesson item */
#secondary .pm-module-group .pm-lesson-item a{
	text-decoration:none;
}

/* Lessons Module Group */
#secondary .pm-module-group ul{
	margin-top:6px;
	margin-bottom:8px;
}

/* Lesson item icon */
.pm-lesson-item:hover{
	color:var(--global-palette2);
}
/* Lesson item link (hover) */
#secondary .pm-lesson-item a:hover{
	font-weight:600;
	color:var(--global-palette2);
}

/* Module name sidebar*/
#secondary .pm-module-group .pm-module-name{
	color:var(--global-palette3);
	margin-left:10px;
}
/* Lesson legend */
.pm-lesson-legend{
	margin-top:8px;
	margin-bottom:10px;
	padding-left:3px;
	padding-right:3px;
}

/* Below Legend Bar */
.kb-row-layout-id12152_2cf2a8-0e .wp-block-kadence-column .kt-inside-inner-col{
	border-bottom-color:#2d5b85;
	border-bottom-width:10px;
}

/* Progress bar */
.kt-post-grid-wrap .kt-post-masonry-item .pm-progress-bar{ margin-top:-35px; }

/* add spinner when lesson page updating */
@keyframes spin {
    0% { transform:rotate(0deg);}
    100% { transform:rotate(360deg);}
}
.pm-spinner .dashicons-update { animation: spin 1s linear infinite; }

/* Dashboard Table style */
/* Th */
.kt-create-accordion tr th:nth-child(2){
	text-align:center;
}

/* Table Data */
.pmspace-course-table tr td{
	border-top-style:solid;
	border-top-color:#ebf4fc;
}

/* Table Data */
.pmspace-course-table tbody tr td{
	border-top-width:6px !important;
}

/* Link */
.pmspace-course-table tr a{
	font-weight:600;
}

/* Course desc */
.pmspace-course-table tr .pm-course-desc{
	font-size:14px !important;
}

/* Only target lesson Titles in pm_lesson post-type */
.pm_lesson .lesson-title-overlap {
    margin-top: -240px !important;
    margin-bottom: 80px !important;
}

/*	------------------
	 Course Grid card
	------------------
*/
.pmspace-course-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.pmspace-course-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensures card fills grid area */
  /* align-items: stretch; */
}
.pmspace-card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.pmspace-card-button { margin: 0 auto 1rem auto; }
.pmspace-card-image-wrapper { position: relative; }
.pmspace-card-image { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }

/* Format and position of card's Category flag */
.pmspace-card-category {
  position: absolute; top: 15%; left: 0;
  background: var(--global-palette3); color: #fff;
  padding: 4px 15px 4px 10px;
  border-top-right-radius: 50px; border-bottom-right-radius: 50px;
  font-size: 0.85em; margin-right: 20px; min-width: 70px;
  box-shadow: 0px 1px 5px var(--global-palette5);
}
.pmspace-card-progress { margin-left: 20px; margin-right: 20px; }
.pmspace-card-title { margin: 1rem 0 0.5rem 0; text-align: center; font-size: 1.15em; font-weight: bold; color: var(--global-palette3); }
.pmspace-card-info { text-align: center; font-size: 12px; margin-bottom: 0.5rem; }
.pmspace-card-excerpt { font-size: 12px; margin: 0 20px 1rem 20px; text-align: center; }

.pmspace-card-button {
  margin: 0 auto 1.5rem auto; display: flex; align-items: center; justify-content: center;
  background: var(--global-palette1); color: #fff; border-radius: 6px; padding: 8px 15px; font-size: 1em; text-decoration: none;
  box-shadow:1px 1px 2px 0px #95a5a6; transition: background 0.2s;
}
.pmspace-card-button:hover { color: var(--global-palette3); background: var(--global-palette2); box-shadow:none!important; }

/* Coming Soon Banner */
.pmspace-card-image-wrapper {
    position: relative;
    overflow: hidden;
}

/* Status Banner - Base Styles */
.pmspace-status-banner {
    position: absolute;
    top: 110px;
    right: -70px;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    padding: 8px 75px;
    transform: rotate(320deg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
    text-transform: uppercase;
}

/* Coming Soon Banner - Option 1 */
.pmspace-banner-coming-soon {
    background-color: rgba(245, 165, 36, 0.9);
    color: rgb(44, 89, 128);
}

/* New Course Banner - Option 2 */
.pmspace-banner-new-course {
    background-color: rgba(39, 174, 96, 0.9);
    color: 	#ffffff;
}

/* Adjust for smaller screens */
@media (max-width: 768px) {
    .pmspace-status-banner {
        font-size: 14px;
        padding: 6px 90px;
        top: 110px;
        right: -75px;
    }
}

/*	------------------
	 Filter Bar style
	------------------
*/
.pmspace-course-filterbar {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.pmspace-filter-btn {
  background: #ebf4fc;
  color: var(--global-palette3);
  border: none;
  border-radius: 5px;
  padding: 0.4em 1.2em;
  cursor: pointer;
  font-size: 0.8em; font-weight: bold;
  transition: background 0.2s, color 0.2s;
}
.pmspace-filter-btn.active {
  background: var(--global-palette1);
  color: #fff;
}
/* Keep Card size when less than 3 across */
.pmspace-course-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 340px));
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

/*	--------------------------------------------
	Specific columns in the student report table
	--------------------------------------------
*/
.pmspace-student-report {
  font-size: 14px !important;
  border-collapse: collapse;
  width: 100%;
}

.pmspace-student-report th, .pmspace-lesson-table td { border-top:4px solid #E7F3FC; padding:6px; }
.pmspace-student-report tr:nth-child(even) { background:#fafafa; }

.pmspace-student-report th,
.pmspace-student-report td {
  padding: 6px 8px !important;
  vertical-align: middle;
  line-height: 1.2;
}

/* Applied to the specific soft-centered columns (Status, Start, Completed, Grade, Points) */
.pmspace-student-report th.pmspace-center,
.pmspace-student-report td.pmspace-center {
  text-align: center !important;
  white-space: nowrap;
  width: 90px; /* adjust if you want wider/narrower columns */
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* centre the columns Status, Grade and Points only */
.widefat th:nth-child(2),
.widefat td:nth-child(2),
.widefat th:nth-child(5),
.widefat td:nth-child(5),
.widefat th:nth-child(6),
.widefat td:nth-child(6) {
  text-align: center;
}

/* Table Data */
.widefat tr td{
	/* border-color:#ecf0f1;
	border-style:solid;
	border-width:1px;*/
	border-right-style:solid;
	border-right-color:#ecf0f1;
	border-right-width:1px !important;	
}

/* report-frontend.css
 * Styling for the student report donut + legend.
 */

.pmspace-report-chart-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 1em 0;
  flex-wrap: wrap;
}

/* Legend (left) */
.pmspace-report-legend {
  flex: 1 1 320px;
  max-width: 480px;
  overflow: auto;
}

.pmspace-legend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pmspace-legend-table thead th {
  text-align: left;
  padding: 6px 8px;
  font-weight: 600;
  border-bottom: 1px solid #e6e6e6;
}

.pmspace-legend-table tbody td {
  padding: 6px 8px;
  vertical-align: middle;
  border-bottom: 1px solid #f4f4f4;
}

.pm-legend-col-colour {
  width: 36px;
}

.pm-legend-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.3) inset;
}

/* small lesson name column, truncated with ellipsis */
.pm-legend-lesson-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

/* views numeric column */
.pm-legend-views-cell {
  width: 72px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Donut wrapper (right) */
.pmspace-report-donut-wrap {
  flex: 0 0 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Peity SVG will be injected; ensure responsive */
.pmspace-report-donut {
  display: inline-block;
}

/* Fallback textual representation */
.pmspace-report-donut-fallback {
  padding: 12px;
  background: #f7f7f7;
  border-radius: 6px;
  font-size: 12px;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .pmspace-report-chart-row { flex-direction: column-reverse; }
  .pmspace-report-donut-wrap { margin-bottom: 10px; }
  .pmspace-legend-table thead th, .pmspace-legend-table tbody td { font-size: 12px; padding: 6px; }
}

/* Ensure table remains responsive on small screens */
@media (max-width: 720px) {
  .pmspace-student-report {
    font-size: 11px !important;
  }
  .pmspace-student-report th.pmspace-center,
  .pmspace-student-report td.pmspace-center {
    width: 80px;
  }
}
