/* TJL Gold Rate — front-end display + desktop header hover card.
   Neutrals pulled from the Nexter palette (--nxt-global-color-3/4/5) so the
   component sits consistently inside the existing design language; gold accent
   suits the jewellery brand. */
:root {
	--tjl-gr-gold: #b9975b;
	--tjl-gr-gold-dark: #8a6d34;
	--tjl-gr-ink: #192a3d;   /* nxt-global-color-4 */
	--tjl-gr-muted: #3a4f66; /* nxt-global-color-3 */
	--tjl-gr-line: #e1e8ed;  /* nxt-global-color-5 */
	--tjl-gr-bg: #ffffff;
}

/* ---- Shared rate rows ---- */
.tjl-gr-rows { display: flex; flex-direction: column; }
.tjl-gr-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 24px;
	padding: 10px 0;
	border-bottom: 1px solid var(--tjl-gr-line);
}
.tjl-gr-row:last-child { border-bottom: 0; }
.tjl-gr-karat { font-weight: 600; color: var(--tjl-gr-ink); letter-spacing: .02em; }
.tjl-gr-price { font-weight: 700; color: var(--tjl-gr-gold-dark); white-space: nowrap; }
.tjl-gr-unit { font-weight: 400; color: var(--tjl-gr-muted); font-size: .78em; }

/* ---- Page card ([tjl_gold_rate]) ---- */
.tjl-gr-page { display: flex; justify-content: center; padding: 24px 16px; }
.tjl-gr-card--page {
	width: 100%;
	max-width: 420px;
	background: var(--tjl-gr-bg);
	border: 1px solid var(--tjl-gr-line);
	border-top: 3px solid var(--tjl-gr-gold);
	border-radius: 10px;
	padding: 28px 28px 22px;
	box-shadow: 0 10px 30px rgba(25, 42, 61, .07);
}
.tjl-gr-title {
	margin: 0 0 16px;
	font-size: 1.4rem;
	text-align: center;
	color: var(--tjl-gr-ink);
	letter-spacing: .03em;
}
.tjl-gr-card--page .tjl-gr-price { font-size: 1.2em; }
.tjl-gr-note {
	margin: 16px 0 0;
	font-size: .8rem;
	line-height: 1.55;
	color: var(--tjl-gr-muted);
	text-align: center;
}

/* ---- Desktop header hover card (menu item 3633) ---- */
.menu-item-3633 { position: relative; }
.tjl-gr-hovercard {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(8px);
	min-width: 232px;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease;
}
.tjl-gr-hovercard-inner {
	position: relative;
	background: var(--tjl-gr-bg);
	border: 1px solid var(--tjl-gr-line);
	border-top: 3px solid var(--tjl-gr-gold);
	border-radius: 10px;
	padding: 14px 18px 16px;
	box-shadow: 0 12px 34px rgba(25, 42, 61, .16);
}
.tjl-gr-hovercard-inner::before {
	content: "";
	position: absolute;
	top: -6px;
	left: 50%;
	transform: translateX(-50%) rotate(45deg);
	width: 11px;
	height: 11px;
	background: var(--tjl-gr-gold);
	border-radius: 2px;
}
.tjl-gr-hovercard-head {
	display: block;
	font-size: .7rem;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: var(--tjl-gr-muted);
	margin-bottom: 8px;
	text-align: center;
}
.menu-item-3633:hover > .tjl-gr-hovercard {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(-50%) translateY(4px);
}
/* Collapse the hover preview the instant the item is clicked to open the modal,
   and keep it collapsed until the pointer leaves the item (toggled in
   gold-rate.js). Placed after the :hover rule so it wins the specificity tie. */
