/**
 * AJ Gold Rates - Frontend Styles
 */
.ajgr-wrapper {
	--ajgr-bg: #ffffff;
	--ajgr-fg: #1a1a1a;
	--ajgr-accent: #b8860b;
	--ajgr-border: #e5e0d8;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--ajgr-fg);
}

@media (prefers-color-scheme: dark) {
	.ajgr-wrapper {
		--ajgr-bg: #1c1c1e;
		--ajgr-fg: #f5f5f5;
		--ajgr-accent: #d4af37;
		--ajgr-border: #333333;
	}
}

.ajgr-wrapper.ajgr-dark {
	--ajgr-bg: #1c1c1e;
	--ajgr-fg: #f5f5f5;
	--ajgr-accent: #d4af37;
	--ajgr-border: #333333;
}

.ajgr-wrapper.ajgr-light {
	--ajgr-bg: #ffffff;
	--ajgr-fg: #1a1a1a;
	--ajgr-accent: #b8860b;
	--ajgr-border: #e5e0d8;
}

/* Card view */
.ajgr-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
	margin-bottom: 8px;
}

.ajgr-card {
	background: var(--ajgr-bg);
	border: 1px solid var(--ajgr-border);
	border-radius: 10px;
	padding: 14px 16px;
	text-align: center;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ajgr-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.ajgr-card__label {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.7;
	margin-bottom: 6px;
}

.ajgr-card__value {
	display: block;
	font-size: 22px;
	font-weight: 700;
	color: var(--ajgr-accent);
}

/* Table view */
.ajgr-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--ajgr-bg);
}

.ajgr-table th,
.ajgr-table td {
	border: 1px solid var(--ajgr-border);
	padding: 10px 14px;
	text-align: left;
}

.ajgr-table th {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.7;
}

.ajgr-table td:last-child {
	font-weight: 700;
	color: var(--ajgr-accent);
}

/* Ticker / marquee view */
.ajgr-ticker {
	overflow: hidden;
	white-space: nowrap;
	background: var(--ajgr-bg);
	border: 1px solid var(--ajgr-border);
	border-radius: 8px;
	padding: 10px 0;
}

.ajgr-ticker__track {
	display: inline-block;
	padding-left: 100%;
	animation: ajgr-marquee 25s linear infinite;
}

.ajgr-ticker__item {
	display: inline-block;
	margin-right: 36px;
	font-size: 14px;
}

.ajgr-ticker__item strong {
	color: var(--ajgr-accent);
	margin-right: 4px;
}

@keyframes ajgr-marquee {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-100%);
	}
}

/* Single shortcode value */
.ajgr-single {
	display: inline-flex;
	gap: 6px;
	align-items: baseline;
	font-size: 14px;
}

.ajgr-single__label {
	opacity: 0.7;
}

.ajgr-single__value {
	font-weight: 700;
	color: var(--ajgr-accent);
}

.ajgr-updated {
	font-size: 12px;
	opacity: 0.6;
	margin-top: 8px;
}

/* RTL support */
[dir="rtl"] .ajgr-ticker__track {
	animation-direction: reverse;
}
