/*
Theme Name: Before Your Claim
Theme URI: https://beforeyourclaim.com/
Description: Child theme of GeneratePress for Before Your Claim. Matches the Before Your Claim app: navy, green and gold, the app's system font, white cards on a warm off-white page, an amber line under the header, and the approved footer line on every page. No outside fonts or scripts.
Author: Absolute Adjusting
Author URI: https://www.absoluteadjusting.com/
Template: generatepress
Version: 0.1.3
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: before-your-claim
*/

/* ==== Colours: the app's palette (Claude_Track styles.css and the slice 5 colour roles) ====
   Green, filled  = the main step.            Gold, filled = an optional side path.
   Grey outline   = secondary actions.        Navy         = text, menus and links.  */
html:root {
	--contrast: #273847;      /* body text */
	--contrast-2: #5A6874;    /* secondary text */
	--contrast-3: #D8DFE5;    /* lines and borders */
	--base: #E0E6EA;
	--base-2: #F7F6F2;        /* page background */
	--base-3: #FFFFFF;        /* header and cards */
	--accent: #172A3A;        /* links: navy and underlined, as in the app */
	--byc-navy: #172A3A;
	--byc-navy-deep: #10202E;
	--byc-green: #087B2C;
	--byc-green-dark: #056322;
	--byc-gold: #F2C230;
	--byc-gold-border: #B88A00;
	--byc-gold-hover: #E5B41F;
	--byc-amber: #C98A22;
	--byc-amber-soft: #FFF3DE;
	--byc-focus: #296FB4;
	--byc-shadow: 0 10px 30px rgba(18, 40, 58, .055);
}

