/*
Theme Name: Tax Tips Theme
Theme URI: https://agilethemes.com/themes/tax-tips-theme/
Author: AGILE LLC
Author URI: https://agilethemes.com
Description: A calm, chat-style front page for ask-an-expert and Q&A answer sites, with any chat shortcode or a built-in FAQ layout.
Version: 2.1.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tax-tips-theme
Tags: blog, one-column, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, threaded-comments, translation-ready, block-patterns, wide-blocks

Tax Tips Theme is distributed under the terms of the GNU GPL v2 or later.
*/

/* ==========================================================================
   Tokens. The look is the original Tax.Tips one: white page, near-black
   text, soft grey message bubbles with 12px corners, system fonts.
   ========================================================================== */

:root {
	--ttt-bg: #fff;
	--ttt-text: #111;
	--ttt-muted: #555;
	--ttt-surface: #f7f7f7;
	--ttt-border: #e2e2e2;
	--ttt-border-strong: #767676;
	--ttt-button-bg: #111;
	--ttt-button-text: #fff;
	--ttt-radius: 12px;
	--ttt-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--ttt-content: 720px;
	--ttt-wide: 960px;
	--ttt-gutter: 1rem;
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--ttt-bg);
	color: var(--ttt-text);
	font-family: var(--ttt-font);
	font-size: 1.0625rem;
	line-height: 1.65;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	line-height: 1.25;
	margin: 1.6em 0 0.5em;
}

h1 {
	font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.4rem);
	margin-top: 0;
}

h2 {
	font-size: 1.5rem;
}

h3 {
	font-size: 1.2rem;
}

p,
ul,
ol,
dl,
blockquote,
figure,
pre,
table {
	margin: 0 0 1.2em;
}

a {
	color: var(--ttt-text);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover {
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 2px solid var(--ttt-text);
	outline-offset: 2px;
}

img,
video,
iframe {
	max-width: 100%;
	height: auto;
}

blockquote {
	border-left: 4px solid var(--ttt-text);
	margin-left: 0;
	padding-left: 1rem;
}

code,
pre {
	background: var(--ttt-surface);
	border-radius: 6px;
	font-size: 0.9em;
}

pre {
	overflow-x: auto;
	padding: 1rem;
}

table {
	border-collapse: collapse;
	width: 100%;
}

th,
td {
	border-bottom: 1px solid var(--ttt-border);
	padding: 0.5rem;
	text-align: left;
}

hr {
	border: 0;
	border-top: 1px solid var(--ttt-border);
	margin: 2rem 0;
}

/* ==========================================================================
   Accessibility helpers
   ========================================================================== */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--ttt-bg);
	border-radius: 6px;
	box-shadow: 0 0 0 2px var(--ttt-text);
	clip: auto !important;
	clip-path: none;
	color: var(--ttt-text);
	display: block;
	font-size: 1rem;
	font-weight: 600;
	height: auto;
	left: 0.5rem;
	padding: 0.75rem 1rem;
	text-decoration: none;
	top: 0.5rem;
	width: auto;
	z-index: 100000;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.wrap {
	margin: 0 auto;
	max-width: var(--ttt-wide);
	padding: 0 var(--ttt-gutter);
}

.site-main {
	margin: 0 auto;
	max-width: var(--ttt-content);
	padding: 2rem var(--ttt-gutter) 3rem;
}

.alignwide {
	margin-left: auto;
	margin-right: auto;
	max-width: var(--ttt-wide);
}

.alignfull {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: 100vw;
	width: 100vw;
}

