/**
 * Sara Jwelry — Size Guide
 * Editorial, gold-accented modal with smooth motion.
 */

:root {
	--sj-sg-accent: #b8860b;
}

/* ============================================================
 * TRIGGER
 * ============================================================ */
.sj-sg-trigger-wrap {
	margin: 18px 0 4px;
}

.sj-sg-trigger {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 14px 18px;
	background: linear-gradient(135deg, #fdfaf3 0%, #f7f0e1 100%);
	border: 1px solid rgba(184, 134, 11, 0.18);
	border-radius: 14px;
	cursor: pointer;
	transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
		box-shadow 0.25s ease,
		border-color 0.25s ease;
	font-family: inherit;
	text-align: right;
	position: relative;
	overflow: hidden;
}

.sj-sg-trigger::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(
		circle at top right,
		rgba(184, 134, 11, 0.12),
		transparent 60%
	);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.sj-sg-trigger:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 28px -16px rgba(184, 134, 11, 0.45);
	border-color: rgba(184, 134, 11, 0.4);
}

.sj-sg-trigger:hover::before {
	opacity: 1;
}

.sj-sg-trigger__icon {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--sj-sg-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	box-shadow: 0 4px 14px -4px rgba(184, 134, 11, 0.5);
}

.sj-sg-trigger__label {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.sj-sg-trigger__title {
	font-size: 14px;
	font-weight: 700;
	color: #1a1a1a;
	letter-spacing: -0.01em;
}

.sj-sg-trigger__sub {
	font-size: 12px;
	color: #6b6b6b;
	font-weight: 400;
}

.sj-sg-trigger__arrow {
	color: var(--sj-sg-accent);
	font-size: 18px;
	transition: transform 0.3s ease;
}

.sj-sg-trigger:hover .sj-sg-trigger__arrow {
	transform: translateX(-4px);
}

/* ============================================================
 * MODAL
 * ============================================================ */
.sj-sg-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: stretch;
	justify-content: flex-start;
	pointer-events: none;
}

.sj-sg-modal.is-open {
	display: flex;
	pointer-events: auto;
}

.sj-sg-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 16, 8, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 0.35s ease;
}

.sj-sg-modal.is-open .sj-sg-modal__backdrop {
	opacity: 1;
}

.sj-sg-modal__panel {
	position: relative;
	z-index: 1;
	background: #fffdf8;
	width: 100%;
	max-width: 720px;
	height: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	box-shadow: -30px 0 80px -20px rgba(0, 0, 0, 0.35);
	transform: translateX(100%);
	transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
	display: flex;
	flex-direction: column;
}

.sj-sg-modal.is-open .sj-sg-modal__panel {
	transform: translateX(0);
}

.sj-sg-modal__close {
	position: absolute;
	top: 18px;
	left: 18px;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(0, 0, 0, 0.08);
	color: #1a1a1a;
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
	transition: transform 0.2s ease, background 0.2s ease;
	backdrop-filter: blur(8px);
}

.sj-sg-modal__close:hover {
	background: var(--sj-sg-accent);
	color: #fff;
	transform: rotate(90deg);
}

/* ----- Header ----- */
.sj-sg-modal__header {
	padding: 56px 36px 24px;
	background: linear-gradient(
		180deg,
		#fdf6e6 0%,
		#fffdf8 100%
	);
	border-bottom: 1px solid rgba(184, 134, 11, 0.12);
	position: relative;
}

.sj-sg-modal__header::after {
	content: "";
	position: absolute;
	bottom: 0;
	right: 36px;
	width: 60px;
	height: 2px;
	background: var(--sj-sg-accent);
	border-radius: 2px;
}

.sj-sg-modal__eyebrow {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var(--sj-sg-accent);
	margin-bottom: 8px;
}

.sj-sg-modal__title {
	font-size: 28px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 12px;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.sj-sg-modal__intro {
	font-size: 14px;
	color: #555;
	line-height: 1.7;
	margin: 0;
	max-width: 560px;
}

/* ----- Body ----- */
.sj-sg-modal__body {
	padding: 28px 36px;
	flex: 1;
}

.sj-sg-modal__media {
	margin: 0 auto 28px;
	max-width: 380px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.15);
}

.sj-sg-modal__img {
	width: 100%;
	height: auto;
	display: block;
}

/* ----- Tabs ----- */
.sj-sg-tabs {
	margin-bottom: 32px;
}

.sj-sg-tabs__nav {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	background: #f5efe1;
	padding: 4px;
	border-radius: 12px;
	margin-bottom: 18px;
	scrollbar-width: none;
}

.sj-sg-tabs__nav::-webkit-scrollbar {
	display: none;
}

.sj-sg-tabs__btn {
	flex: 1;
	min-width: max-content;
	padding: 10px 18px;
	background: transparent;
	border: none;
	border-radius: 8px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	color: #6b6b6b;
	cursor: pointer;
	transition: all 0.25s ease;
	white-space: nowrap;
}

.sj-sg-tabs__btn:hover {
	color: #1a1a1a;
}

.sj-sg-tabs__btn.is-active {
	background: #fff;
	color: var(--sj-sg-accent);
	box-shadow: 0 2px 8px -4px rgba(0, 0, 0, 0.15);
}

.sj-sg-tabs__panel {
	display: none;
	animation: sj-sg-fade 0.4s ease;
}

.sj-sg-tabs__panel.is-active {
	display: block;
}