/* ==== Type: the app's system font; Georgia for page titles, as the app's large titles ==== */
body,
button,
input,
select,
textarea {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body {
	background: var(--base-2);
	color: var(--contrast);
	line-height: 1.6;
}
h1, h2, h3, h4, h5, h6 {
	color: var(--byc-navy);
	line-height: 1.25;
}
h1,
.entry-title,
.page-title {
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 400;
}
.entry-content h2 { margin-top: 1.6em; }
.byc-lead {
	font-size: 1.2em;
	color: var(--contrast-2);
	font-style: italic;
}

/* ==== Links and keyboard focus ==== */
a {
	color: var(--accent);
	text-underline-offset: 3px;
}
.entry-content a:not(.wp-block-button__link) {
	font-weight: 650;
	text-decoration: underline;
}
a:hover,
a:focus { color: var(--byc-green); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.wp-block-button__link:focus-visible,
.menu-toggle:focus-visible {
	outline: 3px solid var(--byc-focus);
	outline-offset: 3px;
}

/* ==== Header: white, amber line beneath, as in the app ==== */
.site-header {
	background: var(--base-3);
	border-bottom: 3px solid var(--byc-amber);
}
.site-header .header-image,
.site-header .is-logo-image {
	width: 290px;
	max-width: 100%;
	height: auto;
}
.main-navigation,
.main-navigation ul ul { background: var(--base-3); }
.main-navigation .main-nav ul li a,
.menu-toggle,
.main-navigation .menu-bar-items {
	color: var(--byc-navy);
	font-weight: 650;
}
.main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a,
.main-navigation .main-nav ul li:not([class*="current-menu-"]):focus > a {
	color: var(--byc-green);
	background: transparent;
}
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
	color: var(--byc-navy);
	background: transparent;
	box-shadow: inset 0 -3px 0 var(--byc-amber);
}

/* ==== Content on white cards, like the app's panels ==== */
.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.separate-containers .paging-navigation,
.one-container .site-content,
.inside-page-header {
	background: var(--base-3);
	border: 1px solid #E0E6EA;
	border-radius: 11px;
	box-shadow: var(--byc-shadow);
}
.post-image img,
.featured-image img,
.wp-block-image img { border-radius: 9px; }

/* ==== Buttons: green main step, gold side path, grey outline secondary ==== */
.wp-block-button__link,
.wp-element-button,
.button,
input[type="submit"] {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 20px;
	border: 2px solid var(--byc-green);
	border-radius: 6px;
	background: var(--byc-green);
	color: #FFFFFF;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}
.wp-block-button__link:hover,
.wp-block-button__link:focus,
.button:hover,
input[type="submit"]:hover {
	background: var(--byc-green-dark);
	border-color: var(--byc-green-dark);
	color: #FFFFFF;
}
.wp-block-button.is-style-byc-gold .wp-block-button__link {
	background: var(--byc-gold);
	border-color: var(--byc-gold-border);
	color: var(--byc-navy);
}
.wp-block-button.is-style-byc-gold .wp-block-button__link:hover,
.wp-block-button.is-style-byc-gold .wp-block-button__link:focus {
	background: var(--byc-gold-hover);
	border-color: var(--byc-gold-border);
	color: var(--byc-navy);
}
.wp-block-button.is-style-outline .wp-block-button__link {
	background: #FFFFFF;
	border-color: #8A97A3;
	color: var(--byc-navy);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus {
	background: #F3F7FA;
	color: var(--byc-navy);
}

/* ==== Notice box (amber, as the app's notices) and cards ==== */
.wp-block-group.is-style-byc-notice {
	background: var(--byc-amber-soft);
	border-left: 4px solid var(--byc-amber);
	border-radius: 9px;
	padding: 14px 18px;
	color: #4A3410;
}
.wp-block-group.is-style-byc-notice > :last-child { margin-bottom: 0; }
/* Cards side by side line up at equal height without spilling out of their columns. */
.wp-block-column:has(> .wp-block-group.is-style-byc-card:only-child) {
	display: flex;
	flex-direction: column;
}
.wp-block-column > .wp-block-group.is-style-byc-card:only-child { flex: 1; }
.wp-block-group.is-style-byc-card {
	box-sizing: border-box;
	background: #FFFFFF;
	border: 1px solid #E0E6EA;
	border-radius: 11px;
	padding: 20px;
	box-shadow: var(--byc-shadow);
}
.wp-block-group.is-style-byc-card > :last-child { margin-bottom: 0; }
.byc-step-number {
	margin-bottom: .25em;
	color: var(--byc-amber);
	font-size: .85em;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.byc-further-reading {
	margin-top: 2em;
	padding-top: 12px;
	border-top: 1px solid var(--contrast-3);
	color: var(--contrast-2);
	font-size: .95em;
}

/* ==== Footer: navy bar with the approved line and the footer links ==== */
.site-info,
.site-info .copyright-bar {
	background: var(--byc-navy);
	color: #FFFFFF;
}
.site-info a,
.site-info a:hover,
.site-info a:focus { color: #FFFFFF; }
.byc-footer-line { margin: 0 0 10px; }
.byc-footer-links ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.byc-footer-links a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ==== Home page sections written as HTML (0.1.1) ====
   The published Home page uses these classes: two links at the top (byc-hero), three cards (byc-cards),
   and a status line (byc-app-status). Before 0.1.1 they had no styles, so the two links ran together. */
.byc-hero {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 1.2em 0 1.8em;
}
.entry-content .byc-hero a {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 20px;
	border: 2px solid var(--byc-green);
	border-radius: 6px;
	background: var(--byc-green);
	color: #FFFFFF;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}
.entry-content .byc-hero a:hover,
.entry-content .byc-hero a:focus {
	background: var(--byc-green-dark);
	border-color: var(--byc-green-dark);
	color: #FFFFFF;
}
.entry-content .byc-hero a.byc-secondary-link {
	background: var(--byc-gold);
	border-color: var(--byc-gold-border);
	color: var(--byc-navy);
}
.entry-content .byc-hero a.byc-secondary-link:hover,
.entry-content .byc-hero a.byc-secondary-link:focus {
	background: var(--byc-gold-hover);
	color: var(--byc-navy);
}
.byc-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin: 1em 0 1.8em;
}
.byc-card {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	background: #FFFFFF;
	border: 1px solid #E0E6EA;
	border-radius: 11px;
	padding: 20px;
	box-shadow: var(--byc-shadow);
}
.byc-card h3 { margin-top: 0; font-size: 1.15em; }
.byc-card > :last-child { margin-top: auto; margin-bottom: 0; }
.byc-app-status {
	background: var(--byc-amber-soft);
	border-left: 4px solid var(--byc-amber);
	border-radius: 9px;
	padding: 14px 18px;
	color: #4A3410;
}

/* ==== Ask a Claims Adjuster page (0.1.2) ====
   A gold button opens the tool in place (assets/byc-ask.js); nothing loads before that. */
.byc-ask-embed {
	margin: 1.4em 0;
}
button.byc-ask-open {
	box-sizing: border-box;
	min-height: 48px;
	padding: 12px 20px;
	border: 2px solid var(--byc-gold-border);
	border-radius: 6px;
	background: var(--byc-gold);
	color: var(--byc-navy);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	cursor: pointer;
}
button.byc-ask-open:hover,
button.byc-ask-open:focus {
	background: var(--byc-gold-hover);
}
.byc-ask-frame {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 750px;
	border: 1px solid #E0E6EA;
	border-radius: 11px;
	background: #FFFFFF;
}

/* ==== Header on phones and tablets (0.1.1) ====
   GeneratePress keeps the logo and the tagline on one line that may not shrink, so on a phone the page
   scrolled sideways. Here the tagline moves under the logo instead. */
@media (max-width: 768px) {
	.site-branding-container {
		flex-shrink: 1;
		flex-wrap: wrap;
		min-width: 0;
	}
	.site-branding-container .site-logo { margin-right: 0; }
	.site-branding-container .site-branding { flex-basis: 100%; }
	.site-description { font-size: 14px; line-height: 1.4; }
}

/* ==== Tables (0.1.3) ====
   On phones and tablets a wide table scrolls sideways inside its own box, instead of making the whole page scroll
   (the Cookie Notice's cookie table was 493 px wide on a 390 px phone). Tables made with the Table block already sit
   in a scrolling box; this also covers tables pasted as HTML or in a Classic block. */
@media (max-width: 768px) {
	.entry-content table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
	}
}

/* ==== Phones ==== */
@media (max-width: 650px) {
	.entry-content .byc-hero a { width: 100%; }
	button.byc-ask-open { width: 100%; }
	.byc-ask-frame { height: 640px; }
	.site-header .header-image,
	.site-header .is-logo-image { width: 220px; }
	.wp-block-buttons > .wp-block-button { width: 100%; }
	.wp-block-buttons > .wp-block-button .wp-block-button__link { width: 100%; }
}