.alignleft {
	float: left;
	margin: 0 1.5rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0 0 1rem 1.5rem;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* ==========================================================================
   Header and navigation
   ========================================================================== */

.site-header {
	border-bottom: 1px solid var(--ttt-border);
}

.site-header__inner {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	justify-content: space-between;
	min-height: 4.5rem;
	padding-bottom: 0.75rem;
	padding-top: 0.75rem;
}

.site-title {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0;
}

.site-title a {
	text-decoration: none;
}

.site-description {
	color: var(--ttt-muted);
	font-size: 0.9rem;
	margin: 0;
}

.custom-logo {
	display: block;
	height: auto;
	max-height: 64px;
	width: auto;
}

.primary-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-nav > ul,
.primary-nav .menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.5rem;
}

.primary-nav li {
	position: relative;
}

.primary-nav a {
	border-radius: 8px;
	display: block;
	padding: 0.5rem 0.75rem;
	text-decoration: none;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
	background: var(--ttt-surface);
}

.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
	font-weight: 600;
}

.primary-nav .sub-menu {
	background: var(--ttt-bg);
	border: 1px solid var(--ttt-border);
	border-radius: var(--ttt-radius);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
	display: none;
	left: 0;
	min-width: 12rem;
	padding: 0.4rem;
	position: absolute;
	top: 100%;
	z-index: 20;
}

.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu {
	display: block;
}

.menu-toggle {
	display: none;
}

@media (max-width: 720px) {

	.js-nav .menu-toggle {
		background: var(--ttt-bg);
		border: 1px solid var(--ttt-border-strong);
		border-radius: 8px;
		color: var(--ttt-text);
		cursor: pointer;
		display: inline-flex;
		font: inherit;
		gap: 0.5rem;
		min-height: 44px;
		padding: 0.5rem 0.9rem;
	}

	.js-nav .menu-toggle__icon {
		border-bottom: 2px solid currentColor;
		border-top: 2px solid currentColor;
		display: inline-block;
		height: 12px;
		margin-top: 0.4em;
		position: relative;
		width: 18px;
	}

	.js-nav .menu-toggle__icon::after {
		border-top: 2px solid currentColor;
		content: "";
		left: 0;
		position: absolute;
		top: 3px;
		width: 100%;
	}

	.primary-nav {
		width: 100%;
	}

	.site-header__inner .primary-nav.js-nav {
		width: auto;
	}

	.js-nav > ul,
	.js-nav .menu {
		display: none;
	}

	.js-nav.is-open {
		width: 100%;
	}

	.js-nav.is-open > ul,
	.js-nav.is-open .menu {
		display: flex;
		flex-direction: column;
		margin-top: 0.75rem;
	}

	.primary-nav .sub-menu {
		border: 0;
		box-shadow: none;
		display: block;
		padding: 0 0 0 1rem;
		position: static;
	}
}

/* ==========================================================================
   Front page: hero, chat and answers
   ========================================================================== */

.hero {
	align-items: center;
	display: grid;
	gap: 1.5rem;
	grid-template-columns: 1fr;
	margin-bottom: 2rem;
}

.hero__art {
	display: none;
}

@media (min-width: 640px) {

	.hero {
		grid-template-columns: 1fr 160px;
	}

	.hero__art {
		display: block;
		height: auto;
		width: 160px;
	}
}

.hero__intro {
	color: var(--ttt-muted);
	font-size: 1.15rem;
	margin: 0;
}

.chat-panel,
.ai-chat-container {
	background-color: var(--ttt-bg);
	color: var(--ttt-text);
	font-family: var(--ttt-font);
}

.chat-panel {
	border: 1px solid var(--ttt-border);
	border-radius: var(--ttt-radius);
	margin-bottom: 2rem;
	padding: 1rem;
}

.notice-box,
.disclaimer {
	background: var(--ttt-surface);
	border-radius: var(--ttt-radius);
	color: var(--ttt-text);
	font-size: 0.95rem;
	margin: 0 0 2rem;
	padding: 0.9rem 1rem;
}

.disclaimer p {
	margin: 0;
}

.notice-box {
	border-left: 4px solid var(--ttt-text);
}

.ask-search {
	margin-bottom: 2rem;
}

.answers__header {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	justify-content: space-between;
}

