/*
 * Layout rules that belong to the joi template itself, kept out of style.css so
 * that file stays a faithful copy of the japonin2024 original.
 */

/*
 * The shared header's navbar is .fixed-top, so it is out of the document flow.
 * The home layout's hero and the course layout's .banner-offset each reserve the
 * 90px themselves; every other layout previously started at y=0 and rendered its
 * first heading underneath the header.
 */
body.joi:not(.joi-home):not(.joi-course) {
	padding-top: 90px;
}

/*
 * Article bodies on non-home layouts. japonin2024 had no article layout of its own
 * (those pages were Warp templates capped at 980px), so without this the text runs
 * the full width of the .container.
 */
.joi-content > .com-content-article,
.joi-content > .com-content-category-blog,
.joi-article > .com-content-article {
	max-width: 980px;
	margin-left: auto;
	margin-right: auto;
}

/*
 * The j51_carmen landing pages are the exception: they are full-width marketing
 * layouts (pricing grids, banner sections) that ran at 1100-1180px, so the
 * article cap above squeezes their card rows.
 */
body.j51-page .joi-content > .com-content-article {
	max-width: none;
}

/*
 * The Warp and j51_carmen templates both set a global img { max-width: 100% }.
 * Bootstrap 4 only does this for .img-fluid, so migrated article images that are
 * wider than the column (the 1900px campaign banner on top-page-price) push out a
 * horizontal scrollbar. Scoped away from the home layout, whose hero art is
 * deliberately full-bleed.
 */
.joi-content img,
.joi-article img {
	max-width: 100%;
	height: auto;
}

.joi-main {
	padding-bottom: 3rem;
}

.joi-main > .container > .row > .joi-content {
	padding-top: 1.5rem;
}

/*
 * Bootstrap's .visually-hidden did not survive the purge that produced
 * bootstrap_purged.css, because it appears only in Joomla's own markup and never
 * in japonin2024's. Core uses it to hide labels from sight but not from screen
 * readers, so without it those labels render as stray visible text -- the
 * "Details" term above every blog post date being the case that showed up.
 */
.visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/*
 * Article author chip (image-3 style): avatar + name + date row
 * shown on teacher-blog article pages instead of the plain article-info dl.
 */
.joi-content .joi-author-chip {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 1.5rem;
}

.joi-content .joi-author-chip__avatar {
	flex: 0 0 auto;
}

/* Reuse the existing joi-tavatar styles; just ensure the img is round */
.joi-content .joi-author-chip .joi-tavatar-img,
.joi-content .joi-author-chip .joi-tcard-noimg {
	border-radius: 50%;
	object-fit: cover;
	width: 48px;
	height: 48px;
	display: block;
}

/* Hide the name inside the avatar span — we render it separately */
.joi-content .joi-author-chip .joi-tavatar-name {
	display: none;
}

.joi-content .joi-author-chip__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.joi-content .joi-author-chip__name {
	font-size: 14px;
	font-weight: 600;
	color: #222;
	line-height: 1.3;
}

.joi-content .joi-author-chip__date {
	font-size: 12px;
	color: #888;
	line-height: 1.3;
}

/*
 * Blog listings and posts (/teachers-blog, /meet-wa).
 * These were EasyBlog and ZOO pages on J3, each component styling its own post
 * meta; core com_content emits a bare <dl class="article-info"> that nothing in
 * japonin2024 ever styled. Left alone the browser's default definition-list
 * indent pushes the date 40px in from the title, which is the misalignment.
 * The type matches EasyBlog's .blog-text-date (12px, uppercase, 1px tracking).
 */
.joi-content .article-info {
	margin: 0 0 0.85rem;
	font-size: 12px;
	line-height: 18px;
	letter-spacing: 0.04em;
	color: #6c757d;
}

.joi-content .article-info dt,
.joi-content .article-info dd {
	display: inline;
	margin: 0;
	font-weight: 400;
}

/* Separate consecutive meta items, which are all inline in the one <dl>. */
.joi-content .article-info dd + dd::before {
	content: "\00b7";
	margin: 0 0.5em;
}

