@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@900&family=Roboto:ital,wght@0,300;0,400;0,700;1,400;1,300&display=swap');

* { 
	padding: 0;
	margin: 0; 
	box-sizing: border-box;
}

:root {
	--greenDark: #1f3933;
	--green: #00754a;
	--greenLight: #d4e9e2;
	--gold: #cba258;
	--gold-thin: #cba25866;
	--textBlack: rgba(0,0,0,.87);
	--textBlackSoft: rgba(0,0,0,.58);
}

body { 
	font-family: 'Roboto', sans-serif; 
	color: white;
	background-color: var(--greenDark);
}

a { color: #94a19e; }
a:visited { color: #94a19e; }
a:hover { color: #c0c8c6; }

.hidden { display: none; }

.wrapper { width: 100%; }

header {
	font-family: 'Mulish', sans-serif; 
	margin: 0 auto;
	padding-top: 10px; 
}
header h2 {
	font-size: 50px;
	line-height: 60px;
	color: var(--gold);
	font-weight: 900;
	padding-bottom: 5px;
	border-bottom: 2px solid #405751;
}
h3 {
	font-family: 'Mulish', sans-serif; 
	font-size: 32px;
	line-height: 36px;
	color: #94a19e;
	font-weight: 900;
	padding-bottom: 5px;
}
h4 {
	font-family: 'Roboto', sans-serif; 
	font-size: 14px;
	line-height: 16px;
	font-weight: 300;
	font-style: italic;
	margin-bottom: 5px;
	color: white;
	opacity: .7;
}
section, main {
	width: 100%;
	max-width: 1200px;
	margin: 20px auto 0;
}
main #content {
	display: flex;
	justify-content: space-between;
	gap: 50px;
}
#viz { 
	width: 100%;
	max-width: 800px;
}
#viz svg { 
	display: block;
	margin: 0 auto;
}
#viz .dot { fill-opacity: .4; }
#viz #bubbles .node { cursor: help; }
#viz #bubbles .node circle.base { fill: none; stroke: var(--gold); stroke-width: 0; transition: stroke-width .25s; }
#viz #bubbles .node circle.calory { fill: #405751; }

#viz #bubbles .node circle.carbohydrate { fill: none; stroke: #667974; stroke-width: 1.5; }
#viz #bubbles .node circle.fatTotal { fill: var(--gold); }
#viz #bubbles .node circle.protein { fill: #c0c8c6; }
#viz #bubbles .node circle.caffeine { fill: #162b26; }
#viz #bubbles .node circle.sodium { fill: none; stroke: #c0c8c6; }
#viz #bubbles .node circle.cholesterol { fill: none; stroke: var(--gold); }

#viz #bubbles .node circle.vitA { fill: none; stroke: #409877; }
#viz #bubbles .node circle.vitC { fill: none; stroke: var(--gold); }
#viz #bubbles .node circle.calcium { fill: none; stroke: #c0c8c6; }
#viz #bubbles .node circle.iron { fill: none; stroke: #162b26; }

#viz #bubbles .node line { 
	fill: none; 
	stroke-width: 2;
	transform: translate(-9px,3px) rotate(-30deg);
}
#viz #bubbles .node line.vitA { stroke: #409877; }
#viz #bubbles .node line.vitC { stroke: var(--gold); }
#viz #bubbles .node line.calcium { stroke: #c0c8c6; }
#viz #bubbles .node line.iron { stroke: #162b26; }

#viz #bubbles .node.highlighted circle.base { stroke-width: 10; }
#viz #bubbles .node.faded.highlighted circle.base { stroke-width: 3; }
#viz #bubbles .node.faded {
	opacity: .2;
	pointer-events: none;
}

#category-labels { opacity: 0; transition: opacity .25s; }
#category-labels.visible { opacity: 1; }

#category-labels text {
	font-family: 'Mulish', sans-serif;
	font-size: 18px;
	font-weight: 900;
	fill: white;
	opacity: .65;
	pointer-events: none;
	text-anchor: middle;

	stroke: var(--greenDark);
    paint-order: stroke;
    stroke-width: 8px;
    stroke-opacity: .8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

#viz-header {
	margin-bottom: 15px;
	display: flex;
	flex-direction: column;
	gap: 15px;
}
#viz-header #toggle-group {
	font-size: 16px;
	font-weight: 300;
	line-height: 18px;
}
#viz-header #toggle-group .icon {
	display: inline-block;
	width: 25px;
	height: 25px;
	background-image: url('eye-closed.svg');
	position: relative;
	left: 10px;
	top: 8px;
	cursor: help;
}
#viz-header #toggle-group .icon:hover {
	background-image: url('eye-open.svg');
}
#viz-header .value {
	display: inline-block;
	padding-bottom: 2px;
	border-bottom: none;
	cursor: pointer;
	user-select: none;
}
#viz-header .value:hover {
	color: var(--gold);
}
#viz-header .value.active {
	color: var(--gold);
	pointer-events: none;
	border-bottom: 1px solid var(--gold-thin);
}
#viz-header #categories {
	display: flex;
	gap: 6px 13px;
	flex-wrap: wrap;
	align-items: baseline;
}
#viz-header #categories .item {
	font-size: 11px;
	line-height: 12px;
	text-transform: uppercase;
	letter-spacing: .1em;
	white-space: nowrap;
	
	cursor: pointer;
	display: inline-block;
	padding-bottom: 1px;
	border-bottom: solid 1px rgba(255,255,255,0);

	user-select: none;
}
#viz-header #categories .item sup { 
	font-size: 8px; 
	line-height: 12px;
	vertical-align: unset;
	position: relative;
	top: -5px;
}
#viz-header #categories .item:hover {
	color: var(--gold);
}
#viz-header #categories .item.active {
	color: var(--gold);
	pointer-events: none;
	border-bottom-color: var(--gold-thin);
}