.answers__header h2 {
	margin-top: 0;
}

.answer-list {
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
}

.answer-list > li + li {
	margin-top: 0.6rem;
}

/* Questions look like the original chat bubbles. */
.answer {
	background: var(--ttt-surface);
	border-radius: var(--ttt-radius);
}

.answer > summary {
	cursor: pointer;
	font-weight: 600;
	list-style: none;
	padding: 0.9rem 2.75rem 0.9rem 1rem;
	position: relative;
}

.answer > summary::-webkit-details-marker {
	display: none;
}

.answer > summary::after {
	content: "+";
	font-size: 1.4rem;
	font-weight: 400;
	line-height: 1;
	position: absolute;
	right: 1rem;
	top: 0.85rem;
}

.answer[open] > summary::after {
	content: "\2212";
}

.answer__body {
	background: var(--ttt-bg);
	border: 1px solid var(--ttt-border);
	border-radius: var(--ttt-radius);
	margin: 0 0.6rem 0.6rem;
	padding: 0.9rem 1rem;
}

.answer__body p:last-child {
	margin-bottom: 0;
}

.topic-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
}

.topic-list a {
	border: 1px solid var(--ttt-border-strong);
	border-radius: 999px;
	display: inline-block;
	font-size: 0.95rem;
	padding: 0.35rem 0.85rem;
	text-decoration: none;
}

.topic-list a:hover {
	background: var(--ttt-surface);
}

.front-content {
	margin-bottom: 2rem;
}

/* ==========================================================================
   Posts, pages and archives
   ========================================================================== */

.page-header {
	margin-bottom: 2rem;
}

.archive-description {
	color: var(--ttt-muted);
}

.entry {
	margin-bottom: 2.5rem;
}

.entry-title a {
	text-decoration: none;
}

.entry-title a:hover {
	text-decoration: underline;
}

.entry-meta,
.entry-footer {
	color: var(--ttt-muted);
	font-size: 0.9rem;
}

.entry-meta {
	margin-bottom: 1rem;
}

.entry-meta a,
.entry-footer a {
	color: var(--ttt-muted);
}

.post-card {
	background: var(--ttt-surface);
	border-radius: var(--ttt-radius);
	margin-bottom: 1rem;
	padding: 1.1rem 1.25rem;
}

.post-card .entry-title {
	font-size: 1.25rem;
	margin: 0 0 0.35rem;
}

.post-card .entry-meta {
	margin-bottom: 0.5rem;
}

.post-card p:last-child {
	margin-bottom: 0;
}

.post-thumbnail img {
	border-radius: var(--ttt-radius);
	display: block;
	margin-bottom: 1.5rem;
}

.entry-content::after {
	clear: both;
	content: "";
	display: table;
}

.entry-content > * {
	max-width: 100%;
}

.more-link {
	font-weight: 600;
}

.sample-label {
	background: var(--ttt-surface);
	border-radius: 999px;
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 600;
	padding: 0.2rem 0.75rem;
}

.post-navigation,
.posts-navigation,
.pagination,
.comment-navigation {
	margin: 2.5rem 0;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	justify-content: space-between;
}

.pagination .nav-links {
	justify-content: flex-start;
}

.page-numbers {
	border-radius: 8px;
	display: inline-block;
	min-width: 2.5rem;
	padding: 0.4rem 0.6rem;
	text-align: center;
}

.page-numbers.current {
	background: var(--ttt-button-bg);
	color: var(--ttt-button-text);
}

.post-navigation .meta-nav {
	color: var(--ttt-muted);
	display: block;
	font-size: 0.85rem;
}

.sticky .post-card,
.sticky.post-card {
	border-left: 4px solid var(--ttt-text);
}

.bypostauthor {
	display: block;
}

.wp-caption,
.wp-block-image figcaption,
.wp-caption-text,
.gallery-caption {
	color: var(--ttt-muted);
	font-size: 0.9rem;
}

