/*
 * Baby name details card ([baby_name_details]).
 *
 * These rules were previously inlined in templates/name-card.php, which meant
 * they were re-sent on every render and included unscoped selectors (a bare
 * `label { ... }` that restyled every label on the page). Everything here is
 * scoped under .tmc-card.
 */

.tmc-card {
	--tmc-primary: #af0379;
	--tmc-accent: #ed7117;
	--tmc-surface: #fffffc;

	max-width: 700px;
	margin: 0 auto;
	padding: 25px;
	background: var(--tmc-surface);
	font-family: 'Segoe UI', sans-serif;
	border-radius: 12px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.tmc-card__title {
	text-align: center;
	color: var(--tmc-primary);
	margin-bottom: 20px;
	text-decoration: underline;
}

/* ---- Details panel ---- */

.tmc-card__details {
	width: 100%;
	max-width: 600px;
	margin: 0 auto 30px;
	border: 2px solid var(--tmc-primary);
	border-radius: 12px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
	background-color: var(--tmc-surface);
	overflow: hidden;
}

.tmc-card__header {
  margin: 0;
	background-color: var(--tmc-primary);
	text-align: center;
	font-size: 20px;
	color: var(--tmc-surface);
	padding: 12px 20px;
	font-weight: bold;
}

.tmc-card__row {
	display: grid;
	grid-template-columns: 40% 60%;
	align-items: center;
	padding: 10px 20px;
	border-bottom: 1px solid #a4d4ae;
}

.tmc-card__row:last-child {
	border-bottom: none;
}

.tmc-card__label,
.tmc-card__value {
	color: var(--tmc-primary);
	font-size: 16px;
	text-align: left;
}

.tmc-card__label {
	font-weight: bold;
}

.tmc-card__value {
	padding-left: 10px;
}

/* ---- Name description ---- */

/*
 * Sits between the details panel and the regional variants. Runs to the card's
 * own width rather than the 600px details column, matching the alignment the
 * section already had before it was given a heading and a panel.
 */
.mc-display-meaning {
	width: 100%;
	max-width: inherit;
	color: #b3007d;
	margin: 20px 0 30px;
	line-height: 1.8;
}

.mc-display-meaning__title {
	margin: 0 0 12px;
	color: var(--tmc-primary);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	text-align: left;
}

/*
 * The left rule is the whole emphasis here, so the fill stays very close to
 * white — the card sits on --tmc-surface and two tinted panels in a row read
 * as clutter.
 */
.mc-display-meaning__box {
	box-sizing: border-box;
	background: #fff8fc;
	border-left: 4px solid #b3007d;
	border-radius: 8px;
	padding: 18px 22px;
}

.mc-display-meaning__text {
	margin: 0;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
	text-align: left;
}

.mc-display-meaning__text strong {
	font-weight: 700;
}

/* ---- Email form ---- */

.tmc-card__email {
	padding: 0 9%;
}

.tmc-card__email-title {
	color: var(--tmc-primary);
	text-align: center;
	text-decoration: underline;
}

.tmc-card__email-intro {
	color: var(--tmc-primary);
	text-align: justify;
}

.tmc-card__email label {
	display: block;
	font-weight: bold;
	font-size: 18px;
	color: var(--tmc-primary);
	margin: 20px 0 6px;
}

.tmc-card__input {
	width: 100%;
	padding: 10px;
	margin: 4px 0 15px;
	font-size: 14px;
	background-color: var(--tmc-surface);
	color: var(--tmc-primary);
	border: 1px solid var(--tmc-primary);
	border-radius: 6px;
}

.tmc-card__input:focus {
	border-color: var(--tmc-accent);
	color: var(--tmc-accent);
	outline: 2px solid var(--tmc-accent);
	outline-offset: 2px;
}

.tmc-card__button {
	width: 100%;
	padding: 12px;
	background: var(--tmc-primary);
	color: var(--tmc-surface);
	border: none;
	border-radius: 12px;
	font-size: 16px;
	font-weight: 600;
	margin-top: 30px;
	cursor: pointer;
	transition: background 0.3s ease, transform 0.2s ease;
}

.tmc-card__button:hover,
.tmc-card__button:focus-visible {
	background: var(--tmc-accent);
	transform: translateY(-1px);
	box-shadow: 0 0 0 3px rgba(237, 113, 23, 0.3);
}

.tmc-card__button:disabled {
	background: #c9a4bd;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.tmc-card__status {
	margin-top: 15px;
	font-weight: bold;
	font-size: 14px;
}

.tmc-card__status--ok {
	color: #1a7f37;
}

.tmc-card__status--error {
	color: #b3261e;
}

.tmc-card__captcha {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 16px 0;
	min-height: 70px;
}

@media (max-width: 600px) {
	.tmc-card {
		padding: 16px;
	}

	.tmc-card__email {
		padding: 0;
	}

	.tmc-card__row {
		grid-template-columns: 45% 55%;
		padding: 10px 12px;
	}

	.mc-display-meaning__title {
		font-size: 18px;
	}

	.mc-display-meaning__box {
		padding: 14px 16px;
	}
}

/* ---------------------------------------------------------------------------
 * Regional variants.
 *
 * A name is not unique in the catalogue: "Zara" exists 11 times across ten
 * countries with different rashis and shades of meaning. The card leads with
 * the variant that was clicked and lists the rest here.
 * ------------------------------------------------------------------------ */

.tmc-card__variants {
	margin: 0 auto 30px;
	max-width: 600px;
}

.tmc-card__variants-title {
	color: var(--tmc-primary);
	text-align: center;
	text-decoration: underline;
	margin-bottom: 8px;
}

.tmc-card__variants-intro {
	color: var(--tmc-primary);
	font-size: 14px;
	text-align: center;
	margin: 0 0 12px;
}

.tmc-card__variants-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.tmc-card__variants-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.tmc-card__variants-table th,
.tmc-card__variants-table td {
	border: 1px solid var(--tmc-primary);
	padding: 8px 10px;
	text-align: left;
	color: var(--tmc-primary);
}

.tmc-card__variants-table th {
	background-color: var(--tmc-primary);
	color: var(--tmc-surface);
	white-space: nowrap;
}

.tmc-card__variants-table tbody tr:nth-child(even) {
	background-color: #fdf4f9;
}

.tmc-card__variants-table a {
	color: #d4007f;
	text-decoration: underline;
}

.tmc-card__variants-table a:hover {
	text-decoration: none;
}

/* -------------------------------------------------------------------------
 * "Explore More" block (includes/explore-more.php)
 *
 * A sibling of .tmc-card, not a child, so it re-declares the brand tokens
 * rather than inheriting the ones scoped to the card above.
 * ---------------------------------------------------------------------- */

.tmc-explore {
	--tmc-primary: #af0379;
	--tmc-ink: #2e2129;
	--tmc-muted: #6b5a65;
	--tmc-line: #e7dce4;
	--tmc-surface: #fffffc;
	--tmc-sunk: #fdf4f9;

	max-width: 700px;
	margin: 32px auto 0;
	padding: 24px;
	background: var(--tmc-surface);
	border: 1px solid var(--tmc-line);
	border-radius: 12px;
	font-family: 'Segoe UI', sans-serif;
	color: var(--tmc-ink);
	line-height: 1.6;
}

.tmc-explore__title {
	margin: 0 0 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--tmc-primary);
	color: var(--tmc-primary);
	font-size: 1.35rem;
	line-height: 1.3;
}