/* Teacher avatar is a block-sized chip; keep it off the date middot and the
 * following hero/hr so the 48px photo cannot sit on the rule. */
.joi-content .article-info:has(.article-teacher) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 18px;
	margin: 0 0 1.25rem;
	line-height: 1.3;
}

.joi-content .article-info dd.article-teacher {
	display: inline-flex;
	align-items: center;
}

.joi-content .article-info dd + dd.article-teacher::before {
	content: none;
	margin: 0;
}

/*
 * Meet Wa listing header. Left-aligned display title plus a muted kicker, then
 * the category description — the same rhythm as a typical blog index (large
 * "Blog", intro copy, then the card grid). Scoped to .joi-blog-gallery-page so
 * /teachers-blog keeps the 980px stacked layout.
 */
.joi-main:has(.joi-blog-gallery-page) > .container > .row > .joi-content {
	padding-top: 0.35rem;
}

.joi-content > .com-content-category-blog.joi-blog-gallery-page {
	max-width: none;
	padding: 0.5rem 0 3rem;
}

@media (min-width: 1200px) {
	.joi-main:has(.joi-blog-gallery-page) > .container {
		max-width: 1420px;
		padding-left: 16px;
		padding-right: 16px;
	}

	.joi-content > .com-content-category-blog.joi-blog-gallery-page {
		padding: 0.75rem 0 3.5rem;
	}
}

.joi-content .joi-blog-gallery-page > .page-header {
	margin: 0 0 0.35rem;
}

.joi-content .joi-blog-gallery-title {
	margin: 0;
	text-align: left;
	font-family: inherit;
	font-size: clamp(2.4rem, 4.2vw, 3.35rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.03em;
	color: #2d1650;
}

.joi-content .joi-blog-gallery-kicker {
	margin: 0.4rem 0 0;
	font-size: 1.05rem;
	font-weight: 500;
	line-height: 1.4;
	color: #6b6578;
}

.joi-content .joi-blog-gallery-page .category-desc {
	max-width: 52rem;
	margin: 0.65rem 0 0;
	font-size: 1.05rem;
	line-height: 1.65;
	color: #6b6578;
}

.joi-content .joi-blog-gallery-page .category-desc p {
	margin: 0;
}

.joi-content .joi-blog-gallery-rule {
	border: 0;
	border-top: 1px solid #e2e2e8;
	margin: 1.5rem 0 2rem;
}

/*
 * Listing cards. Teachers-blog used EasyBlog's vintage theme on J3: a bordered
 * card per post, centred date+title, teaser, Continue reading. Cassiopeia (the
 * Joomla 6 default) paints the same idea as .boxed .blog-item; the rules below
 * follow that structure against the vintage palette so the two listings stay
 * on the unified joi chrome.
 */
.joi-content .com-content-category-blog .blog-items {
	display: flex;
	flex-direction: column;
	gap: 28px;
	margin-bottom: 1em;
}

.joi-content .com-content-category-blog .blog-item {
	border: 1px solid #dcdcdc;
	border-radius: 6px;
	background: #fff;
	padding: 24px 24px 28px;
	min-height: 0;
	overflow: hidden;
}

.joi-content .com-content-category-blog .blog-item .item-content {
	padding-top: 4px;
}

.joi-content .com-content-category-blog .blog-item .blog-cover {
	margin: -24px -24px 0;
}

.joi-content .com-content-category-blog .blog-item .blog-cover img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 280px;
	object-fit: cover;
}

.joi-content .com-content-category-blog .blog-item .blog-header {
	margin: 16px 0 20px;
	text-align: center;
}

.joi-content .com-content-category-blog .blog-item .article-info {
	margin: 0 0 10px;
	text-align: center;
}

.joi-content .com-content-category-blog .item-content .page-header {
	margin: 10px auto 0;
}

.joi-content .com-content-category-blog .item-content .page-header h2 {
	margin: 0;
	font-size: 24px;
	line-height: 1.2;
	font-weight: 700;
	font-family: Georgia, "Times New Roman", serif;
}

