
/* --- Base & Body Styles --- */
:root {
	/* Color Palette */
	--color-background: #FAF9F6;
	--color-surface: #ffffff;
	--color-border: #bfc8d4;
	--color-surface-muted: #e4e1e1;
	--color-text-primary: #002554;
	--color-text-secondary: #B9975b;
	--color-text-subtle: #ccc;
	--color-positive: #002554;
    --color-negative: #002554;
	--color-neutral: #002554; /* Color for no change */
	--color-gradient-start: #667c98;
	--color-gradient-end: #002554;
	--color-indicator-border: #002554;

	/* Shadows */
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1),
    0 -6px 12px -4px rgba(0, 0, 0, 0.1);
}



body {
	font-family: "Inter", sans-serif;
	background-color: rgba(255, 255, 255, 0.7);
	color: var(--primary);
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem; /* 16px */
}

/* --- Main Card Component --- */
.card {
	width: 100%;
	max-width: 1100px; /* 672px */
	background-color: var(--color-surface);
	border-radius: 0px; /* 16px */
	/* box-shadow: var(--shadow-lg); */
	padding: 1.5rem; /* 24px */
	border: var(--lines) 1px solid;
}

/* --- Card Header --- */
.card-header {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding-bottom: 1.5rem; /* 24px */
	border-bottom: 1px solid var(--lines);
}
.card-header__info h1 {
	font-size: 1.5rem; /* 24px */
	font-weight: 500;
	color: var(--primary);
	margin: 0;
}
.card-header__info p {
	font-size: 1.125rem; /* 18px */
	font-weight: 500;
	color: var(--primary);
	margin: 0;
}
.card-header__price {
	text-align: left;
	margin-top: 1rem; /* 16px */
}
.card-header__price .current-price {
	font-size: 58px; /* 36px */
	font-weight: 600;
	letter-spacing: -0.025em;
	color: var(--secondary);
	margin: 0;
	line-height: 115%;
}

.card-header__price .current-price small {
	font-size: 20px;
	color: var(--primary);
}

.card-header__price .price-change-container {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin-top: 0.25rem; /* 4px */
	font-size: 1.125rem; /* 18px */
	font-weight: 600;
}
.price-change-container svg {
	height: 1.5rem; /* 24px */
	width: 1.5rem; /* 24px */
}
.price-change-container p {
	margin: 0 0 0 0.25rem; /* 4px */
}
.price-change-container.is-positive { color: var(--color-positive); }
.price-change-container.is-negative { color: var(--color-negative); }
.price-change-container.is-neutral { color: var(--color-neutral); }

.price-change-container.is-positive svg { color: #22c55e; }
.price-change-container.is-negative svg { color: #ef4444; }
.price-change-container.is-neutral svg { color: #6b7280; }

/* --- Day's Range Visualizer --- */
.range-visualizer {
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
}
.range-visualizer__labels {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 16px; /* 14px */
	font-weight: 400;
	color: var(--primary7);
	margin-bottom: 0.5rem; /* 8px */
}
.range-visualizer__bar {
	position: relative;
	height: 0.5rem; /* 8px */
	background-color: var(--color-border);
	border-radius: 9999px;
}
.range-visualizer__fill {
	position: absolute;
	top: 0;
	height: 100%;
	background-image: linear-gradient(to right, var(--color-gradient-start), var(--color-gradient-end));
	border-radius: 9999px;
}
.range-visualizer__indicator {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}
.range-visualizer__indicator div {
	width: 1.25rem; /* 20px */
	height: 1.25rem; /* 20px */
	background-color: var(--color-surface);
	border-radius: 50%;
	box-shadow: var(--shadow-lg);
	border: 2px solid var(--color-indicator-border);
}
.range-visualizer__values {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 16px; /* 14px */
	font-weight: 500;
	color: var(--primary);
	margin-top: 0.5rem; /* 8px */
}

/* --- Key Metrics Grid --- */
.metrics-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem; /* 24px */
	padding-top: 1.5rem; /* 24px */
	border-top: 1px solid var(--lines);
}
.metric-item {
	/* background-color: var(--tertiary); */
	border-radius: 0px; /* 8px */
	padding: 1rem; /* 16px */
	border-bottom: solid 1px var(--lines);
}
.metric-item__label {
	font-size: 16px; /* 14px */
	font-weight: 400;
	color: var(--primary);
	margin: 0;
}
.metric-item__label .date-label {
	font-weight: 400;
	margin-left: 0.5em;
}
.metric-item__value {
	font-size: 16px; /* 18px */
	font-weight: 500;
	color: var(--primary);
	margin: 0.25rem 0 0 0;
}

/* --- Card Footer --- */
.card-footer {
    text-align: center;
    margin-top: 24px; /* 32px */
    font-size: 12px; /* 12px */
    color: var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-footer p {
	margin: 0;
}

.poweredby img {
    height: 10px;
}

/* --- Loading Skeleton Styles --- */
.loading-placeholder {
	background-color: var(--color-border);
	border-radius: 0.25rem; /* 4px */
	color: transparent !important; /* Hide any text inside */
	user-select: none;
	animation: pulse 1.5s infinite ease-in-out;
	min-height: 1.2em; /* Ensure it has height */
	display: inline-block;
	width: 60%; /* Default placeholder width */
}
.loading-placeholder.w-full { width: 100%; }
.loading-placeholder.w-short { width: 30%; }
.loading-placeholder.w-price { width: 40%; }
.loading-placeholder.w-metric { width: 50%; }

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.6; }
}

/* --- Responsive Styles --- */
@media (min-width: 768px) {
	.card {
		padding: 2rem; /* 32px */
	}
	.card-header {
		flex-direction: row;
		align-items: center;
	}
	.card-header__price {
		text-align: right;
		margin-top: 0;
	}
	.card-header__price .price-change-container {
		justify-content: flex-end;
	}
	.card-header__price .current-price {
		font-size: 58px; /* 48px */
	}
	.metrics-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}