.tmc-explore__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 20px;
}

.tmc-explore__group {
	border: 1px solid var(--tmc-line);
	border-radius: 8px;
	background: var(--tmc-sunk);
	padding: 14px 16px;
}

/* The <h3> lives inside <summary> for correct outline semantics, so the marker
   has to be re-attached to the summary itself rather than the heading. */
.tmc-explore__summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.tmc-explore__summary::-webkit-details-marker {
	display: none;
}

.tmc-explore__summary::after {
	content: '+';
	color: var(--tmc-primary);
	font-size: 1.2rem;
	line-height: 1;
	flex: 0 0 auto;
}

.tmc-explore__group[open] > .tmc-explore__summary::after {
	content: '\2212';
}

.tmc-explore__heading {
	margin: 0;
	color: var(--tmc-primary);
	font-size: 1rem;
	font-weight: 650;
	display: inline;
}

.tmc-explore__intro {
	margin: 10px 0 12px;
	color: var(--tmc-muted);
	font-size: 0.88rem;
}

.tmc-explore__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.tmc-explore__list a {
	color: var(--tmc-primary);
	text-decoration: underline;
	font-size: 0.92rem;
}

.tmc-explore__list a:hover,
.tmc-explore__list a:focus-visible {
	text-decoration: none;
}

/* ---- Related trending names ---- */

.tmc-explore__related,
.tmc-explore__faq {
	margin-top: 26px;
	padding-top: 20px;
	border-top: 1px solid var(--tmc-line);
}

.tmc-explore__names {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px;
}

.tmc-explore__name {
	display: block;
	padding: 10px 12px;
	border: 1px solid var(--tmc-line);
	border-radius: 8px;
	background: var(--tmc-sunk);
	text-decoration: none;
	color: var(--tmc-ink);
	height: 100%;
}

.tmc-explore__name:hover,
.tmc-explore__name:focus-visible {
	border-color: var(--tmc-primary);
}

.tmc-explore__name-text {
	display: block;
	color: var(--tmc-primary);
	font-weight: 650;
	font-size: 0.95rem;
}

.tmc-explore__name-meaning {
	display: block;
	margin-top: 2px;
	color: var(--tmc-muted);
	font-size: 0.79rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---- FAQ ---- */

.tmc-explore__qa {
	border-bottom: 1px solid var(--tmc-line);
	padding: 10px 0;
}

.tmc-explore__qa:last-child {
	border-bottom: 0;
}

.tmc-explore__qa > summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 0.93rem;
	color: var(--tmc-ink);
}

.tmc-explore__qa > p {
	margin: 8px 0 0;
	color: var(--tmc-muted);
	font-size: 0.89rem;
}

.tmc-explore :focus-visible {
	outline: 2px solid var(--tmc-primary);
	outline-offset: 2px;
	border-radius: 3px;
}

@media (max-width: 767px) {
	.tmc-explore {
		padding: 18px 16px;
		margin-top: 24px;
	}

	.tmc-explore__title {
		font-size: 1.15rem;
	}

	.tmc-explore__grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}
}