#info-panel {
	width: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 25px;
}

#beverage .name {
	font-family: 'Mulish', sans-serif;
	font-size: 18px;
	line-height: 20px;
	font-weight: 900;
	margin-bottom: 5px;
	color: var(--gold);
}
#beverage .category, #beverage .preparation {
	font-family: 'Roboto', sans-serif;
	color: #c0c8c6;
	font-size: 14px;
	font-style: italic;
	line-height: 16px;
	font-weight: 300;
	margin-bottom: 3px;
}
#beverage .note, .note {
	font-family: 'Roboto', sans-serif;
	color: #c0c8c6;
	font-style: italic;
	font-weight: 300;
}
#beverage sup {
	vertical-align: unset;
	position: relative;
	top: -5px;
}

#details {
	width: 100%;
	max-width: 350px;
	padding: 0 20px 20px;
	border: 1px solid #667974;
	border-radius: 15px;
	background-color: var(--greenDark);
}
#details h3 {
	display: inline-block;
	padding: 3px 5px;
	font-size: 14px;
	font-weight: normal;
	line-height: 24px;
	background-color: var(--greenDark);
	position: relative;
	top: -15px; left: -5px;
	color: #94a19e;
}
#details #nutrition-facts { margin-top: -15px; }
#details .nutrition {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 7px;
	margin-bottom: 6px;
	padding-top: 6px;
	font-size: 12px;
	font-weight: 300;
}
#details .nutrition .name { cursor: help; }
#details .nutrition .name:hover { color: var(--gold); }
#details .nutrition:not(.subcategory, :first-child) {
	border-top: 1px solid #405751aa;
}
#details .nutrition.faded { pointer-events: none; }
#details .nutrition.faded .name {
	opacity: .2;
	font-style: italic;
	pointer-events: none;
}
#details .nutrition.subcategory { margin: -8px 0 8px; }
#details .nutrition .info {
	width: 100%;
	max-width: 150px;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 5px;
}
#details .nutrition.subcategory .info .name { margin-left: 12px; }
#details .nutrition .info .value {
	color: var(--gold);
	font-weight: bold;
	text-align: right;
}
#details .nutrition svg {
	width: 100%;
}
#details .nutrition .distribution .label {
	fill: #94a19e;
	font-size: 10px;
}
#details .nutrition .distribution .stripe {
	fill: none;
	stroke: white;
	stroke-opacity: .2;
	shape-rendering: crispEdges;
}
#details .nutrition .distribution .stripe.faded { stroke-opacity: .02; }
#details .nutrition .distribution .stripe.highlighted {
	stroke: var(--gold);
	stroke-opacity: .8;
}
#details .nutrition .distribution .beverage-mark {
	fill: none;
	stroke: var(--gold);
	stroke-width: 2;
	shape-rendering: crispEdges;
}

#tt {
	pointer-events: none; 
	background: #c03030;
	position: absolute;
	padding: 6px 10px 5px;
	display: none;
	color: white;
	z-index: 1000;
	font-size: 14px;
	line-height: 16px;
	box-shadow: 0 5px 5px -3px #101030;
}
#tt .last {
	text-transform: uppercase;
	display: block;
}
footer {
	margin-top: 30px;
	border-top: 1px solid #405751;
	padding-top: 10px;
	margin-bottom: 20px;
	font-size: 12px;
	font-weight: 300;
	color: #94a19e;
}
footer a, footer a:visited { color: #94a19e; }
footer a:hover { color: #c0c8c6; }

#mobile-disclaimer { margin: 30px 0; display: none; }
#mobile-disclaimer h3 { margin-bottom: 12px; }
#mobile-disclaimer p { margin-bottom: 8px; }
#mobile-disclaimer img { width: 100%; max-width: 600px; }

@media screen and (max-width:1260px) {
	section { padding: 0 20px; }
	main #content { gap: 20px; }
	#info-panel { max-width: 200px; }
	#details #nutrition-facts {  min-width: 158px; }
	#details .nutrition .info { max-width: unset; }
	#details .nutrition .distribution { display: none; }
	#details h3 { line-height: 16px; }
}

@media screen and (max-width:1100px) {
	header h2 { font-size: 40px; line-height: 42px; padding-bottom: 15px; }
	#viz { max-width: 100%; }
	#viz svg {
		box-sizing: unset;
		width: 100%!important;
		height: 1px!important;
		padding-bottom: 75%;
		overflow: visible;
	}
	#beverage .name { font-size: 16px; line-height: 18px; }
	#beverage .category, #beverage .preparation, #details h3 { font-size: 12px; line-height: 14px; }
	#info-panel { max-width: 180px; }
	#details { padding: 0 10px 10px; }
	#details .nutrition { 
		font-size: 11px; 
		line-height: 11px; 
		margin-bottom: 4px;
		padding-bottom: 4px;
	}
	#details .nutrition.subcategory { margin: -6px 0 6px; }
}

@media screen and (max-width:800px) {
	main { display: none; }
	#mobile-disclaimer { display: block; }
}