.joi-content .com-content-category-blog .item-content .page-header h2 a {
	color: #333;
	text-decoration: none;
}

.joi-content .com-content-category-blog .item-content .page-header h2 a:hover,
.joi-content .com-content-category-blog .item-content .page-header h2 a:focus {
	color: #f31065;
}

.joi-content .com-content-category-blog .blog-horizonline {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: 100%;
	margin: 18px auto 0;
	text-align: center;
}

.joi-content .com-content-category-blog .blog-horizonline::before,
.joi-content .com-content-category-blog .blog-horizonline::after {
	content: "";
	flex: 1 1 32px;
	border-top: 1px solid #e1e1e1;
}

.joi-content .com-content-category-blog .blog-horizonline-inner {
	display: inline-flex;
	align-items: center;
	padding: 0 6px;
	background: #fff;
	flex: 0 0 auto;
}

.joi-content .com-content-category-blog .blog-author {
	font-size: 14px;
	letter-spacing: 0;
	text-transform: none;
	color: #555;
	line-height: 1.3;
}

.joi-content .com-content-category-blog .blog-author:not(.joi-blog-byline) {
	font-size: 12px;
	letter-spacing: 0.04em;
}

.joi-content .com-content-category-blog .blog-item .blog-text {
	text-align: left;
}

/*
 * YouTube embeds store style="max-width:100%;height:auto" on the iframe.
 * height:auto has no intrinsic ratio, so the frame stays ~150–225px tall while
 * width stretches — the vertically squashed player on listing covers and in
 * the article body. aspect-ratio restores 16:9; !important beats the inline
 * height. .video-container (listing cover wrap) fills the same way so the
 * absolute iframe is not height:100% of a 0-height padding box.
 */
.joi-content iframe[src*="youtube.com"],
.joi-content iframe[src*="youtube-nocookie.com"],
.joi-content iframe[src*="youtu.be"] {
	display: block;
	width: 100% !important;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	height: auto !important;
	border: 0;
	margin-left: auto;
	margin-right: auto;
}

.joi-content .video-container {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	overflow: hidden;
	background: #000;
}

.joi-content .video-container iframe,
.joi-content .video-container object,
.joi-content .video-container embed {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	aspect-ratio: auto;
	border: 0;
}

.joi-content .com-content-article__body .video-container {
	margin: 1rem 0 1.5rem;
}

.joi-content .com-content-category-blog .blog-item > .video-container {
	margin: -24px -24px 0;
}

.joi-content .com-content-category-blog .joi-blog-gallery .blog-item > .video-container {
	margin: 0;
	border-radius: 16px 16px 0 0;
}

.joi-content .com-content-category-blog .blog-readmore {
	margin: 18px 0 0;
	text-align: center;
}

.joi-content .com-content-category-blog .blog-readmore a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 8px 20px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	color: #fff;
	text-decoration: none;
	border: none;
	border-radius: 50px;
	background: #f31065;
	letter-spacing: 0.02em;
	transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.joi-content .com-content-category-blog .blog-readmore a:hover,
.joi-content .com-content-category-blog .blog-readmore a:focus {
	background: #c90050;
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(243, 16, 101, 0.3);
	outline: none;
}

.joi-content .com-content-category-blog .blog-readmore a span::after {
	content: " →";
	font-style: normal;
}

.joi-content .com-content-category-blog__counter {
	display: none;
}

/*
 * Meet Wa gallery (/meet-wa). The menu item sets com_content's blog_class param
 * to joi-blog-gallery, so every rule below is confined to that one listing and
 * /teachers-blog keeps the stacked EasyBlog cards above. Cards are cover + title
 * only; blog_item.php stops there rather than hiding the rest with CSS.
 */
.joi-content .com-content-category-blog .blog-items.joi-blog-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 36px 28px;
}