/* ==========================================================================
   Blocks
   ========================================================================== */

.wp-block-details {
	background: var(--ttt-surface);
	border-radius: var(--ttt-radius);
	margin-bottom: 0.6rem;
	padding: 0.9rem 1rem;
}

.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
}

.wp-block-details > :last-child {
	margin-bottom: 0;
}

.ask-cta {
	border-radius: var(--ttt-radius);
	padding: 1.5rem;
}

.ask-cta > :first-child {
	margin-top: 0;
}

.has-ink-color {
	color: #111;
}

.has-muted-color {
	color: #555;
}

.has-bubble-color {
	color: #f7f7f7;
}

.has-white-color {
	color: #fff;
}

.has-ink-background-color {
	background-color: #111;
}

.has-muted-background-color {
	background-color: #555;
}

.has-bubble-background-color {
	background-color: #f7f7f7;
}

.has-white-background-color {
	background-color: #fff;
}

/* ==========================================================================
   Forms and buttons
   ========================================================================== */

input,
textarea,
select,
button {
	font: inherit;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
	background: var(--ttt-bg);
	border: 1px solid var(--ttt-border-strong);
	border-radius: 8px;
	color: var(--ttt-text);
	max-width: 100%;
	min-height: 44px;
	padding: 0.55rem 0.75rem;
}

textarea {
	width: 100%;
}

::placeholder {
	color: var(--ttt-muted);
	opacity: 1;
}

button,
input[type="submit"],
.button,
.wp-block-button__link {
	background: var(--ttt-button-bg);
	border: 1px solid var(--ttt-button-bg);
	border-radius: 8px;
	color: var(--ttt-button-text);
	cursor: pointer;
	display: inline-block;
	font-weight: 600;
	min-height: 44px;
	padding: 0.55rem 1.1rem;
	text-decoration: none;
}

button:hover,
input[type="submit"]:hover,
.button:hover,
.wp-block-button__link:hover {
	background: #333;
	border-color: #333;
	color: var(--ttt-button-text);
}

.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--ttt-text);
}

.search-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.4rem;
}

.search-form__row {
	display: flex;
	gap: 0.5rem;
}

.search-form__row input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
	border-top: 1px solid var(--ttt-border);
	margin-top: 3rem;
	padding-top: 1rem;
}

.comment-list,
.comment-list .children {
	list-style: none;
	padding: 0;
}

.comment-list .children {
	margin-left: 1.5rem;
}

.comment-body {
	background: var(--ttt-surface);
	border-radius: var(--ttt-radius);
	margin-bottom: 1rem;
	padding: 1rem;
}

.comment-meta {
	font-size: 0.9rem;
	margin-bottom: 0.5rem;
}

.comment-author .avatar {
	border-radius: 50%;
	float: left;
	margin-right: 0.75rem;
}

.comment-metadata a,
.comment-metadata {
	color: var(--ttt-muted);
}

.comment-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
	width: 100%;
}

.comment-form-cookies-consent label {
	display: inline;
	font-weight: 400;
}

.required {
	color: var(--ttt-text);
}

/* ==========================================================================
   Footer and widgets
   ========================================================================== */

.site-footer {
	border-top: 1px solid var(--ttt-border);
	color: var(--ttt-text);
	font-size: 0.95rem;
	padding: 2rem 0;
}

.footer-widgets {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	margin-bottom: 1.5rem;
}

.widget-title,
.widget h2 {
	font-size: 1rem;
	margin: 0 0 0.5rem;
}

.widget ul {
	padding-left: 1.1rem;
}

.footer-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

.site-footer .disclaimer {
	margin-bottom: 1rem;
}

.site-info {
	color: var(--ttt-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	margin: 0;
}

/* ==========================================================================
   Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}

@media print {

	.site-header,
	.site-footer .footer-nav,
	.comments-area,
	.post-navigation {
		display: none;
	}
}
