/* =================================================================================
   1. LOGIN PAGE - GLOBAL & DESKTOP
   ================================================================================= */

/* Force the login wrapper to take up the full screen height */
.ic-Login {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    margin: 0 !important;
}

/* Ensure the login container is centered */
.ic-Login__container {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    position: relative !important;
    top: auto !important;
}

/* Make the logo full width */
.ic-Login-header__logo {
    flex: 0 0 100% !important;
    min-width: 100px !important;
}

/* CRITICAL: Hide native login forms immediately to prevent "flash" on mobile */
.ic-Login__body, 
.ic-Login__actions, 
.ic-Form-group, 
#login_form,
.ic-Login__footer { 
    display: none !important; 
}

/* ADMIN OVERRIDE: Reveal the native forms if ?admin=true is used */
html.cps-admin-mode .ic-Login__body,
html.cps-admin-mode .ic-Form-group,
html.cps-admin-mode #login_form,
html.cps-admin-mode .ic-Login__footer {
    display: block !important;
}

html.cps-admin-mode .ic-Login__actions {
    display: flex !important; /* Canvas uses flex for the button row */
}

/* Ensure our JS-injected welcome message is always visible */
#custom-login-welcome {
    display: block !important;
    visibility: visible !important;
}


/* =================================================================================
   2. MOBILE SPECIFIC LOGIN STYLING (The Safari Lock)
   ================================================================================= */
@media only screen and (max-width: 767px) {
    /* 1. The ultimate iOS scroll killer */
    html, body {
        background-color: #2a17d4 !important;
        width: 100vw !important; 
        height: 100vh !important;
        height: 100dvh !important; /* Modern iOS dynamic viewport height */
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important; 
        position: fixed !important; /* physically prevents scrolling */
        top: 0 !important;
        left: 0 !important;
    }

    #application, .ic-Login-Body, .ic-Login {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        background-color: transparent !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    /* Set exact 400px limit, centered */
    .ic-Login__container, .ic-Login__content {
        display: block !important;
        width: 100% !important;
        max-width: 400px !important; 
        margin: 0 auto !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        position: static !important;
    }

    /* Your excellent padding fix */
    .ic-Login__innerContent {
        padding-top: 0 !important;
    }

    .ic-Login-header__logo img,
    .ic-Login-header__logo svg,
    .mobileLogin-Header img {
        display: none !important;
    }

    .mobileLogin-Header, .ic-Login__header, .ic-Login-header {
        background-image: url('/accounts/2/files/14/download?verifier=AhcocHzct78Ag7t3ayVrxRYQbzf4RH9womGzEwhD') !important; 
        background-repeat: no-repeat !important;
        background-position: center center !important; 
        background-size: 250px !important; 
        width: 100% !important;
        height: 120px !important; 
        min-height: 120px !important;
        margin: 20px auto 0 auto !important; 
        padding: 0 !important;
        display: block !important;
        border: none !important;
        position: relative !important;
        z-index: 10 !important;
    }

    .mobileLogin-Header:after, .ic-Login__header:after, .ic-Login-header:after {
        display: none !important;
        content: none !important;
    }
}

/* =================================================================================
   3. CUSTOM LOGIN MESSAGE WRAPPER (Desktop & Mobile Layout)
   ================================================================================= */
   
/* Base styles shared by both devices */
#cps-custom-login-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    z-index: 10 !important;
}

/* Desktop Layout - Flow naturally inside the Canvas container (Regardless of window size) */
#cps-custom-login-wrapper.cps-is-desktop {
    position: relative !important;
    margin: 30px 0 30px 0 !important;
    padding: 0 20px !important;
}

/* Mobile Layout - Fixed to the glass to beat iOS Safari */
#cps-custom-login-wrapper.cps-is-mobile {
    position: fixed !important;
    top: 170px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 2147483647 !important;
    margin: 0 !important;
}

/* Force the Canvas footer to stop overlapping on desktop */
.ic-Login-footer {
    position: relative !important;
    margin-top: 20px !important;
}


/* =================================================================================
   4. INJECTED ELEMENT STYLING (Login Text & Buttons)
   ================================================================================= */
   
/* Login Wrapper Typography & Button */
#cps-custom-login-wrapper h2 {
    color: #ffffff !important;
    margin: 0 0 15px 0 !important;
    font-size: 24px !important;
    font-weight: bold !important;
    font-family: sans-serif !important;
    line-height: 1.2 !important;
}