@keyframes sj-sg-fade {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ----- Table ----- */
.sj-sg-table-wrap {
	overflow-x: auto;
	border-radius: 12px;
	border: 1px solid rgba(0, 0, 0, 0.06);
	background: #fff;
	-webkit-overflow-scrolling: touch;
}

.sj-sg-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	min-width: 100%;
}

.sj-sg-table thead {
	background: linear-gradient(180deg, #fdf6e6, #f5e9c8);
}

.sj-sg-table th {
	padding: 14px 16px;
	font-weight: 700;
	color: #1a1a1a;
	text-align: center;
	border-bottom: 2px solid var(--sj-sg-accent);
	white-space: nowrap;
	font-size: 12px;
	letter-spacing: 0.02em;
}

.sj-sg-table tbody tr {
	transition: background 0.2s ease;
}

.sj-sg-table tbody tr:nth-child(even) {
	background: #fdfaf3;
}

.sj-sg-table tbody tr:hover {
	background: #fdf2d8;
}

.sj-sg-table td {
	padding: 12px 16px;
	text-align: center;
	color: #444;
	border-bottom: 1px solid rgba(0, 0, 0, 0.04);
	font-variant-numeric: tabular-nums;
}

.sj-sg-table tbody tr:last-child td {
	border-bottom: none;
}

/* ----- Section heading ----- */
.sj-sg-section-h {
	font-size: 16px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 16px;
	padding-right: 14px;
	position: relative;
	letter-spacing: -0.01em;
}

.sj-sg-section-h::before {
	content: "";
	position: absolute;
	right: 0;
	top: 4px;
	bottom: 4px;
	width: 4px;
	border-radius: 2px;
	background: var(--sj-sg-accent);
}

/* ----- Tips ----- */
.sj-sg-tips {
	margin-bottom: 32px;
}

.sj-sg-tips__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
}

.sj-sg-tip {
	display: flex;
	gap: 12px;
	padding: 16px;
	background: #fff;
	border: 1px solid rgba(184, 134, 11, 0.12);
	border-radius: 12px;
	transition: all 0.25s ease;
}

.sj-sg-tip:hover {
	border-color: rgba(184, 134, 11, 0.35);
	transform: translateY(-2px);
	box-shadow: 0 12px 24px -16px rgba(184, 134, 11, 0.4);
}

.sj-sg-tip__icon {
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: linear-gradient(135deg, #fdf6e6, #f5e9c8);
	color: var(--sj-sg-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
}

.sj-sg-tip__title {
	font-size: 13px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 4px;
}

.sj-sg-tip__desc {
	font-size: 12px;
	color: #6b6b6b;
	line-height: 1.6;
	margin: 0;
}

/* ----- FAQ ----- */
.sj-sg-faq {
	margin-bottom: 28px;
}

.sj-sg-faq__item {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 12px;
	margin-bottom: 8px;
	overflow: hidden;
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.sj-sg-faq__item[open] {
	border-color: rgba(184, 134, 11, 0.3);
	box-shadow: 0 8px 24px -16px rgba(184, 134, 11, 0.3);
}

.sj-sg-faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	font-size: 13px;
	font-weight: 600;
	color: #1a1a1a;
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.sj-sg-faq__q::-webkit-details-marker {
	display: none;
}

.sj-sg-faq__q i {
	color: var(--sj-sg-accent);
	font-size: 16px;
	transition: transform 0.3s ease;
	flex-shrink: 0;
}

.sj-sg-faq__item[open] .sj-sg-faq__q i {
	transform: rotate(180deg);
}

.sj-sg-faq__a {
	padding: 0 18px 16px;
	font-size: 13px;
	color: #555;
	line-height: 1.7;
}

/* ----- Footer / CTA ----- */
.sj-sg-modal__footer {
	padding: 20px 36px 28px;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	background: #fdfaf3;
	position: sticky;
	bottom: 0;
}

.sj-sg-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 14px 20px;
	background: linear-gradient(135deg, var(--sj-sg-accent), #d4a017);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	border-radius: 12px;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	box-shadow: 0 8px 24px -10px rgba(184, 134, 11, 0.5);
}

.sj-sg-cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 30px -10px rgba(184, 134, 11, 0.6);
	color: #fff;
}

.sj-sg-cta i {
	font-size: 18px;
}

/* ============================================================
 * MOBILE
 * ============================================================ */
@media (max-width: 768px) {
	.sj-sg-modal {
		justify-content: stretch;
		align-items: flex-end;
	}

	.sj-sg-modal__panel {
		max-width: 100%;
		height: 92vh;
		border-top-left-radius: 24px;
		border-top-right-radius: 24px;
		transform: translateY(100%);
	}

	.sj-sg-modal.is-open .sj-sg-modal__panel {
		transform: translateY(0);
	}

	.sj-sg-modal__close {
		top: 14px;
		left: 14px;
	}

	.sj-sg-modal__header {
		padding: 40px 22px 20px;
	}

	.sj-sg-modal__header::after {
		right: 22px;
	}

	.sj-sg-modal__title {
		font-size: 22px;
	}

	.sj-sg-modal__body {
		padding: 22px;
	}

	.sj-sg-modal__footer {
		padding: 16px 22px 22px;
	}

	.sj-sg-trigger {
		padding: 12px 14px;
	}

	.sj-sg-tips__grid {
		grid-template-columns: 1fr;
	}

	.sj-sg-table th,
	.sj-sg-table td {
		padding: 10px 12px;
		font-size: 12px;
	}
}

/* prevent body scroll when open */
body.sj-sg-locked {
	overflow: hidden;
}
