.stacked-container {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 600px;
	margin: 0 auto;
}

.stacked-row {
	display: flex;
	flex-direction: column;
	gap: 12px;
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 16px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	margin-bottom: 5px;
}
.stacked-field {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 8px;
}

.stacked-field:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.field-label {
	font-weight: 600;
	color: #64748b;
	font-size: 14px;
}

.field-value {
	color: #1e293b;
	font-size: 14px;
}
.stacked-field-tr {
	justify-content: right;
}
.meal-type-title {
	margin: 5px 0;
	font-size: 1.2em;
}
.meal-type-wrap {
	margin-bottom: 20px;
}
.bb-weight-value,
.bb-weight-unit {
	color: #88aa22;
	font-weight: 600;
	white-space: nowrap;
}
#bb-log-manual-food-form {
	display: none;
}
#bb-log-manual-food {
	margin-top: 10px;
}
.bb-food-name-type > span {
	display: inline-block;
}
.bb-btn--primary {
	background-color: #88aa22;
	border-color: #88aa22;
}

.bb-btn--primary:hover {
	background-color: #76941d;
	border-color: #76941d;
}
.ajax-loader-search, .ajax-loader-adding-food, .ajax-loader-adding-meal {
	margin: 10px auto;
	text-align: center;
	display: none;
	flex: 1 1 100%;
}
.doing-search-ajax .ajax-loader-search {
	display: block;
}
.doing-adding-food-ajax .ajax-loader-adding-food {
	display: block;
}
.doing-adding-meal-ajax .ajax-loader-adding-meal {
	display: block;
}
.ajax-loader-search .icon, .ajax-loader-logging-manual-food .icon, .ajax-loader-adding-meal .icon {
	width: 48px;
	height: 48px;
	border: 5px solid #FFF;
	border-bottom-color: #4420ab;
	border-radius: 50%;
	display: inline-block;
	box-sizing: border-box;
	animation: rotation 1s linear infinite;
}
ul.ui-widget {
	z-index: 999999;
	width: 100%;
	max-height: 350px;
    overflow-y: scroll;
}
li .ui-state-active {
	background-color: inherit !important;
	color: inherit !important;
	border: none !important;
	font-weight: initial !important;
	margin: auto !important;
}
.ui-widget li {
	border-bottom: 1px solid #f1f5f9;
	padding: 10px;
}
.ui-widget li:hover {
	/*background-color: rgb(21, 90, 52, 0.2);*/
}
.bb-save-meal-controls {
	margin-top: 10px;
	display: none;
}
.bb-save-meal-btn {
	margin-top: 10px;
}
#bb-log-manual-food-form {
	margin-top: 10px;
}
.bb-meal-foods {
	padding-left: 10px;
	margin: 0 0 10px 0;
}
.bb-meal-foods small {
	display: block;
}
#bb-app-meal-log-heading {
	margin-top: 20px;
}
.btn-restricted {
	cursor: not-allowed;
}
@keyframes rotation {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
} 

#bb-your-journey,
#bb-calm-trends {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.bb-journey-period {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 1rem;
	box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.bb-journey-period h4 {
	margin: 0 0 .75rem;
	font-size: 1rem;
}

.bb-journey-change {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: .75rem;
}

.bb-journey-period p {
	margin: .25rem 0;
}

.bb-journey-arrow {
	font-size: 1.5rem;
	margin-right: 4px;
}

.bb-journey-value {
	font-weight: 700;
}

.bb-journey-period strong {
	display: inline-block;
	min-width: 90px;
}

.bb-journey-dates {
	font-size: 0.85rem;
	color: #6b7280;
	margin-bottom: 12px;
}

.bb-journey-section {
	margin-top: 2rem;
}

.bb-journey-section-title {
	margin-bottom: 1rem;
	font-size: 1.25rem;
	font-weight: 700;
}

.bb-journey-details {
	margin-top: 1rem;
}

.bb-journey-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: .5rem;
}

