/*
Theme Name: CAFAF PLT Online Modules
Author: heronco
Author URI: https://www.heronco.com
Tags: full-site-editing, editor-style, block-styles, block-patterns
Requires at least: 6.3
Requires PHP: 8.0
Version: 2.0.0
License: Proprietary - For authorized client sites only


Description: Dynamic block theme for CAFAF with configurable style personalities
*/
/*
 * Copyright (c) 2025 Heron Design
 * All Rights Reserved.
 * 
 * This software is proprietary and confidential. Unauthorized copying,
 * distribution, or use of this software is strictly prohibited.
 * 
 * Licensed for use only on authorized Heron Design client websites.
 */


/*
 * This file contains ONLY static styles that don't change per client.
 * Dynamic styles (colors, spacing, border-radius) are generated via Theme_Config
 */

/* ==========================================================================
   BASE STYLES (Static)
   ========================================================================== */

   html {
	scroll-behavior: smooth;
}

@media screen and (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}



/* ==========================================================================
   CONTENT STRUCTURE (Static)
   ========================================================================== */

/* Ensure the footer sticks to the bottom */
.wp-site-blocks {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wp-site-blocks > main {
    margin-block-start: 0 !important;
}

.site-footer {
margin-top: auto;
}
.wp-site-blocks .wp-block-post-content {
	margin-block-start: 0;
}

.wp-block-post-content p,
.wp-block-post-content ul li {
	margin-block-start: 0;
	font-size: 1rem;
	padding: 0.5em;
}

h2.has-reg-font-weight, h3.has-reg-font-weight {
	font-weight: 400;
}

body:not(home) h1.wp-block-post-title {margin-top:1em}

@media screen and (max-width: 520px) {
    body:not(home) h1.wp-block-post-title {margin-top:0;font-size:2rem;}
}

/* ==========================================================================
   MEDIA & IMAGES (Static structure)
   Note: Border radius styles moved to registered-block-styles.css
   ========================================================================== */

.wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__media {
	margin: 0 1em;
}

.wp-block-media-text__content p {
	padding: 0;
	margin-top: 1em;
}

.wp-block-media-text.text-has-0-padding-mobile .wp-block-media-text__content {
	padding: 0;
}

/* ==========================================================================
   VIDEO & COURSE STYLING
   ========================================================================== */
/* FV Player captions */
.flowplayer .fp-captions {
  left: 0;
  right: 0;
  width: 100%;
  text-align: center;
    line-height: 1.1;
  padding-bottom:24px;
}

.flowplayer .fp-captions br {
  display: none;            /* kill the spacer lines */
}
.flowplayer .fp-captions p {
  display: block;
  margin: 0 auto;
  padding: 2px 8px;
  font-size: 18px;
  line-height: 1.25;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border-radius: 0;
}

.flowplayer .fp-captions p + p { margin-top: 2px; }
.tutor-lesson-content .tutor-lesson-wrapper p:not(:last-child) {
    margin-bottom:0
}

/*Hide unnecessary page elements on Course page */

.tutor-lesson-content .tutor-lesson-image-wrapper {display:none !important}
/* WCAG 1.4.3: no opacity on sidebar items — dark blue at 50% over white was 2.28:1.
   Current lesson is signalled by weight + left border instead. */
.tutor-learning-sidebar .tutor-learning-sidebar-curriculum .tutor-learning-nav .tutor-learning-nav-item {color:var(--wp--preset--color--dark-blue);opacity:1;font-weight:400;border-left:3px solid transparent;}
.tutor-learning-sidebar .tutor-learning-sidebar-curriculum .tutor-learning-nav .tutor-learning-nav-item.active {font-weight:600;color:var(--wp--preset--color--dark-blue);border-left-color:var(--wp--preset--color--dark-blue);}
/* "Reading" subtext under each lesson: Tutor uses #b9bbbe / #73767d (1.9–4.0:1) */
body .tutor-learning-sidebar .tutor-learning-nav .tutor-learning-nav-item .tutor-tiny-2,
body .tutor-learning-sidebar .tutor-learning-nav .tutor-learning-nav-item [class*="tutor-text-"] {color:#5c5f66;}

/* Tutor's muted text tokens (dashboard "Hi,", login placeholders, course-landing meta,
   lesson subtext). #5c5f66 is 5.4:1 on #fafafa and 5.0:1 on #f0f1f1.
   "body" prefix outranks Tutor's single-class rules without !important. */
:root {
  --tutor-text-subdued: #5c5f66;
  --tutor-text-hints: #5c5f66;
  --tutor-color-muted: #5c5f66;
  --tutor-color-success: #2e7d32; /* was #24a148 (3.1:1); matches .cafaf-lesson-complete-msg */
}
body .tutor-text-subdued, body .tutor-text-hints, body .tutor-color-muted {color:#5c5f66;}
body .tutor-color-success {color:#2e7d32;}
body .tutor-form-control::placeholder {color:#5c5f66; opacity:1;}

/* WCAG 2.4.7: one visible focus ring everywhere, in brand dark blue (8.4:1 on white) */
body a:focus-visible,
body button:focus-visible,
body summary:focus-visible,
body input:focus-visible,
body select:focus-visible,
body textarea:focus-visible,
body [role="link"]:focus-visible,
body [role="button"]:focus-visible,
body [role="tab"]:focus-visible,
body [tabindex="0"]:focus-visible {
  outline: 3px solid var(--wp--preset--color--dark-blue);
  outline-offset: 2px;
}
body .tutor-btn:focus-visible:not(:disabled):not(.disabled) { box-shadow: none; }
body .lesson-transcript__body:focus-visible { outline-offset: -3px; }
body .freedomplayer:focus-visible { outline-offset: 4px; }
.tutor-learning-nav-header-progress {display:none}
.tutor-learning-nav-header-title {display:none}
.tutor-sidebar-restore-dropdown {display:none}
.tutor-learning-sidebar-pages {display:none}
.tutor-course-details-top {display:none}
.tutor-card-footer  {display:none}

/* 1. Always show controls (defeat the mouseout fade) */
.flowplayer .fp-ui > .fp-controls,
.flowplayer.is-mouseout .fp-ui > .fp-controls,
.flowplayer.is-playing .fp-ui > .fp-controls {
  opacity: 1 !important;
  transition: none !important;
}

/* 2. Reserve space under the video and park the bar there */
.flowplayer {
  padding-bottom: 2.4em;          /* same as .fp-controls height */
  overflow: visible !important;
  background: transparent;
}
.flowplayer .fp-controls {
  bottom: -2.4em !important;      /* sits in the padding, below the frame */
  background: #222 !important;    /* solid bar, not an overlay */
}

/* captions now sit on the frame edge, not above a floating bar */
.flowplayer .fp-captions { bottom: 0.5em; }

/* always-visible controls below the frame */
.freedomplayer .fp-ui > .fp-controls,
.freedomplayer.is-mouseout .fp-ui > .fp-controls,
.freedomplayer.is-paused .fp-ui > .fp-controls,
.freedomplayer.is-playing .fp-ui > .fp-controls {
  opacity: 1 !important;
  transition: none !important;
  background-color: #222 !important;
  color: #f5f5f5 !important;
}
.freedomplayer .fp-controls .fp-icon,
.freedomplayer .fp-controls .fp-elapsed,
.freedomplayer .fp-controls .fp-duration,
.freedomplayer .fp-controls .fp-cc { color: #f5f5f5 !important; opacity: 1 !important; }
.freedomplayer .fp-controls .fp-timeline { background: #555 !important; }

/* Hide Tutor LMS dashboard onboarding/welcome tour modal */
.tutor-modal.tutor-onboarding-tour-modal,
div[data-tutor-modal="onboarding-tour"] {
    display: none !important;
}

/* Hide the dark background overlay that locks the screen */
.tutor-modal-overlay {
    display: none !important;
}

.lesson-transcript__body { max-height: 380px; overflow-y: auto; padding: 0 1rem; line-height: 1.7; }

a[target="_blank"]::after {
    content: "" / "(opens in a new tab)";
    display: inline-block;
    width: .85em;
    height: .85em;
    margin-left: .3em;
    vertical-align: -.1em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l82.7 0-201.4 201.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3 448 192c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160c0-17.7-14.3-32-32-32L320 0zM80 96C35.8 96 0 131.8 0 176L0 432c0 44.2 35.8 80 80 80l256 0c44.2 0 80-35.8 80-80l0-80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 80c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l80 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 96z'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l82.7 0-201.4 201.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3 448 192c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160c0-17.7-14.3-32-32-32L320 0zM80 96C35.8 96 0 131.8 0 176L0 432c0 44.2 35.8 80 80 80l256 0c44.2 0 80-35.8 80-80l0-80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 80c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l80 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 96z'/%3E%3C/svg%3E") no-repeat center / contain;
}
a.tutor-btn.tutor-btn-primary {background:var(--wp--preset--color--dark-blue);    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;border:solid 2px var(--wp--preset--color--dark-blue);color:#ffffff;}
a.tutor-btn.tutor-btn-primary:hover, a.tutor-btn.tutor-btn-primary:focus-visible {background:#ffffff;color:var(--wp--preset--color--dark-blue)}

.cafaf-learning-nav { position: relative;padding-top:64px; }
.cafaf-learning-nav summary { list-style: none; cursor: pointer; width: 28px; display: grid; gap: 5px; padding: 4px 0; }
.cafaf-learning-nav summary::-webkit-details-marker { display: none; }
body .cafaf-learning-nav summary:focus-visible { outline-offset: 6px; border-radius: 2px; }
body .cafaf-learning-nav li a:focus-visible { background: #f3f5f9; outline-offset: -3px; }
.cafaf-learning-nav summary span { height: 3px; background: var(--wp--preset--color--dark-blue); border-radius: 2px; }
.cafaf-learning-nav ul { position: absolute; right: 0; top: 100%; margin: 6px 0 0; padding: 8px 0; list-style: none; min-width: 180px; background: #fff; border: 1px solid #e3e5eb; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.08); z-index: 50; }
.cafaf-learning-nav li a { display: block; padding: 8px 16px; color: var(--wp--preset--color--dark-blue); text-decoration: none; }
.cafaf-learning-nav li a:hover { background: #f3f5f9; }

.tutor-learning-header { position: relative; z-index: 1000; overflow: visible; }
.tutor-learning-header-inner,
.tutor-learning-header-content { overflow: visible; }

.tutor-mark-as-complete-button.cafaf-locked { opacity: .45; cursor: not-allowed; }

details.lesson-transcript {padding-top:2em}

body.single-courses.tutor-lms .tutor-learning-header-content {display:flex;justify-content:space-between;width:100%;padding:.5em 1em;border-bottom: solid 1.5px var(--wp--preset--color--dark-blue);
}

[data-cafaf-locked="1"] { pointer-events: none; opacity: .4; }
.cafaf-lesson-complete-msg { text-align: center; color: #2e7d32; font-weight: 600; }

.cafaf-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.cafaf-fieldset legend { padding: 0; margin-bottom: 8px; }
.cafaf-radio-group { display: flex; flex-direction: column; gap: 10px; }
.cafaf-radio-group--inline { flex-direction: row; gap: 24px; }
.cafaf-radio { display: flex; align-items: center; gap: 8px; }
.cafaf-radio .tutor-label { margin: 0; font-weight: 400; }

button.tutor-btn-block, button.tutor-btn-primary {background-color:var(--wp--preset--color--dark-blue);border:solid 2px var(--wp--preset--color--dark-blue);color:#ffffff;text-transform:uppercase;border-radius:12px;}
button.tutor-btn-block:focus-visible, button.tutor-btn-primary:focus-visible,button.tutor-btn-block:hover, button.tutor-btn-primary:hover, button.tutor-btn-primary:hover:not(:disabled):not(.disabled) {background-color:#ffffff;color:var(--wp--preset--color--dark-blue);border:solid 2px var(--wp--preset--color--dark-blue);}
a.tutor-btn-link, .tutor-btn-link {color:var(--wp--preset--color--dark-blue);}

.cafaf-feedback { margin-top: 2rem; }
.cafaf-feedback__frame { display: block; width: 100%; min-height: 540px; border: 0; }
   
   
/* ==========================================================================
   UTILITY CLASSES (Static)
   ========================================================================== */

h2.price {
	font-size: 4rem;
}

.940-width {
	width: 940px;
	margin-left: auto;
	margin-right: auto;
}

.wide-button {
	padding-left: 3.5em;
	padding-right: 3.5em;
}

.text-has-shadow {
	text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.67);
}

.has-padding-0 {
	padding: 0 !important;
}

.align-items-end {
	align-items: end !important;
}

a.button-primary.green {background: var(--wp--preset--color--dark-green);
  padding-top: calc(0.667em + 2px);
  padding-right: calc(1.333em + 2px);
  padding-bottom: calc(0.667em + 2px);
  padding-left: calc(1.333em + 2px);
  border-radius: 12px;
  text-decoration: none;
  color: white;
  font-weight: 700;
  text-transform: uppercase;
    margin-left:.5em;margin-top:.5em;
}
  
.wp-block-buttons .wp-block-button__link {margin:.5em}

/* ==========================================================================

   ========================================================================== */


/* ==========================================================================
   RESPONSIVE - DESKTOP
   ========================================================================== */

.show-on-mobile,
.show-on-desktop,
.show-on-tablet {
	display: none !important;
}

@media screen and (min-width: 900px) {
	.show-on-desktop {
		display: flex !important;
	}
}

/* ==========================================================================
   RESPONSIVE - TABLET
   ========================================================================== */

@media screen and (min-width: 521px) and (max-width: 899px) {
	.show-on-tablet {
		display: flex !important;
	}

}

@media screen and (max-width: 899px) {

    .wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid {
        grid-template-columns: 1fr;
    }
    
}

/* ==========================================================================
   RESPONSIVE - MOBILE
   ========================================================================== */

@media screen and (max-width: 520px) {
	.show-on-mobile {
		display: flex !important;
	}
	.hide-on-mobile {display:none}

    /* .wp-block-site-logo img {max-width:200px} */
	ol,
	ul {
		font-size: 1.25em;
	}

	.wp-block-post-title {
		padding: 0.5em;
	}

	h3.wp-block-heading {
		font-size: 1.65em;
		line-height: 1.1;
		margin: 0;
	}
	
	footer h3.wp-block-heading {
	    font-size:1.3rem;
	    margin-top:.5em;
	}

	.wp-block-post-content p,
	.wp-block-post-content ul li, .wp-block-post-content ol li {
		line-height: 1.15;
		margin: 0.5em;
		padding:0;
	}

	.wp-block-post-content p.has-padding-1em {
		padding-left: 1em;
		padding-right: 1em;
	}

	.wp-block-button a.wp-block-button__link {
		font-size: 1.2em !important;
	}
	
	footer .wp-block-button a.wp-block-button__link {
		font-size: 1rem !important;
	}

	/* Cover overlay adjustments for mobile */
	.wp-block-cover .wp-block-cover__inner-container {
		position: absolute;
		bottom: 0;
		background: rgba(255, 255, 255, 0.63);
		padding-bottom: 20px;
		padding-top: 15px;
	}

	.wp-block-cover.inner-background-none .wp-block-cover__inner-container {
		background: none;
		padding: unset;
	}

	.wp-block-cover .wp-block-cover__inner-container .wp-block-column.more {
		flex-basis: 84px;
		max-width: 84px;
	}

	.wp-block-cover .wp-block-cover__inner-container .more-container {
		margin-left: -36px !important;
	}

	.wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__media {
		margin: 0 1em;
	}

	.wp-block-group.is-vertical h2.wp-block-heading {
		padding: 0.5em 2.25em;
	}

	.wp-block-media-text__content p {
		padding: 0;
		margin-top: 1em;
	}

	.wide-button {
		padding-left: 2.5em;
		padding-right: 2.5em;
	}
	
	footer figure {max-width:80px}
	
	footer .wp-block-column.is-vertically-aligned-top:not(:last-child) {border-bottom:solid .5px;padding-bottom:.5em}
}

/* ==========================================================================
   ADDITIONAL UTILITY CLASSES (Static)
   ========================================================================== */

.wp-block-group.has-240px-top-padding {
	padding-top: 240px;
}

.wp-block-details summary {
	font-size: 1rem;
	margin-bottom:6px;
	padding:.5em;
	background-color:var(--wp--preset--color--dark-blue);
	border-radius:0 8px 8px 0;
	color:var(--wp--preset--color--base)
}

.wp-block-details[open] {
    border-left: solid 1px var(--wp--preset--color--dark-blue);
    border-bottom: solid 1px var(--wp--preset--color--dark-blue);
    border-radius:0 0 0 8px;
}

.wp-block-details {
    margin-bottom:1em
}
.wp-block-details > :not(summary) {
    padding:1em
}

.wp-block-details.is-style-details-plus summary {
    background-color:var(--wp--preset--color--base);
    color:var(--wp--preset--color--dark-blue);
}
.wp-block-details.is-style-details-plus[open]{
    border-left:none;border-bottom:none;border-radius:0
}
.wp-block-details.is-style-details-plus{
    width:900px;margin-bottom:.5em;max-width:90vw;
}
.wp-block-details.is-style-details-plus p, .wp-block-details.is-style-details-plus li {
    padding: .5em 1em 0 2em
}


@media screen and (max-width: 78px) {
.wp-block-details.is-style-details-plus {width:90vw}
}

ol,
ul {
	font-size: 1rem
}

.wp-block-group.is-vertical h2.wp-block-heading {
	padding: 0;
}

body.logged-in .cafaf-staff-links {
    position: absolute;
    top: -2px;
    right: 5px;
    padding:4px 8px;margin:0;
    background: var(--wp--preset--color--dark-blue);
    color: white;
    border-radius: 0 0 12px 12px;
}
body.logged-in .cafaf-staff-links p {padding:0;margin:0}

body.logged-in .cafaf-staff-links a {
    color: white;
    text-decoration: none;
    padding:0 8px;
    font-weight: 600;
    text-transform: uppercase;
}

body.logged-in .cafaf-staff-links a:hover, body.logged-in .cafaf-staff-links a:focus {
    text-decoration: underline;
    color: var(--wp--preset--color--pale-cyan-blue);
}
    
body.logged-in .cafaf-cont-staff-account-box {
    padding: .5em;
    background: var(--wp--preset--color--dark-blue);
    color: white;
    border-radius: 12px;
}
    
@media (max-width: 600px) {
    body.logged-in .cafaf-staff-links .hello {font-size:.5em}
    body.logged-in .cafaf-staff-links a {font-size:.5em; padding:0 4px;}
}

/* ==========================================================================
   BLOCK-SPECIFIC OVERRIDES (Static)
   ========================================================================== */

/* TABLES */
.wp-block-table .has-fixed-layout {
    width:96%;
    margin:1em;
    font-size:1rem
}
.wp-block-table th {color: var(--wp--preset--color--white);
    background: var(--wp--preset--color--dark-purple);
}

table.attendees, table.widefat.striped {
  font-family: system-ui, -apple-system, sans-serif;
  font-size:1rem;
  border-collapse: collapse;
  width: 100%;
  border:2px solid var(--wp--preset--color--dark-blue);
}

table.attendees td, table.attendees th, table.widefat.striped td, table.widefat.striped th {
  border: 1px solid #ddd;
  padding: 8px;
}

table.attendees tr, table.widefat.striped tr {vertical-align:baseline}

table.attendees tr:nth-child(even), table.widefat.striped tr:nth-child(even){background-color: #f2f2f2;}

table.attendees tr:hover, table.widefat.striped tr:hover {background-color: #ddd;}

table.attendees th, table.widefat.striped th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: var(--wp--preset--color--dark-blue);
  color: white;
}


/* Latest Comments */
.wp-block-latest-comments {
	padding-left: 0;
}

/* Page break before utility */
.page-break-before {
	page-break-before: always;
}