/**
 * Simple Course Creator — Default Stylesheet
 *
 * THEME OVERRIDE: Create a folder called scc_templates/ in the root of your
 * active theme and copy this file into it. Your version takes priority over
 * the plugin's.
 *
 * This file is organized as a living reference. Every selector the plugin
 * outputs appears here, in DOM order, with comments describing what it
 * targets and any conditions that apply.
 *
 * Additional styles from the Customizer (Appearance > Customize >
 * Simple Course Creator) are output inline in <head> and override the
 * defaults in this file.
 *
 * Post meta styles (.scc-post-meta, .scc-post-meta-author, .scc-post-meta-date)
 * are in a separate file (assets/css/scc-post-meta.css) and are not part of
 * this override system. Target those selectors with custom CSS in your theme.
 */


/* =============================================================================
   Course Group

   .scc-course-group — wraps all .scc-post-list elements when a post belongs
                       to more than one course. Not present for single-course
                       posts. Use this to style the group as a unit or to
                       adjust spacing between stacked course boxes.
   ============================================================================= */

.scc-course-group {
	margin-bottom: 1.5rem;
}

.scc-course-group .scc-post-list {
	margin-bottom: 1rem;
}

.scc-course-group .scc-post-list:last-child {
	margin-bottom: 0;
}


/* =============================================================================
   Course Listing Container

   .scc-post-list          — always present on every course listing box
   .scc-single-course      — added when the post belongs to exactly one course
   .scc-multiple-courses   — added when the post belongs to more than one course
   [data-course-id="N"]    — targets a specific course box by term ID;
                             N is the WordPress term ID of the course.
                             Example: .scc-post-list[data-course-id="5"] {}
   ============================================================================= */

.scc-post-list {
	position: relative;
	padding: 1.4rem;
	border: 1px solid rgba(0,0,0,.1);
	margin-bottom: 1.5rem;
}

.scc-post-list.scc-single-course {}

.scc-post-list.scc-multiple-courses {}

.scc-post-list[data-course-id] {}


/* =============================================================================
   Course Title

   Rendered only when the course has a Post Listing Title set (Edit Course
   screen), or falls back to the course name. Set Post Listing Title to an
   empty string on the Edit Course screen to suppress the heading entirely.
   ============================================================================= */

.scc-post-list .scc-post-list-title {
	margin-top: 0;
}


/* =============================================================================
   Course Description

   .scc-course-description — wraps the term description set on the Edit Course
                             screen. Not present when no description is set.
                             The inner markup (typically one or more <p> tags)
                             is generated by WordPress core via term_description().
   ============================================================================= */

.scc-post-list .scc-course-description {}

.scc-post-list .scc-course-description p:last-of-type {
	margin-bottom: 0;
}


/* =============================================================================
   Toggle Button

   .scc-toggle-post-list           — the button that shows/hides the post list;
                                     renders as a <button> element
   .scc-toggle-post-list.scc-opened — added while the list is expanded

   Not present when "Disable JavaScript" is enabled in Settings > Course
   Settings. In that case .scc-show-posts is used instead (see Post Container).

   Note: Themes commonly apply broad button resets. The specificity of
   .scc-post-list .scc-toggle-post-list (two classes) overrides most bare
   button {} rules. If your theme uses higher-specificity button selectors
   and the toggle looks wrong, add one CSS override targeting this selector.
   ============================================================================= */

.scc-post-list .scc-toggle-post-list {
	/* Reset browser and theme button styles. */
	appearance: none;
	-webkit-appearance: none;
	background: none;
	border: none;
	border-radius: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	text-align: left;

	/* Position in the bottom-right corner of the container. */
	position: absolute;
	right: 10px;
	bottom: 10px;
	font-size: 10px;
	font-weight: bold;
	line-height: 1;
	text-transform: uppercase;
}

/* Chevron indicator — rotates when the list is open. */
.scc-post-list .scc-toggle-post-list::after {
	content: ' ▾';
	display: inline-block;
	transition: transform 0.2s ease;
}

.scc-post-list .scc-toggle-post-list.scc-opened::after {
	transform: rotate(180deg);
}


/* =============================================================================
   Post Container

   .scc-post-container — wraps the post list; hidden by default, revealed
                         by the toggle button via JavaScript
   .scc-show-posts     — used instead of .scc-post-container when "Disable
                         JavaScript" is enabled; always visible, no toggle
   ============================================================================= */

.scc-post-list .scc-post-container {
	display: none;
}

.scc-post-list .scc-show-posts {
	display: block;
}


/* =============================================================================
   Post List
   ============================================================================= */

.scc-post-list ol,
.scc-post-list ul {
	padding: 1.5em 0 0;
	margin: 0;
}

.scc-post-list .scc-post-item {
	list-style-position: inside;
	padding: .5em 0 0 0;
}

.scc-post-list .scc-post-item:first-child {
	padding-top: 0;
}

.scc-post-list .scc-post-item:last-child {
	padding-bottom: 0;
}


/* =============================================================================
   List Items

   .scc-post-item    — each <li> in the listing (always present)
   .scc-list-item    — <span> wrapping the link or current-post span inside
                       each <li>; always present
   .scc-current-post — replaces the link <a> on the currently viewed post;
                       may carry an inline style from the Current Post Style
                       setting (bold, italic, or strikethrough)
   ============================================================================= */

.scc-post-list .scc-post-item {}

.scc-post-list .scc-list-item {}

.scc-post-list .scc-current-post {}