#cps-custom-login-wrapper p {
    color: #ffffff !important;
    margin: 0 0 35px 0 !important;
    font-size: 16px !important;
    font-family: sans-serif !important;
}

#cps-custom-login-wrapper a.cps-login-btn {
    display: inline-block !important;
    background-color: rgba(255,255,255,0.1) !important;
    border: 2px solid #ffffff !important;
    padding: 7px 40px !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 12px !important;
    font-weight: bold !important;
    font-size: 18px !important;
    box-sizing: border-box !important;
}

#cps-custom-login-wrapper a.cps-login-btn:hover {
    background-color: rgba(255,255,255,0.2) !important; /* Optional hover effect */
}

/* Profile SSO Banner Styling */
#custom-sso-banner {
	margin-bottom: 25px;
}

#custom-sso-banner .cps-sso-alert {
    background: #e8f4fd !important;
    border-left: 5px solid #0078d4 !important;
    padding: 15px !important;
    border-radius: 4px !important;
    color: #333 !important;
}

#custom-sso-banner .cps-sso-alert a {
    font-weight: bold !important;
}



/* =================================================================================
   5. FORUM MODE (GROUP PAGES) - SIDEBAR NAVIGATION
   ================================================================================= */

/* Hide native sidebar links. Targets both our custom JS class AND native Canvas group classes */
html.cps-is-group-page #left-side > *:not(#cps-group-course-home),
body[class*="context-group_"] #left-side > *:not(#cps-group-course-home) {
    display: none !important;
}

/* Style our custom "Back to Course Home" button */
#cps-group-course-home {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
}

.cps-course-home-btn {
    display: flex !important;
    align-items: center !important;
    padding: 10px 12px !important;
    background-color: #f5f5f5 !important;
    color: #2D3B45 !important; 
    text-decoration: none !important;
    font-weight: bold !important;
    border-radius: 4px !important;
    border-left: 3px solid #0078d4 !important;
    transition: background-color 0.2s ease !important;
}

.cps-course-home-btn:hover, .cps-course-home-btn:focus {
    background-color: #e8ecee !important;
    text-decoration: none !important;
}



/* =================================================================================
   6. MISCELLANEOUS
   ================================================================================= */

/* Hide "Course Groups" and group page links on right side of home page */
body.home #right-side #course_show_secondary h2.course-groups-home-rside-header, body.home #right-side #course_show_secondary h2.course-groups-home-rside-header + ul.unstyled_list.group_list {
	display:none;
}


.pages #wiki_page_show, .module-sequence-footer {
	padding-bottom: 30px;
}

.module-sequence-footer {
	padding-top: 30px
}

.pages li {
	padding-bottom: 12px;
}


/* Hide the global navigation calendar list item */
li:has(#global_nav_calendar_link) {
    display: none !important;
}

.page-featured-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}



/* Course home pages */

body.home[class*="context-course_"] #course_home_content h3 {
	margin-top: 30px !important;
	padding: 12px !important;
	background-color: #f9c34d !important;
	font-weight: 600 !important;
	color: #0f065a;
}

details {
	margin-bottom: 10px; 
	border: 1px solid #c7cdd1; 
	padding: 10px;
}

summary {
	font-weight: bold;
	cursor: pointer; 
	font-size: 1.1em; 
	color: #2d3b45;
}

details div.details-content {
	margin-top: 10px;
	padding-left: 15px;
}

details .btn {
	color: var(--ic-brand-button--primary-text) !important;
	text-decoration: none;
}


/* Allow full discussion titles to display on the Discussions list page */
.discussion-title {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
	line-height: 1.5em !important;
}

/* Allow full titles to display when discussions are placed inside Modules */
.ig-title {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

/* Styling for dynamically injected discussion authors */
.discussion-author-name {
    display: block;
    font-size: 0.85em;
    color: #5b6670;
    margin-top: 4px;
	margin-bottom: 15px;
    font-weight: normal;
}


/* MEDIA PLAY BOXES */
/* --- Audio Box Container --- */
.audio-box {
	background-color: #f9fafb; 
	border: 1px solid #e5e7eb; 
	border-radius: 12px; 
	padding: 20px; 
	max-width: 350px; 
	text-align: center;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); 
	margin: 30px auto 40px auto;
}

.audio-box .prompt {
	margin-bottom: 15px;
}

.audio-box .prompt h3 {
	margin: 0; 
	color: #1f2937; 
	font-size: 1.25rem; 
	font-family: inherit;
}

