/*
Theme Name: CAFAF FDS Custom Theme
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;
}

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

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

.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;
}
/* base — shape, type, and the hover inversion, written once */
.fds-button {
  --fds-btn-bg: var(--wp--preset--color--primary, 
#255ca3);
  --fds-btn-fg: var(--wp--preset--color--base, #fff);
  display: inline-block;                 /* makes <a> honor padding like <button> */
  background: var(--fds-btn-bg);
  color: var(--fds-btn-fg);
  border: 2px solid currentColor;        /* border follows the text color, so it inverts too */
  border-radius: 12px;
  font: inherit; font-weight: 600; font-size: 1rem;
  line-height: 1.1; text-transform: uppercase; text-decoration: none; cursor: pointer;
  padding: calc(0.667em + 2px) calc(1.333em + 2px);
  transition: background .15s ease, color .15s ease;
}
.fds-button:hover { background: var(--fds-btn-fg); color: var(--fds-btn-bg); }
/* variants — just the two colors each */
.fds-btn-goto-buddy { --fds-btn-bg: var(--wp--preset--color--cyan, 
#0b9ad3); }
/* make-buddy needs no rule at all — it uses the base primary/base defaults */
.fds-btn-remove-buddy {
  color: var(--wp--preset--color--vivid-red, 
#cf2e2e);
  background: transparent;
  border: none;
  text-align: left;
  padding: 0;
  margin-top: .75em;
  margin-left:1em;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
}
/* Tier 2 — compact inline/row action buttons (assignment rows, tables) */
.fds-buddy-btn, .fds-sidebar-btn {
  display: inline-block;
  padding: 6px 12px;
  margin: 2px 4px 2px 0;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  color: #fff;
  background: var(--wp--preset--color--primary, #255ca3);
  border: 2px solid var(--wp--preset--color--primary, #255ca3);;   /* white in solid state; becomes the brand color on hover */
  border-radius: 8px;
}
.fds-buddy-btn:hover, .fds-sidebar-btn:hover {
  color: var(--wp--preset--color--primary, #255ca3);
  background: #fff;
}

.fds-buddy-btn a, .fds-sidebar-btn a {text-decoration:none}

.fds-buddy-btn-danger { background: var(--wp--preset--color--vivid-red, #cf2e2e); border-color:var(--wp--preset--color--vivid-red, #cf2e2e);}
.fds-buddy-btn-danger:hover {
  color: var(--wp--preset--color--vivid-red, #cf2e2e);
  background: #fff;
}

.fds-button.fds-buddy-view-portal {
  font-size: .9em;
  padding: 6px 18px;
}

/* Search toggle */
/* "Include inactive families" toggle — native Formidable checkbox (field 368) */
.fds-archive-toggle .frm_primary_label{display:inline-block;margin:0 12px 0 0;font-weight:600;vertical-align:middle;}
.fds-archive-toggle .frm_opt_container{display:inline-block;vertical-align:middle;}
.fds-archive-toggle .frm_checkbox{margin:0;}
.fds-archive-toggle .frm_checkbox input[type="checkbox"]{position:absolute;opacity:0;width:0;height:0;}
.fds-archive-toggle .frm_checkbox label{position:relative;display:inline-block;width:42px;height:24px;font-size:0;cursor:pointer;vertical-align:middle;}
.fds-archive-toggle .frm_checkbox label::before{content:"";position:absolute;left:0;top:0;width:42px;height:24px;border-radius:12px;background:#cfd5dd;transition:background .15s;}
.fds-archive-toggle .frm_checkbox label::after{content:"";position:absolute;left:2px;top:2px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.3);transition:left .15s;}
.fds-archive-toggle .frm_checkbox:has(input:checked) label::before{background:var(--wp--preset--color--secondary,#61ad57);}
.fds-archive-toggle .frm_checkbox:has(input:checked) label::after{left:20px;}


/* ---- FDS inline help tips (circle-question) ------------------------- */
.fds-tip {
    position: relative;
    display: inline-block;
    margin-left: 4px;
    color: var(--wp--preset--color--secondary);          /* swap to a CAFAF brand color if you prefer */
    cursor: help;
}
.fds-tip i { font-size: 0.95em; }

.fds-tip__bubble {
    position: absolute;
    left: 50%;
    z-index: 999;
    width: max-content;
    max-width: 260px;
    padding: 8px 10px;
    background: var(--wp--preset--color--secondary);
    color: var(--wp--preset--color--base);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
    pointer-events: none;
}
.fds-tip--top    .fds-tip__bubble { bottom: 100%; margin-bottom: 8px; }
.fds-tip--bottom .fds-tip__bubble { top: 100%;    margin-top: 8px; }

.fds-tip__bubble::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
}
.fds-tip--top    .fds-tip__bubble::after { top: 100%;    border-top-color: #1d2327; }
.fds-tip--bottom .fds-tip__bubble::after { bottom: 100%; border-bottom-color: #1d2327; }

/* Reveal on hover, keyboard focus, or tap. :focus-within covers touch. */
.fds-tip:hover        .fds-tip__bubble,
.fds-tip:focus        .fds-tip__bubble,
.fds-tip:focus-within .fds-tip__bubble {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.fds-tip:focus { outline: none; }
.fds-tip:focus-visible { outline: 2px solid #2271b1; outline-offset: 2px; border-radius: 2px; }
/* ==========================================================================
   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--primary);
	border-radius:0 8px 8px 0;
	color:var(--wp--preset--color--base)
}

.wp-block-details[open] {
    border-left: solid 1px var(--wp--preset--color--primary);
    border-bottom: solid 1px var(--wp--preset--color--primary);
    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--primary);
}
.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;
}

/* ==========================================================================
   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);
}

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

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