.menu-item-3633.tjl-gr-suppress-hover > .tjl-gr-hovercard {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

/* ---- Mobile: no hover card, plain menu link ---- */
@media (max-width: 1024px) {
	.tjl-gr-hovercard { display: none !important; }
}

/* ===========================================================================
   Native typography (Elementor kit 27 — Prata headings / Jost body) + premium
   rate modal. Both fonts already load site-wide via the global header.
   =========================================================================== */
:root {
	--tjl-gr-serif: 'Prata', 'Cardo', Georgia, 'Times New Roman', serif;
	--tjl-gr-sans: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Native fonts on shared pieces (page card, hover card, modal) */
.tjl-gr-title,
.tjl-gr-modal__title { font-family: var(--tjl-gr-serif); font-weight: 400; }
.tjl-gr-price { font-family: var(--tjl-gr-serif); font-weight: 400; }
.tjl-gr-rupee { font-family: var(--tjl-gr-sans); font-weight: 500; font-size: .72em; vertical-align: 1px; margin-right: 1px; }
.tjl-gr-karat,
.tjl-gr-unit,
.tjl-gr-eyebrow,
.tjl-gr-hovercard-head { font-family: var(--tjl-gr-sans); }

/* Improved description typography (shared by page + modal) */
.tjl-gr-note {
	font-family: var(--tjl-gr-sans);
	font-size: .95rem;
	line-height: 1.65;
	letter-spacing: .01em;
	color: var(--tjl-gr-muted);
	max-width: 34em;
	margin-left: auto;
	margin-right: auto;
}

/* ---- Modal overlay + box ---- */
html.tjl-gr-modal-open { overflow: hidden; }

/* Author display rule beats the UA [hidden] rule, so show/hide is driven purely
   by opacity + visibility below — the `hidden` attr stays only for no-JS/a11y. */
.tjl-gr-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .28s ease, visibility .28s ease;
	-webkit-font-smoothing: antialiased;
}
.tjl-gr-modal.is-open { opacity: 1; visibility: visible; }

.tjl-gr-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(25, 42, 61, .55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.tjl-gr-modal__box {
	position: relative;
	width: 100%;
	max-width: 420px;
	background: var(--tjl-gr-bg);
	border-radius: 14px;
	border-top: 3px solid var(--tjl-gr-gold);
	box-shadow: 0 30px 70px rgba(25, 42, 61, .30);
	padding: 38px 34px 30px;
	text-align: center;
	transform: translateY(14px) scale(.98);
	transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.tjl-gr-modal.is-open .tjl-gr-modal__box { transform: translateY(0) scale(1); }

/* Root cause: Elementor's global `[type=button],button{appearance:button}` reset
   (loaded after this file, specificity 0,0,1,0) keeps the native control alive,
   so the browser paints a dark/black box under a dark color-scheme and ignores
   the author background. Scoping these rules under `.tjl-gr-modal` (0,0,2,0)
   lets `appearance:none` win the tie, dropping the native chrome — a plain
   transparent icon button, no box. */
.tjl-gr-modal .tjl-gr-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	-webkit-appearance: none;
	appearance: none;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--tjl-gr-muted);
	line-height: 0;
	cursor: pointer;
	transition: color .15s ease, background .15s ease;
}
.tjl-gr-modal .tjl-gr-modal__close svg { display: block; }
.tjl-gr-modal .tjl-gr-modal__close:hover,
.tjl-gr-modal .tjl-gr-modal__close:focus-visible {
	color: var(--tjl-gr-gold-dark);
	background: rgba(185, 151, 91, .12); /* subtle gold tint of --tjl-gr-gold */
	outline: none;
}

.tjl-gr-eyebrow {
	display: block;
	font-size: .72rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: var(--tjl-gr-gold-dark);
	margin-bottom: 8px;
}
.tjl-gr-modal__title {
	margin: 0 0 20px;
	font-size: 2rem;
	line-height: 1.2;
	letter-spacing: .5px;
	color: var(--tjl-gr-ink);
}

/* Larger, more elegant rate rows inside the modal */
.tjl-gr-rows--modal { margin: 0 auto; max-width: 320px; }
.tjl-gr-rows--modal .tjl-gr-row { padding: 14px 0; }
.tjl-gr-rows--modal .tjl-gr-karat { font-size: 1.02rem; font-weight: 500; }
.tjl-gr-rows--modal .tjl-gr-price { font-size: 1.7rem; line-height: 1; }
.tjl-gr-rows--modal .tjl-gr-unit { font-size: .8rem; }
.tjl-gr-modal .tjl-gr-note { margin-top: 22px; }

/* ---- Mobile ---- */
@media (max-width: 600px) {
	.tjl-gr-modal { padding: 16px; }
	.tjl-gr-modal__box { padding: 34px 22px 26px; border-radius: 12px; }
	.tjl-gr-modal__title { font-size: 1.7rem; margin-bottom: 16px; }
	.tjl-gr-rows--modal .tjl-gr-price { font-size: 1.5rem; }
	.tjl-gr-note { font-size: .92rem; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
	.tjl-gr-modal,
	.tjl-gr-modal__box { transition: opacity .01ms; }
	.tjl-gr-modal__box { transform: none; }
}
