.mygs-nutrition-analyzer {
	color: #4b4b55;
	font-family: Nunito, Inter, "Helvetica Neue", Arial, sans-serif;
	max-width: 1100px;
	width: 100%;
}

.mygs-nutrition-analyzer__layout {
	display: grid;
	gap: 28px;
	grid-template-columns: minmax(0, 1fr) 380px;
}

.mygs-nutrition-analyzer__controls,
.mygs-nutrition-analyzer__preview,
.mygs-nutrition-analyzer__detection-area {
	background: #ffffff;
	border: 1px solid #e9e9ef;
	border-radius: 16px;
	box-shadow: 0 14px 34px rgba(35, 29, 91, 0.06);
}

.mygs-nutrition-analyzer__controls {
	padding: 26px;
}

.mygs-nutrition-analyzer__form {
	display: grid;
	margin: 0;
}

.mygs-nutrition-analyzer__form label {
	color: #111111;
	display: block;
	font-size: 14px;
	font-weight: 900;
	margin: 0 0 8px;
}

.mygs-nutrition-analyzer__form label:not(:first-child) {
	margin-top: 20px;
}

.mygs-nutrition-analyzer__form input[type="url"] {
	background: #ffffff;
	border: 1.5px solid #e9e9ef;
	border-radius: 12px;
	color: #1c1c22;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	outline: 0;
	padding: 13px 16px;
	transition: border-color 0.15s, box-shadow 0.15s;
	width: 100%;
}

.mygs-nutrition-analyzer__form input[type="url"]::placeholder {
	color: #9a9aa5;
}

.mygs-nutrition-analyzer__form input[type="url"]:focus {
	border-color: #111111;
	box-shadow: 0 0 0 4px rgba(35, 29, 91, 0.08);
}

.mygs-nutrition-analyzer__file-picker {
	align-items: center;
	border: 1.5px dashed #e9e9ef;
	border-radius: 12px;
	display: flex;
	gap: 14px;
	padding: 10px 14px;
	transition: border-color 0.15s;
}

.mygs-nutrition-analyzer__file-picker:hover {
	border-color: #111111;
}