.bb-journey-table th,
.bb-journey-table td {
	padding: .5rem;
	border-bottom: 1px solid #e5e7eb;
	text-align: left;
}

#bb-explain-sheet {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    display: none;
}
.bb-explain-sheet-panel {
    z-index: 99999991;
}

.bb-explain-sheet-backdrop {
    z-index: 99999990;
}
.bb-explain-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.25);
}

.bb-explain-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    background: #fff;

    height: 60vh;

    border-radius: 24px 24px 0 0;

    padding: 24px;

    box-shadow: 0 -10px 30px rgba(0,0,0,.15);

    overflow-y: auto;
}

.bb-explain-sheet-handle {
    width: 48px;
    height: 5px;

    background: #d5d5d5;

    border-radius: 999px;

    margin: 0 auto 20px;
}

#bb-explain-sheet {
    isolation: isolate;
}

.bb-explain-topic {
    color: #88AA22;
    text-decoration: none;
    font-weight: 600;
}

.bb-explain-topic:hover {
    text-decoration: underline;
}

.bb-explain-topic::after {
    content: " ›";
}
    
.bb-explain-category {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef5d4;
    color: #6b8e23;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.bb-explain-header {
    position: sticky;
    top: 0;
    z-index: 10;

    background: #ffffff;

    padding-bottom: 12px;
    margin-bottom: 12px;

    border-bottom: 1px solid #e5e7eb;
}

.bb-explain-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#bb-explain-back {
    background: transparent;
    border: none;

    color: #88aa22;

    font-weight: 600;
    font-size: 14px;

    cursor: pointer;

    padding: 8px 0;
}

#bb-close-sheet {
    background: transparent;
    border: none;

    font-size: 22px;
    font-weight: 400;

    cursor: pointer;

    color: #64748b;

    padding: 4px 8px;
}

.bb-nhs-details {
    margin: 20px 0;
    border: 1px solid #d9e3f0;
    border-radius: 8px;
    overflow: hidden;
}

.bb-nhs-details summary {
    cursor: pointer;
    padding: 12px 16px;
    background: #f5f9ff;
    font-weight: 600;
    color: #005eb8;
}

.bb-nhs-details summary:hover {
    background: #ebf4ff;
}

.bb-nhs-details p,
.bb-nhs-details h4,
.bb-nhs-details .bb-nhs-text {
    padding-left: 16px;
    padding-right: 16px;
}

.bb-nhs-text {
    margin-bottom: 20px;
    line-height: 1.6;
    white-space: normal;
}

.bb-nhs-details h4 {
    margin-top: 20px;
    margin-bottom: 10px;
}

.bb-nhs-source-line {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
}

.bb-nhs-info-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #0f766e;
    font-size: 14px;
    padding: 0;
}

.bb-nhs-info-btn:hover {
    text-decoration: underline;
}

.bb-nhs-source-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
}

.bb-nhs-source-label {
    font-weight: 500;
}

.bb-nhs-info-btn {
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
    color: #005eb8;
    font-size: 14px;
    line-height: 1;
}

.bb-nhs-info-btn:hover {
    opacity: .8;
}

.bb-knowledge-trigger {
    border: 0;
    background: none;
    cursor: pointer;
    color: #005eb8;
    padding: 0;
    font-size: 13px;
    line-height: 1;
}

.bb-knowledge-trigger:hover {
    opacity: .8;
}

.bb-knowledge-trigger-wrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.bb-knowledge-link {
    color: #4422aa;
    cursor: pointer;
    font-weight: 600;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

.bb-knowledge-link:hover {
    color: #88aa22;
}

.bb-medicine-trigger {
    border: 0;
    background: none;
    cursor: pointer;
    color: #4422aa;
    padding: 0;
    font-size: 13px;
    line-height: 1;
}

.bb-medicine-trigger:hover {
    color: #88aa22;
}

.bb-medicine-trigger-wrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.bb-knowledge-relationships {
    background: #f8f9ff;
    border-left: 4px solid #4422aa;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 6px;
}

.bb-knowledge-relationships h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #4422aa;
}