@media (max-width: 991px) {
	.joi-content .com-content-category-blog .blog-items.joi-blog-gallery {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 575px) {
	.joi-content .com-content-category-blog .blog-items.joi-blog-gallery {
		grid-template-columns: 1fr;
	}
}

/* The stacked card above pads its own box and pulls the cover out with negative
   margins. Gallery cards let the cover sit flush to the border instead. */
.joi-content .com-content-category-blog .joi-blog-gallery .blog-item {
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 6px 22px rgba(35, 20, 60, 0.08);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.joi-content .com-content-category-blog .joi-blog-gallery .blog-item:hover,
.joi-content .com-content-category-blog .joi-blog-gallery .blog-item:focus-within {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(35, 20, 60, 0.12);
}

.joi-content .com-content-category-blog .joi-blog-gallery .blog-cover {
	margin: 0;
}

.joi-content .com-content-category-blog .joi-blog-gallery .blog-cover a {
	display: block;
}

.joi-content .com-content-category-blog .joi-blog-gallery .blog-cover img,
.joi-content .com-content-category-blog .joi-blog-gallery .blog-cover-empty {
	display: block;
	width: 100%;
	height: auto;
	max-height: none;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 16px 16px 0 0;
}

/* Posts with no image of their own still need a cover-shaped block. */
.joi-content .com-content-category-blog .joi-blog-gallery .blog-cover-empty {
	background: linear-gradient(135deg, #fdf0f5 0%, #f3f4f6 100%);
}

/* The whole title pad is the article link, not just the heading text. */
.joi-content .com-content-category-blog .joi-blog-gallery a.item-content {
	flex: 1 1 auto;
	display: flex;
	align-items: flex-start;
	padding: 22px 24px 26px;
	color: #2d1650;
	text-decoration: none;
}

.joi-content .com-content-category-blog .joi-blog-gallery a.item-content:link,
.joi-content .com-content-category-blog .joi-blog-gallery a.item-content:visited {
	color: #2d1650;
	text-decoration: none;
}

.joi-content .com-content-category-blog .joi-blog-gallery a.item-content:hover,
.joi-content .com-content-category-blog .joi-blog-gallery a.item-content:focus {
	color: inherit;
	text-decoration: none;
	outline: none;
}

.joi-content .com-content-category-blog .joi-blog-gallery .item-content .page-header {
	margin: 0;
}

.joi-content .com-content-category-blog .joi-blog-gallery .item-content .page-header h2 {
	font-family: inherit;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.4;
	text-align: left;
	color: #2d1650;
}

/*
 * Pagination. joi loads bootstrap_purged.css (japonin2024's Bootstrap 4 purge),
 * which never contained .pagination / .page-item / .page-link, so Joomla 6's
 * <ul class="pagination"> rendered as a plain vertical list. Rules below are
 * Cassiopeia's pagination block with the vintage EasyBlog spacing (top rule,
 * 5px gutters) and the site's #f31065 hover.
 */
.pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	list-style: none;
	padding: 20px 0 0;
	margin: 32px 0 0;
	border-top: 1px solid #e8e8e8;
}

.pagination .page-item {
	list-style: none;
}

.page-link {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0 0.75rem;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	color: #444;
	background-color: #f5f5f5;
	border: none;
	border-radius: 50px;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.page-link:hover,
.page-link:focus {
	z-index: 2;
	color: #fff;
	background-color: #f31065;
	outline: 0;
	transform: translateY(-1px);
}

.page-link.active,
.active > .page-link {
	z-index: 3;
	color: #fff;
	background-color: #333;
	font-weight: 700;
}

.page-link.disabled,
.disabled > .page-link {
	color: #bbb;
	pointer-events: none;
	background-color: #f9f9f9;
}

/*
 * Breadcrumbs. Same purge gap as pagination: bootstrap_purged.css never kept
 * .breadcrumb / .breadcrumb-item, so mod_breadcrumbs' <ol class="breadcrumb">
 * rendered as a vertical numbered list on every non-course page (notably the
 * Japanese pages that still assign BreadcrumsJ). Styled like /courses/grammar/*:
 * bxs-home on the home crumb, muted links, slash dividers, no "現在地:" prefix.
 */
.joi-topa .mod-breadcrumbs__wrapper {
	margin: 0.5rem 0 0;
}

.joi-topa .mod-breadcrumbs.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0;
	list-style: none;
	padding: 0.35rem 0;
	margin: 0;
	background: none;
	border-radius: 0;
	font-size: 14px;
	font-weight: 500;
	color: #909090;
}

.joi-topa .mod-breadcrumbs .breadcrumb-item {
	float: none;
	list-style: none;
	padding: 0;
}

.joi-topa .mod-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
	display: inline-block;
	padding: 0 0.45rem;
	color: #b0b0b0;
	content: "/";
}

.joi-topa .mod-breadcrumbs .breadcrumb-item a,
.joi-topa .mod-breadcrumbs .breadcrumb-item a:visited {
	color: #909090;
	text-decoration: none;
}

.joi-topa .mod-breadcrumbs .breadcrumb-item a:hover,
.joi-topa .mod-breadcrumbs .breadcrumb-item a:focus {
	color: #333;
	text-decoration: underline;
}

.joi-topa .mod-breadcrumbs .breadcrumb-item.active {
	color: #7952B3;
}

.joi-topa .mod-breadcrumbs .breadcrumb-item .bx.bxs-home {
	vertical-align: -1px;
	font-size: 1.05em;
}

/*
 * Article-body classes used by teachers-blog posts. They lived in the Warp
 * template's custom.css and were never copied into joi, so titles, teacher
 * portraits, vocabulary highlights and the section spacing collapsed to
 * unstyled paragraphs. Scoped to the content column so they cannot leak.
 */
.joi-content .blog-title {
	font-size: 24px;
	line-height: 1.3;
	color: #00517a;
	text-align: center;
}

.joi-content img.blog-teacher {
	display: block;
	margin: 0 auto;
	max-width: 130px;
	height: auto;
}

.joi-content .teacher-name19 {
	font-size: 19px;
	line-height: 1.3;
	text-align: center;
}

/* In-body "By Teacher" bylines are stripped in PHP; hide any leftover. */
.joi-content .com-content-article__body .teacher-name19 {
	display: none;
}

.joi-content .no-color-19 {
	font-size: 19px;
	line-height: 1.7;
}

.joi-content .no-color-16 {
	font-size: 16px;
	line-height: 1.7;
}

.joi-content .vocab {
	color: #0000ff;
}

.joi-content .div-both-60 {
	margin-top: 30px;
	margin-bottom: 60px;
}

.joi-content .div-both-30 {
	margin-top: 30px;
	margin-bottom: 30px;
}

.joi-content .div-top30 {
	margin-top: 30px;
}

.joi-content .div-bottom30 {
	margin-bottom: 30px;
}

.joi-content .center {
	text-align: center;
}

.joi-content ruby rt {
	font-size: 0.55em;
	color: #555;
}

.joi-content iframe {
	max-width: 100%;
}

/*
 * Terms of Use revision history. The live /terms-of-use page (and each dated
 * snapshot under it) lists every revision with a one-line summary and a link
 * to the full text as it stood on that date.
 */
.tos-archive-banner {
	margin: 0 0 1.75rem;
	padding: 1rem 1.25rem;
	background: #fff8e6;
	border: 1px solid #e6d9a8;
}

.tos-archive-banner p {
	margin: 0 0 0.4rem;
}

.tos-archive-banner p:last-child {
	margin-bottom: 0;
}

.tos-history {
	margin: 2.5rem 0 1rem;
	padding: 1.25rem 1.5rem;
	border: 1px solid #d0d7de;
	border-left: 4px solid #333399;
	background: #f7f8fb;
}

.tos-history h2 {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
}

.tos-history-list {
	list-style: none;
	padding: 0;
	margin: 0.75rem 0 0;
}

.tos-history-item {
	padding: 0.7rem 0;
	border-top: 1px solid #e4e7ec;
}

.tos-history-item.is-current {
	background: #eef0f8;
	margin: 0 -0.75rem;
	padding-left: 0.75rem;
	padding-right: 0.75rem;
}

.tos-history-date {
	font-weight: 600;
}

.tos-history-state {
	margin-left: 0.4rem;
	font-size: 0.85em;
	color: #333399;
	font-weight: 600;
}

.tos-history-summary {
	display: block;
	margin-top: 0.25rem;
	color: #444;
	font-size: 0.95em;
	line-height: 1.45;
}

.tos-history-earlier {
	margin: 1rem 0 0;
	font-size: 0.9em;
	color: #555;
	line-height: 1.5;
}

/* ── Contact Support (com_contact override) ──────────────────────────────── */

/* Page title — same width/centering as the form card below */
.joi-contact-support__title {
	font-size: 2rem;
	font-weight: 700;
	color: #111;
	max-width: 680px;
	margin: 0 auto 1.5rem;
}

/* Form card */
.joi-contact-form {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 2rem;
	box-shadow: 0 4px 28px rgba(0, 0, 0, 0.07);
	max-width: 680px;
	margin: 0 auto;
}

/* Field grid — name + email side by side on wide screens */
.joi-contact-form__fieldset {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 1.25rem;
	border: none;
	margin: 0;
	padding: 0;
}

.joi-contact-form__field {
	grid-column: span 2;
	margin-bottom: 1.25rem;
}

/* Name and Email: half-width */
.joi-contact-form__field:has(#jform_contact_name),
.joi-contact-form__field:has(#jform_contact_email) {
	grid-column: span 1;
}

/* Hide the spacer field (Joomla's duplicate "* Required field" notice) */
.joi-contact-form__field:has(.field-spacer) {
	display: none;
	margin: 0;
}
/* Fallback for browsers without :has() */
.joi-contact-form__field .field-spacer {
	display: none;
}

/* Labels */
.joi-contact-form__field .control-label label,
.joi-contact-form__field label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	color: #374151;
	margin-bottom: 0.4rem;
}

.joi-contact-form__field .star {
	color: #e6718d;
}

/* Widen the control-group wrapper so it never clips the input */
.joi-contact-form__field .control-group {
	width: 100%;
	box-sizing: border-box;
}
.joi-contact-form__field .controls {
	width: 100%;
}

/* Inputs — override Joomla's size="" attribute with !important */
.joi-contact-form__field .controls input,
.joi-contact-form__field .controls textarea,
.joi-contact-form__field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.joi-contact-form__field textarea {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box;
	padding: 0.65rem 0.875rem;
	font-size: 1rem;
	font-family: inherit;
	color: #1f2937;
	background: #f9fafb;
	border: 1.5px solid #d1d5db;
	border-radius: 8px;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.joi-contact-form__field .controls input:focus,
.joi-contact-form__field .controls textarea:focus,
.joi-contact-form__field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
.joi-contact-form__field textarea:focus {
	border-color: #e6718d;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(230, 113, 141, 0.15);
}

.joi-contact-form__field .controls textarea,
.joi-contact-form__field textarea {
	min-height: 180px;
	resize: vertical;
}

/* Checkbox (send copy to yourself) */
.joi-contact-form__field input[type="checkbox"] {
	width: auto !important;
	height: auto !important;
	margin-right: 0.4rem;
	vertical-align: middle;
}

/* Captcha — invisible unless Turnstile needs interaction */
.joi-contact-form__captcha {
	margin: 0;
	padding: 0;
	border: none;
}

.joi-contact-form__captcha .cf-turnstile-wrap {
	margin: 0;
	min-height: 0;
}

.joi-contact-form__captcha .cf-turnstile {
	line-height: 0;
	min-height: 0;
}

.joi-contact-form__captcha-error {
	color: #b42318;
	font-size: 0.875rem;
	margin: 0.35rem 0 0;
}

/* Actions */
.joi-contact-form__actions {
	margin-top: 1.5rem;
}

/* Submit button — matches Free Trial btn-primary style */
.joi-support-btn {
	font-size: 16px;
	font-weight: 600;
	line-height: 24px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 580px) {
	.joi-contact-form {
		padding: 1.5rem 1.1rem;
		border-radius: 12px;
	}
	.joi-contact-form__fieldset {
		grid-template-columns: 1fr;
	}
	.joi-contact-form__field:has(#jform_contact_name),
	.joi-contact-form__field:has(#jform_contact_email) {
		grid-column: span 1;
	}
}