.audio-box .player {
	margin: 0;
}

.audio-box .player audio {
	width: 100%;
	outline: none;
}

.audio-box .hint {
	margin-top: 10px;
}


.audio-box .hint span {
	font-size: 0.8rem;
	color: #6b7280;
	font-style: italic;
}


/* --- Video Box Container --- */
.video-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  margin: 25px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.video-box .prompt h3 {
  margin: 0 0 15px 0;
  color: #0f172a;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-box .player {
  margin-bottom: 10px;
  width: 100%; /* Ensures the container takes up full width */
}

/* This is the magic shield against Canvas's auto-formatting */
.video-box video {
  width: 100% !important; /* Overrides width="300" */
  height: auto !important; /* Overrides height="150" */
  aspect-ratio: 16 / 9; /* Forces standard widescreen shape */
  border-radius: 6px;
  background-color: #000000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: block; /* Removes tiny invisible gaps below the video */
}

.video-box .hint {
  text-align: center;
}

.video-box .hint span {
  font-size: 0.85rem;
  color: #64748b;
  font-style: italic;
}

/* PAGE FOOTER: Button Style
.page-nav-footer {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.page-nav-footer ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 15px; 
  flex-wrap: wrap; 
}

.page-nav-footer li {
  margin: 0; 
}

.page-nav-footer a {
  background-color: #f5f5f5;
  color: #333333; 
  text-decoration: none !important;
  padding: 10px 20px;
  border: 1px solid #cccccc; 
  border-radius: 6px;
  display: inline-block;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.page-nav-footer a:hover, 
.page-nav-footer a:focus {
  background-color: #e5e5e5; 
  text-decoration: none;
}

*/


/* PAGE FOOTER: Breadcrumb Style */
.page-nav-footer {
  margin-top: 40px;
  display: flex;
  /* Removed justify-content: center; so it defaults to left-aligned */
}

.page-nav-footer ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center; /* Ensures the text and separators align perfectly */
  flex-wrap: wrap; 
}

.page-nav-footer li {
  margin: 0;
  display: flex;
  align-items: center;
}

/* This adds the separator automatically after every item EXCEPT the last one */
.page-nav-footer li:not(:last-child)::after {
  content: "\203A"; /* The unicode for a nice, clean right-pointing angle quote (›) */
  margin: 0 12px; /* Controls the spacing between the links and the separator */
  color: #94a3b8; /* A subtle gray so the separators don't distract from the links */
  font-size: 1.2rem; 
}

.page-nav-footer a {
  color: #2563eb; /* A standard, accessible link blue */
  text-decoration: none !important;
  font-weight: 500; /* Slightly bold, but less heavy than a button */
  transition: color 0.2s ease;
}

.page-nav-footer a:hover, 
.page-nav-footer a:focus {
  color: #1e3a8a; /* Darkens on hover for visual feedback */
  text-decoration: underline !important; /* Adding an underline on hover is great for accessibility */
}

/* Optional: To make the last item (usually the current page) look like plain text instead of a link */
.page-nav-footer li:last-child a {
  color: #64748b;
  pointer-events: none; /* Makes it unclickable */
  font-weight: 400;
}



/* RESOURCE PAGE STYLING */

/* --- Resource Page Image --- */
.resource-page-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* --- Resource Page Prompt (Callout Box) --- */
.resource-page-prompt {
  background-color: #f0f9ff;
  border-left: 5px solid #0284c7;
  padding: 15px 20px;
  border-radius: 0 8px 8px 0;
  margin: 30px 0;
}

.resource-page-prompt p {
  color: #0f172a;
  margin: 0 0 10px 0;
}

.resource-page-prompt p:last-child {
  margin-bottom: 0;
}

/* --- Resource Page List --- */
.resource-page-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
}

.resource-page-list li {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline; /* Keeps text aligned at the bottom */
  flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.resource-page-list li a {
  text-decoration: none !important;
  color: #64748b !important;
  font-weight: 600 !important;
  font-size: 1.15rem !important;
  line-height: 1;
}

.resource-page-list li a:hover {
  text-decoration: underline !important; /* Added a subtle hover effect for usability */
}

.resource-page-list li a i {
  margin-right: 8px;
  color: #475569;
}

.resource-page-list li span {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0 0 0 auto; /* Forces the info text to the far right */
  padding-left: 20px; /* Ensures a gap if viewed on very small screens */
  line-height: 1;
}