.mygs-nutrition-analyzer__file-input {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.mygs-nutrition-analyzer__browse-files {
	background: #ffffff;
	border: 1.5px solid #1c1c22;
	border-radius: 999px;
	color: #1c1c22;
	cursor: pointer;
	flex: 0 0 auto;
	font: inherit;
	font-size: 13.5px;
	font-weight: 800;
	padding: 9px 22px;
	transition: background-color 0.15s, color 0.15s;
}

.mygs-nutrition-analyzer__browse-files:hover:not(:disabled) {
	background: #1c1c22;
	color: #ffffff;
}

.mygs-nutrition-analyzer__file-name {
	color: #9a9aa5;
	font-size: 14px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mygs-nutrition-analyzer__form > button[type="submit"] {
	background: #f47a2c;
	border: 0;
	border-radius: 999px;
	color: #ffffff;
	cursor: pointer;
	font: inherit;
	font-size: 15px;
	font-weight: 900;
	margin-top: 24px;
	padding: 15px;
	transition: box-shadow 0.15s, opacity 0.15s, transform 0.15s;
	width: 100%;
}

.mygs-nutrition-analyzer__form > button[type="submit"]:hover:not(:disabled) {
	box-shadow: 0 10px 22px rgba(35, 29, 91, 0.25);
	transform: translateY(-2px);
}

.mygs-nutrition-analyzer__form > button[type="submit"]:disabled,
.mygs-nutrition-analyzer__browse-files:disabled,
.mygs-nutrition-analyzer__sample:disabled,
.mygs-nutrition-analyzer__sample-refresh:disabled {
	cursor: progress;
	opacity: 0.6;
}

.mygs-nutrition-analyzer__loading-label {
	align-items: center;
	display: inline-flex;
	gap: 8px;
}

.mygs-nutrition-analyzer__spinner {
	animation: mygs-nutrition-analyzer-spin 0.8s linear infinite;
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-radius: 50%;
	border-top-color: #ffffff;
	display: inline-block;
	height: 16px;
	width: 16px;
}

@keyframes mygs-nutrition-analyzer-spin {
	to { transform: rotate(360deg); }
}

.mygs-nutrition-analyzer__samples {
	margin-top: 28px;
}

.mygs-nutrition-analyzer__samples-header {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin: 0 0 14px;
}

.mygs-nutrition-analyzer__samples-header h3,
.mygs-nutrition-analyzer__preview h3 {
	color: #111111;
	font-size: 20px;
	font-weight: 900;
	margin: 0;
}

.mygs-nutrition-analyzer__sample-refresh {
	align-items: center;
	background: #ffffff;
	border: 1.5px solid #1c1c22;
	border-radius: 50%;
	color: #1c1c22;
	cursor: pointer;
	display: inline-flex;
	height: 38px;
	justify-content: center;
	padding: 0;
	transition: background-color 0.15s, color 0.15s, transform 0.15s;
	width: 38px;
}

.mygs-nutrition-analyzer__sample-refresh:hover:not(:disabled) {
	background: #1c1c22;
	color: #ffffff;
	transform: rotate(180deg);
}

.mygs-nutrition-analyzer__sample-refresh svg {
	fill: none;
	height: 18px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
	width: 18px;
}

.mygs-nutrition-analyzer__sample-slider {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.mygs-nutrition-analyzer__sample {
	aspect-ratio: 1;
	background: #fafafd;
	border: 2px solid transparent;
	border-radius: 12px;
	cursor: pointer;
	height: 72px;
	overflow: hidden;
	padding: 0;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
	width: 72px;
}

.mygs-nutrition-analyzer__sample:hover:not(:disabled) {
	transform: translateY(-3px);
}

.mygs-nutrition-analyzer__sample.is-selected {
	border-color: #111111;
	box-shadow: 0 8px 18px rgba(35, 29, 91, 0.18);
}

.mygs-nutrition-analyzer__sample img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.mygs-nutrition-analyzer__samples > p {
	color: #9a9aa5;
	font-size: 14px;
	margin: 0;
}

.mygs-nutrition-analyzer__preview {
	padding: 26px;
}

.mygs-nutrition-analyzer__preview h3 {
	font-size: 22px;
	margin-bottom: 18px;
}

.mygs-nutrition-analyzer__preview > p {
	align-items: center;
	background: #fafafd;
	border-radius: 12px;
	color: #9a9aa5;
	display: flex;
	font-size: 14px;
	justify-content: center;
	margin: 0;
	min-height: 300px;
	padding: 24px;
	text-align: center;
}

.mygs-nutrition-analyzer__preview-figure {
	aspect-ratio: 1 / 1.05;
	background: #fafafd;
	border-radius: 12px;
	line-height: 0;
	overflow: hidden;
	width: 100%;
}

.mygs-nutrition-analyzer__preview-figure img {
	display: block;
	height: 100%;
	object-fit: contain;
	width: 100%;
}

.mygs-nutrition-analyzer__error {
	background: #fff1f1;
	border-left: 4px solid #cf222e;
	color: #82071e;
	margin: 28px 0 0;
	padding: 12px;
}

.mygs-nutrition-analyzer__results {
	display: grid;
	margin-top: 48px;
}

.mygs-nutrition-analyzer__recognition {
	display: grid;
	gap: 26px;
	min-width: 0;
	width: 100%;
}

.mygs-nutrition-analyzer__recognition > h3 {
	color: #111111;
	font-size: 28px;
	font-weight: 900;
	margin: 0;
}

.mygs-nutrition-analyzer__recognition-group {
	display: grid;
	gap: 12px;
}

.mygs-nutrition-analyzer__recognition-group h4 {
	color: #4b4b55;
	font-size: 14px;
	font-weight: 700;
	margin: 0;
}

.mygs-nutrition-analyzer__recognition-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.mygs-nutrition-analyzer__recognition-tag {
	align-items: center;
	background: #ffffff;
	border: 1.5px solid #e9e9ef;
	border-radius: 999px;
	color: #4b4b55;
	display: inline-flex;
	flex: 0 0 auto;
	font-size: 13.5px;
	font-weight: 800;
	justify-content: center;
	line-height: 1.2;
	min-height: 42px;
	padding: 10px 24px;
	text-align: center;
}

.mygs-nutrition-analyzer__recognition-tag--primary {
	background: #c9e94e;
	border-color: #c9e94e;
	color: #2a3305;
}

.mygs-nutrition-analyzer__recognition-tag--secondary {
	background: #1c1c22;
	border-color: #1c1c22;
	color: #ffffff;
}

.mygs-nutrition-analyzer__recognition-group--food-groups .mygs-nutrition-analyzer__recognition-tag {
	background: #c9e94e;
	border-color: #c9e94e;
	color: #2a3305;
}

.mygs-nutrition-analyzer__loading-screen {
	align-items: center;
	background: #fafafd;
	border: 1px solid #e9e9ef;
	border-radius: 16px;
	display: grid;
	gap: 14px;
	justify-items: center;
	min-height: 220px;
	padding: 28px;
	text-align: center;
}

.mygs-nutrition-analyzer__loading-screen .mygs-nutrition-analyzer__spinner {
	border-color: rgba(244, 122, 44, 0.22);
	border-top-color: #f47a2c;
	height: 34px;
	width: 34px;
}

.mygs-nutrition-analyzer__loading-screen strong {
	color: #111111;
	font-size: 18px;
	line-height: 1.2;
}

.mygs-nutrition-analyzer__loading-lines {
	display: grid;
	gap: 8px;
	max-width: 340px;
	width: 100%;
}

.mygs-nutrition-analyzer__loading-lines span {
	animation: mygs-nutrition-analyzer-pulse 1.15s ease-in-out infinite;
	background: #e9e9ef;
	border-radius: 999px;
	display: block;
	height: 10px;
	width: 100%;
}

.mygs-nutrition-analyzer__loading-lines span:nth-child(2) {
	animation-delay: 0.12s;
	width: 78%;
}

.mygs-nutrition-analyzer__loading-lines span:nth-child(3) {
	animation-delay: 0.24s;
	width: 56%;
}

@keyframes mygs-nutrition-analyzer-pulse {
	0%, 100% { opacity: 0.5; }
	50% { opacity: 1; }
}

.mygs-nutrition-analyzer__detections {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(280px, 380px));
	min-width: 0;
	width: 100%;
}

.mygs-nutrition-analyzer__detection-area {
	display: grid;
	gap: 16px;
	padding: 22px;
}

.mygs-nutrition-analyzer__detection-area-header {
	align-items: center;
	display: grid;
	gap: 14px;
	grid-template-columns: 58px minmax(0, 1fr);
}

.mygs-nutrition-analyzer__detection-area-header.has-no-crop {
	grid-template-columns: 1fr;
}

.mygs-nutrition-analyzer__area-crop {
	background: #fafafd;
	border-radius: 10px;
	line-height: 0;
	min-height: 58px;
	overflow: hidden;
	position: relative;
	width: 58px;
}

.mygs-nutrition-analyzer__area-crop img {
	display: block;
	max-width: none;
	object-fit: fill;
	position: absolute;
}

.mygs-nutrition-analyzer__detection-area h4 {
	color: #111111;
	font-size: 14px;
	font-weight: 800;
	margin: 0;
}

.mygs-nutrition-analyzer__detection {
	display: grid;
	gap: 7px;
	margin: 0;
	min-width: 0;
}

.mygs-nutrition-analyzer__detection-header {
	align-items: baseline;
	display: flex;
	font-size: 14px;
	font-weight: 800;
	gap: 12px;
	justify-content: space-between;
}

.mygs-nutrition-analyzer__detection-header strong {
	color: #1c1c22;
	font-weight: 800;
}

.mygs-nutrition-analyzer__detection-header span {
	color: #111111;
	flex: 0 0 auto;
}

.mygs-nutrition-analyzer__probability-track {
	background: #f0f0f5;
	border-radius: 999px;
	height: 8px;
	overflow: hidden;
	width: 100%;
}

.mygs-nutrition-analyzer__probability-bar {
	background: #111111;
	border-radius: inherit;
	height: 100%;
	min-width: 2px;
	transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.mygs-nutrition-analyzer__detection.is-primary .mygs-nutrition-analyzer__probability-bar { background: #c9e94e; }

@media (max-width: 860px) {
	.mygs-nutrition-analyzer__layout { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
	.mygs-nutrition-analyzer__controls,
	.mygs-nutrition-analyzer__preview { padding: 20px; }

	.mygs-nutrition-analyzer__file-picker {
		align-items: flex-start;
		flex-direction: column;
	}

	.mygs-nutrition-analyzer__file-name { max-width: 100%; }
	.mygs-nutrition-analyzer__recognition-tag { max-width: 100%; }
	.mygs-nutrition-analyzer__detections { grid-template-columns: 1fr; }
}
