mirror of
https://github.com/jamescliffordspratt/macros.git
synced 2026-07-22 12:40:29 +00:00
9374 lines
188 KiB
CSS
9374 lines
188 KiB
CSS
/* ==============================
|
|
* 1. GENERAL LAYOUT AND BASE STYLES
|
|
* ============================== */
|
|
|
|
.macros-container {
|
|
width: 100%;
|
|
margin-top: 1.5rem;
|
|
}
|
|
|
|
.macros-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--size-4-2);
|
|
margin-bottom: var(--size-4-4);
|
|
}
|
|
|
|
.macros-summary {
|
|
margin-bottom: var(--size-4-4);
|
|
}
|
|
|
|
.label-cell {
|
|
font-weight: bold;
|
|
text-align: center;
|
|
}
|
|
|
|
.is-hidden {
|
|
display: none;
|
|
}
|
|
|
|
.is-visible {
|
|
display: inline-flex;
|
|
}
|
|
|
|
.control-hidden {
|
|
display: none;
|
|
}
|
|
|
|
.control-visible {
|
|
display: block;
|
|
}
|
|
|
|
.control-inline-flex {
|
|
display: inline-flex;
|
|
}
|
|
|
|
.macro-flex-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.macro-space-between {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
width: 100%;
|
|
}
|
|
|
|
.macro-inline-calories {
|
|
margin-left: 0;
|
|
position: static;
|
|
}
|
|
|
|
.meal-header-left-content {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.meal-calorie-inline {
|
|
margin-left: 0;
|
|
position: static;
|
|
}
|
|
|
|
.macros-hidden {
|
|
display: none;
|
|
}
|
|
|
|
.macros-collapsed {
|
|
display: none;
|
|
}
|
|
|
|
.long-press-active {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.long-press-ready {
|
|
background-color: var(--background-modifier-success);
|
|
transform: scale(0.98);
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.no-select {
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
}
|
|
|
|
.icon-spacing {
|
|
margin-left: 6px;
|
|
margin-right: 2px;
|
|
}
|
|
|
|
/* ==============================
|
|
* 2. TABLE STYLING
|
|
* ============================== */
|
|
|
|
.macros-table {
|
|
table-layout: fixed;
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin: 1rem 0;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.macros-table tbody {
|
|
position: relative;
|
|
z-index: 2;
|
|
}
|
|
|
|
.macros-table td,
|
|
.macros-table th,
|
|
.macros-table .column-header {
|
|
vertical-align: middle;
|
|
text-align: center;
|
|
padding: 8px 12px;
|
|
min-height: 40px;
|
|
}
|
|
|
|
.macros-table th,
|
|
.macros-table .column-header {
|
|
background-color: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-weight: 600;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.macro-bold-cell {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.macros-table tr:nth-child(even) {
|
|
background-color: var(--background-secondary);
|
|
}
|
|
|
|
.macros-table tr:nth-child(odd) {
|
|
background-color: var(--background-primary);
|
|
}
|
|
|
|
.macros-table tr:not(.meal-header):not(.combined-totals-header):hover {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.macros-table tr {
|
|
position: relative;
|
|
transition: background-color 0.2s ease;
|
|
}
|
|
|
|
.macros-table tr:focus-within {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
z-index: 15;
|
|
}
|
|
|
|
.macros-table td[colspan='2'] {
|
|
text-align: center;
|
|
font-weight: 600;
|
|
position: relative;
|
|
}
|
|
|
|
.macros-table td:first-child {
|
|
text-align: left;
|
|
vertical-align: top;
|
|
padding-right: 8px;
|
|
max-width: 260px;
|
|
min-width: 140px;
|
|
width: 32%;
|
|
padding: 8px 6px;
|
|
min-height: 40px;
|
|
}
|
|
|
|
.macros-table td:not(:first-child),
|
|
.macros-table th:not(:first-child) {
|
|
vertical-align: middle;
|
|
text-align: center;
|
|
}
|
|
|
|
.macros-table td:first-child > div {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
width: 100%;
|
|
}
|
|
|
|
.macros-table td:first-child .remove-icon {
|
|
position: static;
|
|
margin-left: 10px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.macro-percentage {
|
|
font-size: 0.75rem;
|
|
opacity: 0.7;
|
|
font-weight: normal;
|
|
margin-left: 2px;
|
|
}
|
|
|
|
.macro-percentage::before {
|
|
content: '';
|
|
}
|
|
|
|
.macro-food-name-container {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
width: 100%;
|
|
min-height: 24px;
|
|
background: none;
|
|
border-radius: 0;
|
|
padding: 3px;
|
|
margin: 0;
|
|
gap: 4px;
|
|
position: relative;
|
|
}
|
|
|
|
.food-name-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 1px;
|
|
min-width: 0;
|
|
flex: 1;
|
|
max-width: calc(100% - 28px);
|
|
background: none;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.macro-food-name {
|
|
flex-shrink: 1;
|
|
min-width: 75px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
max-width: 100%;
|
|
font-weight: inherit;
|
|
color: inherit;
|
|
direction: ltr;
|
|
text-align: left;
|
|
background: none;
|
|
line-height: 1.3;
|
|
font-size: 0.9em;
|
|
width: 100%;
|
|
margin-right: 4px;
|
|
cursor: default;
|
|
}
|
|
|
|
.macro-food-name:not(:hover) {
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.macro-food-name[title] {
|
|
cursor: help;
|
|
}
|
|
|
|
.macro-food-remove-btn {
|
|
flex-shrink: 0;
|
|
min-width: 18px;
|
|
width: 18px;
|
|
height: 18px;
|
|
margin: 0;
|
|
opacity: 0.7;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 0.85em;
|
|
z-index: 2;
|
|
align-self: flex-start;
|
|
transition: all 0.2s ease;
|
|
cursor: pointer;
|
|
border-radius: 3px;
|
|
font-weight: bold;
|
|
color: var(--text-muted);
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.macro-food-remove-btn:hover {
|
|
opacity: 1;
|
|
background-color: var(--background-modifier-hover);
|
|
color: var(--text-error);
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.expanded-row {
|
|
display: table-row;
|
|
}
|
|
|
|
.collapsed-row {
|
|
display: none;
|
|
}
|
|
|
|
.expandable-section-hidden tr {
|
|
display: none;
|
|
}
|
|
|
|
.expandable-section-visible tr {
|
|
display: table-row;
|
|
}
|
|
|
|
.macros-table-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 12px;
|
|
padding: 8px 12px;
|
|
background-color: var(--background-secondary-alt);
|
|
border-radius: 4px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.macros-table-info {
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
font-size: 0.9rem;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.macros-table-id-label {
|
|
color: var(--text-muted);
|
|
font-weight: normal;
|
|
}
|
|
|
|
.macros-table-id {
|
|
opacity: 0.85;
|
|
}
|
|
|
|
.macros-table-controls {
|
|
display: flex;
|
|
gap: 10px;
|
|
align-items: center;
|
|
}
|
|
|
|
.table-row-visible {
|
|
display: table-row;
|
|
}
|
|
|
|
.table-row-hidden {
|
|
display: none;
|
|
}
|
|
|
|
.macros-table th:first-child,
|
|
.macros-table td:first-child {
|
|
width: 32%;
|
|
}
|
|
|
|
.macros-table th:nth-child(2),
|
|
.macros-table td:nth-child(2) {
|
|
width: 12%;
|
|
}
|
|
|
|
.macros-table th:nth-child(3),
|
|
.macros-table td:nth-child(3),
|
|
.macros-table th:nth-child(4),
|
|
.macros-table td:nth-child(4),
|
|
.macros-table th:nth-child(5),
|
|
.macros-table td:nth-child(5),
|
|
.macros-table th:nth-child(6),
|
|
.macros-table td:nth-child(6) {
|
|
width: 14%;
|
|
}
|
|
|
|
.macros-table tr.long-press-active {
|
|
background-color: var(--background-modifier-hover);
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
}
|
|
|
|
.macros-table tr.long-press-ready {
|
|
background-color: var(--text-error, #e74c3c);
|
|
color: white;
|
|
animation: long-press-pulse 0.6s ease-in-out infinite alternate;
|
|
}
|
|
|
|
.long-press-ready td {
|
|
color: white;
|
|
border-color: rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
tr[data-macro-line]:hover {
|
|
background-color: var(--background-modifier-hover-border);
|
|
}
|
|
|
|
.macro-food-name-container * {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.food-name-content,
|
|
.macro-food-name {
|
|
word-break: break-word;
|
|
overflow-wrap: break-word;
|
|
}
|
|
|
|
.food-name-content.has-comment-icon {
|
|
background: none;
|
|
background-color: transparent;
|
|
}
|
|
|
|
/* ==============================
|
|
* 3. SPECIAL ROWS & HEADERS
|
|
* ============================== */
|
|
|
|
.collapsible-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
padding: 8px 12px;
|
|
background-color: var(--background-secondary-alt);
|
|
border-radius: 4px;
|
|
user-select: none;
|
|
transition: background-color 0.2s ease;
|
|
margin-bottom: 1px;
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
}
|
|
|
|
.collapsible-header:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.meal-header-cell.collapsible-header {
|
|
display: table-cell;
|
|
width: 100%;
|
|
}
|
|
|
|
.macros-table .meal-header-cell[colspan='6'] {
|
|
width: 100%;
|
|
}
|
|
|
|
.header-content {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
width: 100%;
|
|
gap: 8px;
|
|
background: none;
|
|
}
|
|
|
|
.header-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
flex: 1;
|
|
min-width: 0;
|
|
background: none;
|
|
}
|
|
|
|
.header-label {
|
|
flex-shrink: 1;
|
|
min-width: 0;
|
|
overflow: visible;
|
|
text-overflow: unset;
|
|
white-space: normal;
|
|
background: none;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.header-calorie-summary {
|
|
flex-shrink: 0;
|
|
opacity: 0.8;
|
|
background: none;
|
|
color: var(--text-muted);
|
|
margin-left: 10px;
|
|
font-size: 0.9em;
|
|
font-weight: normal;
|
|
}
|
|
|
|
.meal-header,
|
|
.combined-totals-header {
|
|
background-color: var(--background-modifier-form-field);
|
|
color: var(--text-normal);
|
|
font-weight: 700;
|
|
text-align: center;
|
|
position: relative;
|
|
width: 100%;
|
|
display: table-row;
|
|
border: none;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.meal-header {
|
|
font-size: 1.1rem;
|
|
padding: 0.7rem 1rem;
|
|
border-bottom: none;
|
|
border-top: none;
|
|
}
|
|
|
|
.meal-header-cell {
|
|
padding: 0;
|
|
background-color: var(--background-secondary-alt);
|
|
}
|
|
|
|
.meal-header-cell:hover,
|
|
.meal-header-cell.collapsible-header:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.meal-header-cell.has-comment-icon {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.meal-calorie-summary {
|
|
font-size: 0.95rem;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
opacity: 0.9;
|
|
margin-left: 10px;
|
|
position: static;
|
|
right: auto;
|
|
top: auto;
|
|
transform: none;
|
|
}
|
|
|
|
.combined-totals-header {
|
|
padding: 0.7rem 1rem;
|
|
border-top: none;
|
|
}
|
|
|
|
.combined-totals-header .meal-header-cell {
|
|
background-color: var(--background-secondary-alt);
|
|
}
|
|
|
|
.meal-header-content {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
width: 100%;
|
|
}
|
|
|
|
.meal-header-content > div:first-child {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.meal-name {
|
|
font-weight: 700;
|
|
}
|
|
|
|
.totals-row,
|
|
.targets-row,
|
|
.remaining-row {
|
|
width: 100%;
|
|
display: table-row;
|
|
}
|
|
|
|
.totals-row td:first-child,
|
|
.targets-row td:first-child,
|
|
.remaining-row td:first-child {
|
|
text-align: center;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.remaining-row {
|
|
border-top: 1px dotted var(--background-modifier-border);
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.remaining-row td.exceeded {
|
|
color: var(--text-error);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.remaining-row td.exceeded div {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
gap: 4px;
|
|
}
|
|
|
|
.editable-quantity {
|
|
cursor: pointer;
|
|
position: relative;
|
|
transition: background-color 0.2s ease;
|
|
padding: 6px 8px;
|
|
border-radius: 4px;
|
|
border: 1px dashed transparent;
|
|
}
|
|
|
|
.editable-quantity:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
border-color: var(--background-modifier-border);
|
|
}
|
|
|
|
.editable-quantity:after {
|
|
content: '✎';
|
|
position: absolute;
|
|
right: 4px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
font-size: 0.8rem;
|
|
opacity: 0;
|
|
color: var(--text-accent);
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
.editable-quantity:hover:after {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.editable-quantity input {
|
|
font-family: var(--font-interface);
|
|
background-color: var(--background-primary);
|
|
color: var(--text-normal);
|
|
border: 1px solid var(--interactive-accent);
|
|
border-radius: 3px;
|
|
width: 70px;
|
|
padding: 4px 8px;
|
|
font-size: 1em;
|
|
}
|
|
|
|
.editable-quantity input:focus {
|
|
outline: none;
|
|
box-shadow: 0 0 0 2px rgba(var(--interactive-accent-rgb), 0.2);
|
|
}
|
|
|
|
.quantity-updating {
|
|
color: var(--text-accent);
|
|
font-style: italic;
|
|
}
|
|
|
|
.quantity-error {
|
|
color: var(--text-error);
|
|
font-style: italic;
|
|
}
|
|
|
|
.header-left.has-comment-icon {
|
|
background: none;
|
|
background-color: transparent;
|
|
}
|
|
|
|
.header-text-desktop {
|
|
display: inline;
|
|
}
|
|
|
|
.header-text-mobile {
|
|
display: none;
|
|
}
|
|
|
|
/* ==============================
|
|
* 4. MACRO INDICATORS AND COLORS
|
|
* ============================== */
|
|
|
|
:root {
|
|
--calories-color: #e8962b;
|
|
}
|
|
|
|
.protein-cell,
|
|
.fat-cell,
|
|
.carbs-cell,
|
|
.calories-cell {
|
|
position: relative;
|
|
}
|
|
|
|
.protein-cell::before,
|
|
.fat-cell::before,
|
|
.carbs-cell::before,
|
|
.calories-cell::before {
|
|
content: '';
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 4px;
|
|
}
|
|
|
|
.protein-cell::before {
|
|
background-color: var(--protein-color, #4caf50);
|
|
}
|
|
|
|
.fat-cell::before {
|
|
background-color: var(--fat-color, #f44336);
|
|
}
|
|
|
|
.carbs-cell::before {
|
|
background-color: var(--carbs-color, #2196f3);
|
|
}
|
|
|
|
.calories-cell::before {
|
|
background-color: var(--calories-color, #e8962b);
|
|
}
|
|
|
|
.macros-table th.protein-cell::before,
|
|
.macros-table .column-header.protein-cell::before {
|
|
background-color: var(--protein-color, #4caf50);
|
|
}
|
|
|
|
.macros-table th.fat-cell::before,
|
|
.macros-table .column-header.fat-cell::before {
|
|
background-color: var(--fat-color, #f44336);
|
|
}
|
|
|
|
.macros-table th.carbs-cell::before,
|
|
.macros-table .column-header.carbs-cell::before {
|
|
background-color: var(--carbs-color, #2196f3);
|
|
}
|
|
|
|
.macros-table th.calories-cell::before,
|
|
.macros-table .column-header.calories-cell::before {
|
|
background-color: var(--calories-color, #e8962b);
|
|
}
|
|
|
|
.macro-color-indicator {
|
|
--indicator-color: transparent;
|
|
background-color: var(--indicator-color);
|
|
}
|
|
|
|
/* ==============================
|
|
* 5. PROGRESS BARS
|
|
* ============================== */
|
|
|
|
.macro-progress-container,
|
|
.target-progress-container,
|
|
.daily-target-indicator,
|
|
.macro-metric-progress-container {
|
|
width: 100%;
|
|
height: 8px;
|
|
overflow: hidden;
|
|
background-color: var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
margin-top: 4px;
|
|
margin-bottom: 2px;
|
|
box-sizing: border-box;
|
|
position: relative;
|
|
}
|
|
|
|
.target-progress-container {
|
|
position: relative;
|
|
}
|
|
|
|
.macro-progress-bar,
|
|
.target-bar,
|
|
.target-progress,
|
|
.macro-metric-progress-bar {
|
|
height: 100%;
|
|
border-radius: inherit;
|
|
transition:
|
|
width 0.3s ease,
|
|
background-color 0.3s ease,
|
|
box-shadow 0.3s ease;
|
|
}
|
|
|
|
.macro-progress-bar[data-min-width='true'],
|
|
.progress-bar-with-width[data-min-width='true'],
|
|
.micro-value {
|
|
min-width: 5px;
|
|
}
|
|
|
|
.progress-width-5px {
|
|
width: 5px;
|
|
}
|
|
|
|
.progress-width-0 {
|
|
width: 0%;
|
|
}
|
|
.progress-width-5 {
|
|
width: 5%;
|
|
}
|
|
.progress-width-10 {
|
|
width: 10%;
|
|
}
|
|
.progress-width-15 {
|
|
width: 15%;
|
|
}
|
|
.progress-width-20 {
|
|
width: 20%;
|
|
}
|
|
.progress-width-25 {
|
|
width: 25%;
|
|
}
|
|
.progress-width-30 {
|
|
width: 30%;
|
|
}
|
|
.progress-width-35 {
|
|
width: 35%;
|
|
}
|
|
.progress-width-40 {
|
|
width: 40%;
|
|
}
|
|
.progress-width-45 {
|
|
width: 45%;
|
|
}
|
|
.progress-width-50 {
|
|
width: 50%;
|
|
}
|
|
.progress-width-55 {
|
|
width: 55%;
|
|
}
|
|
.progress-width-60 {
|
|
width: 60%;
|
|
}
|
|
.progress-width-65 {
|
|
width: 65%;
|
|
}
|
|
.progress-width-70 {
|
|
width: 70%;
|
|
}
|
|
.progress-width-75 {
|
|
width: 75%;
|
|
}
|
|
.progress-width-80 {
|
|
width: 80%;
|
|
}
|
|
.progress-width-85 {
|
|
width: 85%;
|
|
}
|
|
.progress-width-90 {
|
|
width: 90%;
|
|
}
|
|
.progress-width-95 {
|
|
width: 95%;
|
|
}
|
|
.progress-width-100 {
|
|
width: 100%;
|
|
}
|
|
|
|
.protein-progress,
|
|
.protein-target {
|
|
background-color: var(--protein-color, #4caf50);
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.fat-progress,
|
|
.fat-target {
|
|
background-color: var(--fat-color, #f44336);
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.carbs-progress,
|
|
.carbs-target {
|
|
background-color: var(--carbs-color, #2196f3);
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.calories-progress,
|
|
.calories-target {
|
|
background-color: var(--calories-color, #e8962b);
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.protein-progress.near-target,
|
|
.protein-target.near-target {
|
|
background-color: var(--protein-color, #4caf50);
|
|
opacity: 0.9;
|
|
box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
|
|
}
|
|
|
|
.fat-progress.near-target,
|
|
.fat-target.near-target {
|
|
background-color: var(--fat-color, #f44336);
|
|
opacity: 0.9;
|
|
box-shadow: 0 0 8px rgba(244, 67, 54, 0.4);
|
|
}
|
|
|
|
.carbs-progress.near-target,
|
|
.carbs-target.near-target {
|
|
background-color: var(--carbs-color, #2196f3);
|
|
opacity: 0.9;
|
|
box-shadow: 0 0 8px rgba(33, 150, 243, 0.4);
|
|
}
|
|
|
|
.calories-progress.near-target,
|
|
.calories-target.near-target {
|
|
background-color: var(--calories-color, #e8962b);
|
|
opacity: 0.9;
|
|
box-shadow: 0 0 8px rgba(255, 152, 0, 0.4);
|
|
}
|
|
|
|
.protein-progress.over-target,
|
|
.protein-target.over-target,
|
|
.fat-progress.over-target,
|
|
.fat-target.over-target,
|
|
.carbs-progress.over-target,
|
|
.carbs-target.over-target,
|
|
.calories-progress.over-target,
|
|
.calories-target.over-target {
|
|
background-image: linear-gradient(
|
|
45deg,
|
|
rgba(255, 255, 255, 0.2) 25%,
|
|
transparent 25%,
|
|
transparent 50%,
|
|
rgba(255, 255, 255, 0.2) 50%,
|
|
rgba(255, 255, 255, 0.2) 75%,
|
|
transparent 75%,
|
|
transparent
|
|
);
|
|
background-size: 20px 20px;
|
|
opacity: 1;
|
|
}
|
|
|
|
.protein-progress.over-target,
|
|
.protein-target.over-target {
|
|
background-color: var(--protein-color, #4caf50);
|
|
}
|
|
|
|
.fat-progress.over-target,
|
|
.fat-target.over-target {
|
|
background-color: var(--fat-color, #f44336);
|
|
}
|
|
|
|
.carbs-progress.over-target,
|
|
.carbs-target.over-target {
|
|
background-color: var(--carbs-color, #2196f3);
|
|
}
|
|
|
|
.calories-progress.over-target,
|
|
.calories-target.over-target {
|
|
background-color: var(--calories-color, #e8962b);
|
|
}
|
|
|
|
.macro-metric-target-indicator {
|
|
position: absolute;
|
|
height: 10px;
|
|
width: 2px;
|
|
background-color: var(--text-muted);
|
|
top: -1px;
|
|
transform: translateX(-50%);
|
|
}
|
|
|
|
.target-indicator-full {
|
|
left: 100%;
|
|
}
|
|
|
|
.overflow-indicator {
|
|
position: absolute;
|
|
right: -35px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
color: var(--text-normal);
|
|
background-color: var(--background-secondary-alt);
|
|
padding: 2px 5px;
|
|
border-radius: 4px;
|
|
font-size: 0.7rem;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.macro-pie-progress-bar {
|
|
--progress-color: transparent;
|
|
--progress-width: 0%;
|
|
background-color: var(--progress-color);
|
|
width: var(--progress-width);
|
|
}
|
|
|
|
.pie-progress-width-0 {
|
|
--progress-width: 0%;
|
|
}
|
|
.pie-progress-width-1 {
|
|
--progress-width: 1%;
|
|
}
|
|
.pie-progress-width-5 {
|
|
--progress-width: 5%;
|
|
}
|
|
.pie-progress-width-10 {
|
|
--progress-width: 10%;
|
|
}
|
|
.pie-progress-width-15 {
|
|
--progress-width: 15%;
|
|
}
|
|
.pie-progress-width-20 {
|
|
--progress-width: 20%;
|
|
}
|
|
.pie-progress-width-25 {
|
|
--progress-width: 25%;
|
|
}
|
|
.pie-progress-width-30 {
|
|
--progress-width: 30%;
|
|
}
|
|
.pie-progress-width-35 {
|
|
--progress-width: 35%;
|
|
}
|
|
.pie-progress-width-40 {
|
|
--progress-width: 40%;
|
|
}
|
|
.pie-progress-width-45 {
|
|
--progress-width: 45%;
|
|
}
|
|
.pie-progress-width-50 {
|
|
--progress-width: 50%;
|
|
}
|
|
.pie-progress-width-55 {
|
|
--progress-width: 55%;
|
|
}
|
|
.pie-progress-width-60 {
|
|
--progress-width: 60%;
|
|
}
|
|
.pie-progress-width-65 {
|
|
--progress-width: 65%;
|
|
}
|
|
.pie-progress-width-70 {
|
|
--progress-width: 70%;
|
|
}
|
|
.pie-progress-width-75 {
|
|
--progress-width: 75%;
|
|
}
|
|
.pie-progress-width-80 {
|
|
--progress-width: 80%;
|
|
}
|
|
.pie-progress-width-85 {
|
|
--progress-width: 85%;
|
|
}
|
|
.pie-progress-width-90 {
|
|
--progress-width: 90%;
|
|
}
|
|
.pie-progress-width-95 {
|
|
--progress-width: 95%;
|
|
}
|
|
.pie-progress-width-100 {
|
|
--progress-width: 100%;
|
|
}
|
|
|
|
/* ==============================
|
|
* 6. DATA LABELS & TOOLTIPS
|
|
* ============================== */
|
|
|
|
.macro-tooltip {
|
|
position: fixed;
|
|
left: var(--x, -9999px);
|
|
top: var(--y, -9999px);
|
|
transform: translateX(-50%) translateY(0px) scale(0.95);
|
|
z-index: 9999;
|
|
background-color: var(--background-modifier-border-hover);
|
|
color: var(--text-normal);
|
|
padding: 6px 12px;
|
|
border-radius: 8px;
|
|
pointer-events: none;
|
|
font-size: var(--font-small);
|
|
font-weight: 500;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
|
|
max-width: 250px;
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
transition:
|
|
opacity 150ms ease,
|
|
transform 150ms ease,
|
|
visibility 0ms linear 150ms;
|
|
}
|
|
|
|
.tooltip-visible {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
transform: translateX(-50%) translateY(6px) scale(1);
|
|
transition-delay: 0ms;
|
|
}
|
|
|
|
.macro-tooltip-hidden {
|
|
display: none;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.macro-tooltip-positioned {
|
|
display: block;
|
|
}
|
|
|
|
.macro-tooltip-mobile {
|
|
background-color: rgba(0, 0, 0, 0.9);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
|
|
z-index: 10000;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.context-menu-open .macro-tooltip {
|
|
display: none;
|
|
}
|
|
|
|
/* ==============================
|
|
* 7. BUTTONS & CONTROLS
|
|
* ============================== */
|
|
|
|
.macros-btn,
|
|
.macros-plus-button,
|
|
.remove-item-button,
|
|
.macros-control-icon {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.macros-control-icon {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 30px;
|
|
height: 30px;
|
|
border-radius: 4px;
|
|
color: var(--text-muted);
|
|
transition:
|
|
background-color 0.2s ease,
|
|
color 0.2s ease;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.macros-control-icon:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.add-icon {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.collapse-all-icon,
|
|
.remove-icon {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.remove-item-button {
|
|
font-size: 1.2rem;
|
|
padding: 0.1rem 0.4rem;
|
|
margin-left: 0.5rem;
|
|
background-color: transparent;
|
|
color: var(--text-muted);
|
|
border-radius: 4px;
|
|
border: none;
|
|
transition:
|
|
background-color 0.2s ease,
|
|
color 0.2s ease;
|
|
width: 28px;
|
|
height: 28px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.remove-item-button:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.meal-header .remove-item-button {
|
|
font-size: 0.9rem;
|
|
background-color: var(--background-modifier-error);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.macros-btn-plus {
|
|
font-size: 1.2em;
|
|
}
|
|
|
|
.macros-btn-remove {
|
|
margin-left: var(--size-4-2);
|
|
}
|
|
|
|
.macros-btn-small-remove {
|
|
margin-left: var(--size-4-1);
|
|
}
|
|
|
|
.macros-btn-action {
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.macros-plus-button {
|
|
font-size: 1.2em;
|
|
border: none;
|
|
background: transparent;
|
|
color: var(--text-normal);
|
|
padding: var(--size-2-1) var(--size-4-2);
|
|
}
|
|
|
|
/* ==============================
|
|
* 8. PIE CHART COMPONENTS
|
|
* ============================== */
|
|
|
|
.macro-dashboard-flex-container {
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
opacity: 1;
|
|
max-height: 1000px;
|
|
transition: all 0.3s ease;
|
|
gap: 20px;
|
|
}
|
|
|
|
.macro-dashboard-flex-container.collapsed {
|
|
display: none;
|
|
opacity: 0;
|
|
max-height: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.settings-preview-canvas {
|
|
width: 300px;
|
|
height: 300px;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.chart-preview-error {
|
|
text-align: center;
|
|
padding: 10px;
|
|
color: var(--text-error);
|
|
background-color: var(--background-modifier-error-rgb, rgba(226, 85, 77, 0.1));
|
|
border-radius: 5px;
|
|
margin-top: 10px;
|
|
font-style: italic;
|
|
}
|
|
|
|
.macrospc-container .macro-dashboard-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
cursor: pointer;
|
|
padding: 8px 12px;
|
|
background-color: var(--background-secondary-alt);
|
|
border-radius: 4px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
.macrospc-container .macroscalc-header-content {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
width: 100%;
|
|
}
|
|
|
|
.macrospc-container .macroscalc-header-title {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.macrospc-container .macroscalc-toggle-button {
|
|
width: 24px;
|
|
height: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
position: relative;
|
|
}
|
|
|
|
.macrospc-container .macro-space-between {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
width: 100%;
|
|
padding: 0 10px;
|
|
}
|
|
|
|
.macrospc-container .macro-pie-chart-container {
|
|
flex: 0 0 auto;
|
|
width: 300px;
|
|
height: 300px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
margin: 0;
|
|
padding: 12px 16px;
|
|
position: relative;
|
|
box-sizing: border-box;
|
|
margin-left: 18px;
|
|
}
|
|
|
|
.macro-pie-chart-container:not(.macrospc-container .macro-pie-chart-container) {
|
|
flex: 0 0 auto;
|
|
min-width: 200px;
|
|
max-width: 300px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: 10px 0;
|
|
position: relative;
|
|
}
|
|
|
|
.macrospc-container .macro-pie-chart-summary-container {
|
|
flex: 1;
|
|
min-width: 200px;
|
|
max-width: 400px;
|
|
min-height: 300px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 5px;
|
|
background-color: var(--background-secondary);
|
|
border-radius: 8px;
|
|
padding: 12px 16px;
|
|
box-sizing: border-box;
|
|
justify-content: center;
|
|
}
|
|
|
|
.macro-pie-chart-summary-container:not(.macrospc-container .macro-pie-chart-summary-container) {
|
|
flex: 1;
|
|
min-width: 200px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 5px;
|
|
background-color: var(--background-secondary);
|
|
border-radius: 8px;
|
|
padding: 12px 16px;
|
|
}
|
|
|
|
.macro-summary-total-calories {
|
|
margin-bottom: 10px;
|
|
font-size: 1.1em;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.macro-summary-item {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 8px;
|
|
padding: 4px 0;
|
|
}
|
|
|
|
.macro-summary-label {
|
|
font-weight: bold;
|
|
min-width: 70px;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.macro-pie-progress-container {
|
|
flex: 1;
|
|
position: relative;
|
|
height: 22px;
|
|
background-color: var(--background-primary);
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.macro-pie-progress-bar {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
height: 100%;
|
|
opacity: 0.2;
|
|
}
|
|
|
|
.macro-pie-progress-text {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
padding-left: 10px;
|
|
font-size: 0.9em;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.macrospc-label {
|
|
font-size: 0.95em;
|
|
font-weight: 500;
|
|
color: var(--text-muted);
|
|
margin-bottom: 6px;
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.macrospc-loading {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
}
|
|
|
|
.macrospc-error {
|
|
color: var(--text-error);
|
|
padding: 10px;
|
|
border-left: 3px solid var(--text-error);
|
|
background: var(--background-secondary);
|
|
}
|
|
|
|
.macrospc-legend-container {
|
|
margin-top: 10px;
|
|
padding: 8px;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.macrospc-legend-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.macrospc-legend-color-box {
|
|
width: 12px;
|
|
height: 12px;
|
|
border-radius: 2px;
|
|
display: inline-block;
|
|
}
|
|
|
|
.macrospc-legend-color-box[data-color] {
|
|
background-color: var(--box-color, #cccccc);
|
|
}
|
|
|
|
[data-color='#4caf50'] {
|
|
--box-color: #4caf50;
|
|
}
|
|
[data-color='#f44336'] {
|
|
--box-color: #f44336;
|
|
}
|
|
[data-color='#2196f3'] {
|
|
--box-color: #2196f3;
|
|
}
|
|
[data-color='#ff9800'] {
|
|
--box-color: #ff9800;
|
|
}
|
|
|
|
/* ==============================
|
|
* 9. LISTS
|
|
* ============================== */
|
|
|
|
.meal-item-list {
|
|
list-style-type: none;
|
|
padding-left: 0;
|
|
}
|
|
|
|
.meal-item-label {
|
|
margin-right: 0.5rem;
|
|
}
|
|
|
|
.remove-meal-item-button,
|
|
.remove-meal-button {
|
|
margin-left: 0.5rem;
|
|
}
|
|
|
|
.macros-list {
|
|
list-style-type: none;
|
|
padding-left: 0;
|
|
}
|
|
|
|
.macros-list-item {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: var(--size-4-1);
|
|
}
|
|
|
|
.macros-list-item-label {
|
|
margin-right: var(--size-4-2);
|
|
}
|
|
|
|
/* ==============================
|
|
* 10. SETTINGS
|
|
* ============================== */
|
|
|
|
.edit-meal-row,
|
|
.add-food-row,
|
|
.add-to-macros-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.finish-meal-edit-button,
|
|
.confirm-changes-button {
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.macros-settings-section {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.setting-item {
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
padding: 12px 0;
|
|
}
|
|
|
|
.setting-item:first-of-type {
|
|
border-top: none;
|
|
}
|
|
|
|
.NutritionalSettingTab h3 {
|
|
margin-top: 1.5rem;
|
|
margin-bottom: 0.8rem;
|
|
padding-bottom: 0.3rem;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
color: var(--text-accent);
|
|
}
|
|
|
|
.setting-item-description {
|
|
color: var(--text-muted);
|
|
margin-bottom: 1rem;
|
|
font-style: italic;
|
|
}
|
|
|
|
.macrospc-color-picker {
|
|
width: 32px;
|
|
height: 32px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
margin-left: 10px;
|
|
vertical-align: middle;
|
|
padding: 0;
|
|
background-color: transparent;
|
|
}
|
|
|
|
.macrospc-preview-container {
|
|
background-color: var(--background-secondary);
|
|
border-radius: 8px;
|
|
padding: 1rem;
|
|
margin: 1rem 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
|
|
.macrospc-preview-container canvas {
|
|
width: 300px;
|
|
height: 300px;
|
|
max-width: 100%;
|
|
display: block;
|
|
}
|
|
|
|
.macrospc-preview-container h4 {
|
|
margin-top: 0;
|
|
margin-bottom: 0.8rem;
|
|
}
|
|
|
|
.macrospc-api-notice {
|
|
background-color: var(--background-secondary);
|
|
border-left: 4px solid var(--text-accent);
|
|
padding: 10px 15px;
|
|
margin: 1rem 0;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.macrospc-api-notice p {
|
|
margin: 0.5rem 0;
|
|
}
|
|
|
|
.macrospc-api-notice a {
|
|
color: var(--text-accent);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.macrospc-api-notice a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.note-text {
|
|
font-style: italic;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.meal-templates-container {
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.no-templates-message {
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
padding: 0.8rem;
|
|
text-align: center;
|
|
background-color: var(--background-secondary);
|
|
border-radius: 4px;
|
|
margin: 1rem 0;
|
|
}
|
|
|
|
.api-credentials-warning {
|
|
color: var(--text-error);
|
|
font-weight: var(--font-weight-medium);
|
|
background-color: var(--background-modifier-error-hover);
|
|
border: 1px solid var(--background-modifier-error);
|
|
border-radius: var(--radius-s);
|
|
padding: var(--size-4-2);
|
|
margin: var(--size-4-2) 0;
|
|
}
|
|
|
|
.api-credentials-success {
|
|
color: var(--text-success);
|
|
font-weight: var(--font-weight-medium);
|
|
background-color: var(--background-modifier-success-hover);
|
|
border: 1px solid var(--background-modifier-success);
|
|
border-radius: var(--radius-s);
|
|
padding: var(--size-4-2);
|
|
margin: var(--size-4-2) 0;
|
|
}
|
|
|
|
.dual-energy-inputs {
|
|
display: flex;
|
|
gap: 16px;
|
|
align-items: flex-end;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.energy-input-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
min-width: 120px;
|
|
}
|
|
|
|
.energy-input-label {
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
color: var(--text-muted);
|
|
margin: 0;
|
|
min-width: 30px;
|
|
text-align: right;
|
|
}
|
|
|
|
.energy-input {
|
|
width: 80px;
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.energy-input:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 2px var(--interactive-accent-hover);
|
|
}
|
|
|
|
.energy-fields-container {
|
|
display: flex;
|
|
gap: 1rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.energy-field {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.energy-field .form-label,
|
|
.energy-label-bold {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.energy-fields-container .form-label {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.energy-field .form-label {
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
margin-bottom: 0.5rem;
|
|
display: block;
|
|
}
|
|
|
|
.energy-field .form-input {
|
|
width: 100%;
|
|
padding: 0.5rem;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
background-color: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.energy-field .form-input:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 2px var(--interactive-accent-rgb);
|
|
}
|
|
|
|
.energy-info {
|
|
margin-top: 0.5rem;
|
|
padding: 0.75rem;
|
|
background-color: var(--background-secondary);
|
|
border-radius: 4px;
|
|
border-left: 3px solid var(--interactive-accent);
|
|
}
|
|
|
|
.energy-note {
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
margin: 0;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
/* ==============================
|
|
* 11. MACRO DASHBOARD
|
|
* ============================== */
|
|
|
|
.macro-dashboard {
|
|
margin-top: 1rem;
|
|
margin-bottom: 20px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
overflow: hidden;
|
|
background-color: var(--background-primary);
|
|
}
|
|
|
|
.macro-dashboard-header {
|
|
background-color: var(--background-secondary-alt);
|
|
padding: 6px 10px;
|
|
font-weight: 700;
|
|
font-size: 1.1rem;
|
|
border-bottom: none;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.macro-dashboard-content {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
padding: 10px;
|
|
gap: 12px;
|
|
}
|
|
|
|
.macro-metric-card {
|
|
flex: 1;
|
|
min-width: 100px;
|
|
padding: 10px;
|
|
border-radius: 5px;
|
|
background-color: var(--background-secondary);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 5px;
|
|
}
|
|
|
|
.macro-metric-label {
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
font-weight: bold;
|
|
}
|
|
|
|
.macro-metric-value-container {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: baseline;
|
|
}
|
|
|
|
.macro-metric-value {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.macro-metric-percentage {
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* ==============================
|
|
* 12. COLLAPSIBLE SECTIONS
|
|
* ============================== */
|
|
|
|
.collapsible {
|
|
cursor: pointer;
|
|
position: relative;
|
|
transition: background-color 0.2s ease;
|
|
}
|
|
|
|
.meal-header .collapsible:hover,
|
|
.combined-totals-header:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.collapsible-content {
|
|
transition:
|
|
max-height 0.3s ease,
|
|
opacity 0.3s ease;
|
|
overflow: hidden;
|
|
opacity: 1;
|
|
max-height: 1000px;
|
|
}
|
|
|
|
.collapsed + .collapsible-content {
|
|
opacity: 0;
|
|
max-height: 0;
|
|
}
|
|
|
|
/* ==============================
|
|
* 13. LIVE SEARCH MODAL
|
|
* ============================== */
|
|
|
|
.live-food-search-modal {
|
|
max-width: 550px;
|
|
width: 100%;
|
|
}
|
|
|
|
.macros-search-container {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.live-search-input {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
font-size: 1rem;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
background-color: var(--background-primary);
|
|
color: var(--text-normal);
|
|
transition:
|
|
border-color 0.2s ease,
|
|
box-shadow 0.2s ease;
|
|
}
|
|
|
|
.live-search-input:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 2px rgba(var(--interactive-accent-rgb), 0.25);
|
|
}
|
|
|
|
.macros-loading-indicator,
|
|
.macros-no-results-message {
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
text-align: center;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.macros-loading-indicator {
|
|
padding: 0.5rem;
|
|
}
|
|
|
|
.macros-no-results-message {
|
|
padding: 1.5rem;
|
|
border: 1px dashed var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.macros-results-container {
|
|
max-height: 500px;
|
|
overflow-y: auto;
|
|
margin-bottom: 1rem;
|
|
border-radius: 6px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
background-color: var(--background-primary);
|
|
}
|
|
|
|
.macros-results-container::-webkit-scrollbar {
|
|
width: 8px;
|
|
height: 8px;
|
|
}
|
|
|
|
.macros-results-container::-webkit-scrollbar-thumb {
|
|
background: var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.macros-results-container::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
.macros-results-container:empty {
|
|
border: none;
|
|
}
|
|
|
|
.macros-results-container::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.macros-results-container::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
.macros-results-container::-webkit-scrollbar-thumb {
|
|
background-color: var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.food-result-item {
|
|
padding: 0.8rem 1rem;
|
|
margin: 0;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
background-color: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-size: 0.95rem;
|
|
line-height: 1.5;
|
|
cursor: pointer;
|
|
white-space: normal;
|
|
overflow-wrap: break-word;
|
|
word-break: break-word;
|
|
transition: background-color 0.15s ease;
|
|
}
|
|
|
|
.food-result-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.food-result-item:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.food-result-item strong {
|
|
color: var(--text-accent);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.highlighted-result {
|
|
background-color: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.highlighted-result strong {
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.food-nav {
|
|
margin-top: var(--size-4-4);
|
|
}
|
|
|
|
/* ==============================
|
|
* 14. MACROSCALC STYLING
|
|
* ============================== */
|
|
|
|
.macroscalc-container {
|
|
margin-bottom: 1rem;
|
|
border-radius: 6px;
|
|
overflow: hidden;
|
|
transition:
|
|
opacity 0.3s ease,
|
|
max-height 0.3s ease;
|
|
}
|
|
|
|
.macroscalc-header-container {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 3px;
|
|
width: 100%;
|
|
}
|
|
|
|
.macroscalc-dashboard-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
cursor: pointer;
|
|
padding: 8px 12px;
|
|
background-color: var(--background-secondary-alt);
|
|
border-radius: 4px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
margin-bottom: 10px;
|
|
transition: background-color 0.2s ease;
|
|
user-select: none;
|
|
}
|
|
|
|
.macroscalc-dashboard-header:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.macroscalc-header-content {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
width: 100%;
|
|
}
|
|
|
|
.macroscalc-header-title {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.macroscalc-dashboard-content {
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
margin-top: 10px;
|
|
opacity: 1;
|
|
max-height: 1000px;
|
|
overflow: visible;
|
|
}
|
|
|
|
.macroscalc-dashboard-content.collapsed {
|
|
opacity: 0;
|
|
max-height: 0;
|
|
overflow: hidden;
|
|
margin: 0;
|
|
padding: 0;
|
|
border: none;
|
|
}
|
|
|
|
.macroscalc-hidden {
|
|
opacity: 0;
|
|
max-height: 0;
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
border: none;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.macroscalc-sort-icon {
|
|
margin-left: 3px;
|
|
align-self: center;
|
|
font-size: 0.8rem;
|
|
opacity: 0.7;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.macroscalc-sort-icon:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
.macroscalc-sort-icon.active {
|
|
opacity: 1;
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* IMPROVED: Fixed table layout with consistent column widths */
|
|
.macroscalc-container .macros-table {
|
|
table-layout: fixed;
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin: 1rem 0;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.macroscalc-container .macros-table tbody {
|
|
position: relative;
|
|
z-index: 2;
|
|
}
|
|
|
|
.macroscalc-container .macros-table td,
|
|
.macroscalc-container .macros-table th,
|
|
.macroscalc-container .macros-table .column-header {
|
|
vertical-align: middle;
|
|
text-align: center;
|
|
padding: 8px 6px;
|
|
min-height: 40px;
|
|
}
|
|
|
|
.macroscalc-container .macros-table th,
|
|
.macroscalc-container .macros-table .column-header {
|
|
background-color: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-weight: 600;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
padding: 10px 8px;
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
/* IMPROVED: All columns equal width for consistency */
|
|
.macroscalc-container .macros-table th:first-child,
|
|
.macroscalc-container .macros-table td:first-child,
|
|
.macroscalc-container .macros-table th:nth-child(2),
|
|
.macroscalc-container .macros-table td:nth-child(2),
|
|
.macroscalc-container .macros-table th:nth-child(3),
|
|
.macroscalc-container .macros-table td:nth-child(3),
|
|
.macroscalc-container .macros-table th:nth-child(4),
|
|
.macroscalc-container .macros-table td:nth-child(4),
|
|
.macroscalc-container .macros-table th:nth-child(5),
|
|
.macroscalc-container .macros-table td:nth-child(5) {
|
|
width: 20%; /* All 5 columns equal width (100% / 5 = 20%) */
|
|
min-width: 80px;
|
|
text-align: center;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.macroscalc-container .macros-table th:first-child,
|
|
.macroscalc-container .macros-table td:first-child {
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.macroscalc-id-cell {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 4px;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.macroscalc-id-text {
|
|
text-align: center;
|
|
flex: 1;
|
|
min-width: 0;
|
|
margin-left: 4px;
|
|
margin-right: 0;
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.macroscalc-expand-toggle {
|
|
flex-shrink: 0;
|
|
margin-right: 0;
|
|
margin-left: 0;
|
|
transform: translateY(0);
|
|
width: 20px;
|
|
height: 20px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.macroscalc-id-cell-container {
|
|
text-align: center;
|
|
padding: 8px 6px; /* Reduced horizontal padding */
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.macroscalc-id-cell-container .macroscalc-expand-toggle {
|
|
margin-right: 6px;
|
|
width: 16px;
|
|
height: 16px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.macroscalc-id-cell-container .macroscalc-id-text {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
margin-left: 0;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.macroscalc-detail-row td {
|
|
padding: 10px 20px;
|
|
background-color: var(--background-primary-alt);
|
|
}
|
|
|
|
.macroscalc-details-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 0.85rem;
|
|
table-layout: fixed; /* Fixed layout for consistent column widths */
|
|
}
|
|
|
|
.macroscalc-details-table th {
|
|
padding: 4px 8px;
|
|
text-align: center; /* Center align headers */
|
|
font-weight: 600;
|
|
}
|
|
|
|
.macroscalc-details-table th,
|
|
.macroscalc-details-table td {
|
|
padding: 4px 6px;
|
|
text-align: center; /* Center align all content */
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* Equal width columns for expanded details table */
|
|
.macroscalc-details-table th:first-child,
|
|
.macroscalc-details-table td:first-child {
|
|
width: 20%; /* Food column */
|
|
text-align: left; /* Keep food names left-aligned */
|
|
padding-left: 8px;
|
|
}
|
|
|
|
.macroscalc-details-table th:nth-child(2),
|
|
.macroscalc-details-table td:nth-child(2) {
|
|
width: 13%; /* Quantity column */
|
|
}
|
|
|
|
.macroscalc-details-table th:nth-child(3),
|
|
.macroscalc-details-table td:nth-child(3),
|
|
.macroscalc-details-table th:nth-child(4),
|
|
.macroscalc-details-table td:nth-child(4),
|
|
.macroscalc-details-table th:nth-child(5),
|
|
.macroscalc-details-table td:nth-child(5),
|
|
.macroscalc-details-table th:nth-child(6),
|
|
.macroscalc-details-table td:nth-child(6) {
|
|
width: 16.75%; /* Equal width for Calories, Protein, Fat, Carbs (67% / 4 = 16.75%) */
|
|
}
|
|
|
|
.macroscalc-chart-section {
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.macroscalc-chart-container {
|
|
margin-top: 1rem;
|
|
padding: 1rem;
|
|
background-color: var(--background-primary-alt);
|
|
border-radius: 6px;
|
|
transition:
|
|
opacity 0.3s ease,
|
|
max-height 0.3s ease;
|
|
}
|
|
|
|
.macroscalc-chart-header {
|
|
margin-top: 0;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.macroscalc-chart-wrapper {
|
|
position: relative;
|
|
height: 350px;
|
|
width: 100%;
|
|
}
|
|
|
|
.macroscalc-line-chart {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.macroscalc-chart-error {
|
|
padding: 1rem;
|
|
background: var(--background-modifier-error);
|
|
border-radius: 4px;
|
|
margin: 1rem 0;
|
|
}
|
|
|
|
.error-message {
|
|
color: var(--text-error);
|
|
font-weight: 500;
|
|
margin: 0;
|
|
}
|
|
|
|
.macroscalc-chart-info {
|
|
text-align: center;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
padding: 2rem;
|
|
}
|
|
|
|
.macroscalc-metric-card.protein-card {
|
|
border-left: 4px solid var(--protein-color, #4caf50);
|
|
padding-left: 12px;
|
|
}
|
|
|
|
.macroscalc-metric-card.fat-card {
|
|
border-left: 4px solid var(--fat-color, #f44336);
|
|
padding-left: 12px;
|
|
}
|
|
|
|
.macroscalc-metric-card.carbs-card {
|
|
border-left: 4px solid var(--carbs-color, #2196f3);
|
|
padding-left: 12px;
|
|
}
|
|
|
|
.macroscalc-metric-card.calories-card {
|
|
border-left: 4px solid var(--calories-color, #e8962b);
|
|
padding-left: 12px;
|
|
}
|
|
|
|
.macroscalc-protein-value {
|
|
color: var(--protein-color, #4caf50);
|
|
}
|
|
|
|
.macroscalc-fat-value {
|
|
color: var(--fat-color, #f44336);
|
|
}
|
|
|
|
.macroscalc-carbs-value {
|
|
color: var(--carbs-color, #2196f3);
|
|
}
|
|
|
|
.macroscalc-meal-header {
|
|
font-weight: bold;
|
|
background-color: var(--background-secondary-alt);
|
|
font-size: 0.9rem;
|
|
padding: 6px 8px;
|
|
}
|
|
|
|
.macroscalc-alt-row {
|
|
background-color: var(--background-secondary);
|
|
}
|
|
|
|
.macroscalc-high-value {
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* IMPROVED: Progress bar adjustments for smaller columns */
|
|
.macroscalc-container .macro-progress-container,
|
|
.macroscalc-container .target-progress-container {
|
|
height: 6px;
|
|
margin-top: 3px;
|
|
margin-bottom: 1px;
|
|
}
|
|
|
|
/* IMPROVED: Enhanced visual hierarchy */
|
|
.macroscalc-container .macros-table .totals-row {
|
|
background-color: var(--background-secondary-alt);
|
|
border-top: 2px solid var(--background-modifier-border);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.macroscalc-container .macros-table .totals-row td {
|
|
padding: 10px 8px;
|
|
}
|
|
|
|
/* IMPROVED: Sort icon positioning adjustments */
|
|
.macroscalc-header-container {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 4px;
|
|
width: 100%;
|
|
}
|
|
|
|
.macroscalc-sort-icon {
|
|
font-size: 0.75rem;
|
|
opacity: 0.7;
|
|
margin-left: 2px;
|
|
}
|
|
|
|
/* IMPROVED: Table ID header specific styling */
|
|
.macroscalc-container .macros-table th:first-child .macroscalc-header-container {
|
|
justify-content: center;
|
|
}
|
|
|
|
/* IMPROVED: Mobile responsive adjustments */
|
|
@media (max-width: 768px) {
|
|
.macroscalc-container .macros-table th:first-child,
|
|
.macroscalc-container .macros-table td:first-child,
|
|
.macroscalc-container .macros-table th:nth-child(2),
|
|
.macroscalc-container .macros-table td:nth-child(2),
|
|
.macroscalc-container .macros-table th:nth-child(3),
|
|
.macroscalc-container .macros-table td:nth-child(3),
|
|
.macroscalc-container .macros-table th:nth-child(4),
|
|
.macroscalc-container .macros-table td:nth-child(4),
|
|
.macroscalc-container .macros-table th:nth-child(5),
|
|
.macroscalc-container .macros-table td:nth-child(5) {
|
|
width: 20%; /* Keep equal widths on mobile */
|
|
min-width: 60px;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.macroscalc-id-cell-container {
|
|
text-align: left;
|
|
padding: 8px;
|
|
padding-right: 4px;
|
|
}
|
|
|
|
.macroscalc-id-cell-container .macroscalc-expand-toggle {
|
|
margin-right: 6px;
|
|
width: 14px;
|
|
height: 14px;
|
|
}
|
|
|
|
.macroscalc-details-table {
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.macroscalc-details-table th,
|
|
.macroscalc-details-table td {
|
|
padding: 4px 6px;
|
|
}
|
|
|
|
.macroscalc-meal-header {
|
|
font-size: 0.9rem;
|
|
padding: 6px 8px;
|
|
}
|
|
|
|
.macroscalc-expand-toggle {
|
|
width: 18px;
|
|
height: 18px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.macroscalc-id-text {
|
|
font-size: 0.9rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.macroscalc-container .macros-table th:first-child,
|
|
.macroscalc-container .macros-table td:first-child,
|
|
.macroscalc-container .macros-table th:nth-child(2),
|
|
.macroscalc-container .macros-table td:nth-child(2),
|
|
.macroscalc-container .macros-table th:nth-child(3),
|
|
.macroscalc-container .macros-table td:nth-child(3),
|
|
.macroscalc-container .macros-table th:nth-child(4),
|
|
.macroscalc-container .macros-table td:nth-child(4),
|
|
.macroscalc-container .macros-table th:nth-child(5),
|
|
.macroscalc-container .macros-table td:nth-child(5) {
|
|
width: 20%; /* Keep equal widths on small mobile */
|
|
min-width: 50px;
|
|
font-size: 0.8rem;
|
|
padding: 6px 3px;
|
|
}
|
|
|
|
.macroscalc-header-container {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 4px;
|
|
width: 100%;
|
|
}
|
|
|
|
.macroscalc-sort-icon {
|
|
margin-left: 2px;
|
|
align-self: center;
|
|
font-size: 0.7rem;
|
|
}
|
|
|
|
.macroscalc-id-cell {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 4px;
|
|
width: 100%;
|
|
text-align: center;
|
|
}
|
|
|
|
.macroscalc-id-text {
|
|
text-align: center;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.macroscalc-details-table {
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.macroscalc-details-table th,
|
|
.macroscalc-details-table td {
|
|
padding: 3px 4px;
|
|
}
|
|
|
|
.macroscalc-meal-header {
|
|
font-size: 0.85rem;
|
|
padding: 4px 6px;
|
|
}
|
|
|
|
.macroscalc-detail-row td {
|
|
padding: 4px 6px;
|
|
}
|
|
|
|
.macroscalc-chart-section {
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.macroscalc-chart-wrapper {
|
|
height: 250px;
|
|
}
|
|
}
|
|
|
|
/* ==============================
|
|
* 15. CONSISTENT TOGGLE ICONS
|
|
* ============================== */
|
|
|
|
.toggle-icon,
|
|
.meal-toggle-icon,
|
|
.macroscalc-toggle-button,
|
|
.macroscalc-expand-toggle,
|
|
.macrospc-container .macroscalc-toggle-button {
|
|
width: 20px;
|
|
height: 20px;
|
|
min-width: 20px;
|
|
min-height: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 14px;
|
|
line-height: 14px;
|
|
text-align: center;
|
|
transition: transform 0.2s ease;
|
|
opacity: 0.8;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.toggle-icon::after,
|
|
.meal-toggle-icon,
|
|
.macroscalc-toggle-button::after,
|
|
.macroscalc-expand-toggle.expanded::after {
|
|
content: '▼';
|
|
display: inline-block;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.collapsed .toggle-icon::after,
|
|
.collapsed .meal-toggle-icon,
|
|
.macroscalc-toggle-button.collapsed::after,
|
|
.macroscalc-expand-toggle::after {
|
|
content: '▶';
|
|
display: inline-block;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.toggle-icon:hover,
|
|
.meal-toggle-icon:hover,
|
|
.macroscalc-toggle-button:hover,
|
|
.macroscalc-expand-toggle:hover,
|
|
.macrospc-container .macroscalc-toggle-button:hover {
|
|
opacity: 1;
|
|
color: var(--text-accent);
|
|
}
|
|
|
|
.macroscalc-id-cell .macroscalc-expand-toggle {
|
|
margin-right: 8px;
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.header-content .toggle-icon {
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.meal-header-content .meal-toggle-icon {
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.toggle-icon.collapsed::after,
|
|
.toggle-icon.collapsed.expand-all-icon::after {
|
|
content: '▶';
|
|
}
|
|
|
|
/* ==============================
|
|
* 16. FOOD ENTRY MODALS
|
|
* ============================== */
|
|
|
|
.food-entry-selection-modal {
|
|
max-width: 600px;
|
|
width: 90%;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.food-entry-selection-modal .modal-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
text-align: center;
|
|
margin: 0 auto;
|
|
padding: 0 1rem;
|
|
}
|
|
|
|
.food-entry-selection-modal .macros-modal-title {
|
|
text-align: center;
|
|
margin-bottom: 1rem;
|
|
color: var(--text-accent);
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
width: 100%;
|
|
}
|
|
|
|
.food-entry-selection-modal .macros-modal-description {
|
|
text-align: center;
|
|
margin-bottom: 2rem;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
font-size: 1rem;
|
|
width: 100%;
|
|
}
|
|
|
|
.food-entry-options {
|
|
display: flex;
|
|
gap: 2rem;
|
|
justify-content: center;
|
|
flex-wrap: wrap;
|
|
width: 100%;
|
|
max-width: 580px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.food-entry-option {
|
|
flex: 1;
|
|
min-width: 250px;
|
|
max-width: 280px;
|
|
padding: 2rem 1.5rem;
|
|
border: 2px solid var(--background-modifier-border);
|
|
border-radius: 12px;
|
|
background-color: var(--background-primary);
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
text-align: center;
|
|
position: relative;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.food-entry-option:hover:not(.option-disabled) {
|
|
border-color: var(--interactive-accent);
|
|
background-color: var(--background-modifier-hover);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.food-entry-option.option-hover:not(.option-disabled) {
|
|
border-color: var(--interactive-accent);
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.food-entry-option.option-disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
border-color: var(--background-modifier-border-hover);
|
|
}
|
|
|
|
.food-entry-option .option-icon {
|
|
font-size: 3rem;
|
|
margin-bottom: 1rem;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.food-entry-option .option-content {
|
|
width: 100%;
|
|
text-align: center;
|
|
}
|
|
|
|
.food-entry-option .option-content h3 {
|
|
margin: 0 0 0.5rem 0;
|
|
font-size: 1.25rem;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
text-align: center;
|
|
}
|
|
|
|
.food-entry-option .option-content p {
|
|
margin: 0;
|
|
color: var(--text-muted);
|
|
font-size: 0.95rem;
|
|
line-height: 1.4;
|
|
text-align: center;
|
|
}
|
|
|
|
.food-entry-option .option-footer {
|
|
margin-top: 1rem;
|
|
padding-top: 1rem;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
width: 100%;
|
|
text-align: center;
|
|
}
|
|
|
|
.macros-status-indicator {
|
|
font-size: 0.85rem;
|
|
font-weight: 500;
|
|
padding: 0.25rem 0.75rem;
|
|
border-radius: 12px;
|
|
display: inline-block;
|
|
}
|
|
|
|
.macros-status-indicator.status-success {
|
|
background-color: rgba(76, 175, 80, 0.15);
|
|
color: var(--text-success, #4caf50);
|
|
border: 1px solid rgba(76, 175, 80, 0.3);
|
|
}
|
|
|
|
.macros-status-indicator.status-warning {
|
|
background-color: rgba(255, 152, 0, 0.15);
|
|
color: var(--text-warning, #ff9800);
|
|
border: 1px solid rgba(255, 152, 0, 0.3);
|
|
}
|
|
|
|
.macros-api-error-message {
|
|
margin: 1rem 0;
|
|
padding: 1rem;
|
|
background-color: var(--background-modifier-error-hover, rgba(255, 107, 107, 0.15));
|
|
border: 1px solid var(--background-modifier-error, rgba(255, 107, 107, 0.3));
|
|
border-radius: 6px;
|
|
color: var(--text-error, #ff6b6b);
|
|
font-weight: 500;
|
|
text-align: center;
|
|
}
|
|
|
|
.manual-food-entry-modal {
|
|
max-width: 600px;
|
|
width: 90%;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.manual-food-entry-modal .modal-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
text-align: center;
|
|
margin: 0 auto;
|
|
padding: 0 1rem;
|
|
}
|
|
|
|
.manual-food-entry-modal .macros-modal-title {
|
|
text-align: center;
|
|
margin-bottom: 0.5rem;
|
|
color: var(--text-accent);
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
width: 100%;
|
|
}
|
|
|
|
.manual-food-entry-modal .macros-modal-description {
|
|
text-align: center;
|
|
margin-bottom: 2rem;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
font-size: 1rem;
|
|
width: 100%;
|
|
}
|
|
|
|
.manual-entry-form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.5rem;
|
|
width: 100%;
|
|
max-width: 480px;
|
|
margin: 0 auto;
|
|
align-items: center;
|
|
}
|
|
|
|
.macros-form-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
width: 100%;
|
|
align-items: center;
|
|
}
|
|
|
|
.macros-form-label {
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
font-size: 1rem;
|
|
text-align: center;
|
|
width: 100%;
|
|
}
|
|
|
|
.macros-form-label.required::after {
|
|
content: ' *';
|
|
color: var(--text-error, #e74c3c);
|
|
font-weight: bold;
|
|
}
|
|
|
|
.macros-form-input {
|
|
padding: 0.875rem 1rem;
|
|
border: 2px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
background-color: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-size: 1rem;
|
|
text-align: center;
|
|
transition: all 0.2s ease;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.macros-form-input:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 3px rgba(var(--interactive-accent-rgb), 0.15);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.macros-form-input::placeholder {
|
|
color: var(--text-muted);
|
|
opacity: 0.7;
|
|
text-align: center;
|
|
}
|
|
|
|
.nutrition-fields {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 1.5rem;
|
|
margin-top: 0.5rem;
|
|
width: 100%;
|
|
}
|
|
|
|
.validation-info {
|
|
margin: 1rem 0;
|
|
text-align: center;
|
|
width: 100%;
|
|
}
|
|
|
|
.required-note {
|
|
font-size: 0.9rem;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
margin: 0;
|
|
text-align: center;
|
|
}
|
|
|
|
.validation-errors {
|
|
margin: 1.5rem 0;
|
|
padding: 1rem 1.5rem;
|
|
background-color: var(--background-modifier-error-hover, rgba(255, 107, 107, 0.15));
|
|
border: 2px solid var(--background-modifier-error, rgba(255, 107, 107, 0.3));
|
|
border-radius: 8px;
|
|
text-align: center;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.validation-errors .macros-error-message {
|
|
margin: 0.5rem 0;
|
|
color: var(--text-error, #ff6b6b);
|
|
font-size: 0.95rem;
|
|
font-weight: 500;
|
|
text-align: center;
|
|
}
|
|
|
|
.validation-errors .macros-error-message:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.validation-errors .macros-error-message:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.macros-button-container {
|
|
display: flex;
|
|
gap: 1rem;
|
|
justify-content: center;
|
|
margin-top: 2rem;
|
|
padding-top: 1.5rem;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
width: 100%;
|
|
}
|
|
|
|
.macros-button-container .mod-button {
|
|
padding: 0.875rem 2rem;
|
|
font-weight: 600;
|
|
font-size: 1rem;
|
|
border-radius: 8px;
|
|
min-width: 120px;
|
|
transition: all 0.2s ease;
|
|
border: 2px solid var(--background-modifier-border);
|
|
background-color: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.macros-button-container .mod-button:hover {
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.macros-button-container .mod-cta {
|
|
background-color: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
border-color: var(--interactive-accent);
|
|
opacity: 1;
|
|
}
|
|
|
|
.macros-button-container .mod-cta:hover {
|
|
background-color: var(--interactive-accent-hover);
|
|
border-color: var(--interactive-accent-hover);
|
|
box-shadow: 0 2px 12px rgba(var(--interactive-accent-rgb), 0.3);
|
|
}
|
|
|
|
/* ==============================
|
|
* 17. ENHANCED ADD TO MACROS MODAL
|
|
* ============================== */
|
|
|
|
/* MOBILE RESPONSIVE IMPROVEMENTS - TABS STAY HORIZONTAL */
|
|
@media (max-width: 768px) {
|
|
.enhanced-add-to-macros-modal,
|
|
.enhanced-meal-template-modal {
|
|
width: 95%;
|
|
max-width: none;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .tabs-container {
|
|
display: flex;
|
|
flex-direction: row; /* Force horizontal layout */
|
|
margin-bottom: 1rem;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
overflow-x: auto; /* Allow horizontal scrolling if needed */
|
|
overflow-y: hidden;
|
|
-webkit-overflow-scrolling: touch;
|
|
-ms-overflow-style: none;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .tabs-container::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .tabs-container.centered-tabs::-webkit-scrollbar {
|
|
display: none; /* Hide scrollbar on WebKit browsers */
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-tab-button {
|
|
min-width: 100px; /* Reduced for mobile but still readable */
|
|
max-width: 140px;
|
|
padding: 6px 4px;
|
|
font-size: 0.7em;
|
|
flex: 1; /* Equal width distribution */
|
|
min-height: 44px; /* iOS recommended touch target size */
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
letter-spacing: -0.2px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .items-container,
|
|
.enhanced-meal-template-modal .foods-container {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-nutrition-info,
|
|
.enhanced-meal-template-modal .macros-nutrition-info {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-action-buttons,
|
|
.enhanced-meal-template-modal .macros-action-buttons {
|
|
flex-direction: column-reverse;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .cancel-button,
|
|
.enhanced-add-to-macros-modal .confirm-button,
|
|
.enhanced-meal-template-modal .cancel-button,
|
|
.enhanced-meal-template-modal .save-button,
|
|
.enhanced-meal-template-modal .create-button {
|
|
width: 100%;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-content-area {
|
|
padding: 15px;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-button-container {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .group-name-section {
|
|
padding: 12px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.enhanced-add-to-macros-modal .tabs-container.centered-tabs {
|
|
padding: 0 8px; /* Even less padding on very small screens */
|
|
gap: 4px;
|
|
justify-content: flex-start; /* Left-align on very small screens */
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-tab-button {
|
|
min-width: 80px; /* Minimum viable width */
|
|
max-width: 110px;
|
|
font-weight: 600;
|
|
font-size: 0.65em;
|
|
padding: 4px 2px;
|
|
letter-spacing: -0.3px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-nutrition-info,
|
|
.enhanced-meal-template-modal .macros-nutrition-info {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-button-container {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.nutrition-fields {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.macros-button-container {
|
|
flex-direction: column-reverse;
|
|
}
|
|
|
|
.macros-button-container .mod-button {
|
|
width: 100%;
|
|
}
|
|
|
|
/* Add subtle scroll indicators if needed on very small screens */
|
|
.enhanced-add-to-macros-modal .tabs-container.centered-tabs::before,
|
|
.enhanced-add-to-macros-modal .tabs-container.centered-tabs::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 10px;
|
|
pointer-events: none;
|
|
z-index: 12;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .tabs-container.centered-tabs::before {
|
|
left: 0;
|
|
background: linear-gradient(to right, var(--background-primary), transparent);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .tabs-container.centered-tabs::after {
|
|
right: 0;
|
|
background: linear-gradient(to left, var(--background-primary), transparent);
|
|
}
|
|
}
|
|
|
|
/* Alternative compact layout for very constrained spaces */
|
|
@media (max-width: 360px) {
|
|
.enhanced-add-to-macros-modal .macros-tab-button {
|
|
font-size: 0.65em;
|
|
font-weight: 600;
|
|
padding: 6px 8px;
|
|
min-width: 70px;
|
|
max-width: 95px;
|
|
}
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal {
|
|
max-width: 800px;
|
|
width: 90%;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-modal-header {
|
|
text-align: center;
|
|
margin-bottom: 1.5rem;
|
|
padding-bottom: 1rem;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-modal-title {
|
|
margin: 0 0 0.5rem 0;
|
|
color: var(--text-accent);
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-modal-description {
|
|
margin: 0;
|
|
color: var(--text-muted);
|
|
font-size: 0.95rem;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-search-container {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-search-wrapper {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-search-icon {
|
|
position: absolute;
|
|
left: 12px;
|
|
font-size: 1rem;
|
|
color: var(--text-muted);
|
|
z-index: 1;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-search-input {
|
|
width: 100%;
|
|
padding: 12px 12px 12px 40px;
|
|
font-size: 1rem;
|
|
border: 2px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
background-color: var(--background-primary);
|
|
color: var(--text-normal);
|
|
transition: all 0.2s ease;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-search-input:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 3px rgba(var(--interactive-accent-rgb), 0.15);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .tabs-container {
|
|
display: flex;
|
|
margin-bottom: 1rem;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .tabs-container.centered-tabs {
|
|
display: flex;
|
|
flex-direction: row; /* Force horizontal */
|
|
justify-content: center;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 0 12px;
|
|
margin: 0 auto 20px auto;
|
|
position: relative;
|
|
z-index: 10;
|
|
background: var(--background-primary);
|
|
flex-wrap: nowrap; /* Prevent wrapping */
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-tab-button {
|
|
flex: 1;
|
|
max-width: 220px;
|
|
min-width: 160px;
|
|
text-align: center;
|
|
padding: 12px 20px;
|
|
margin: 0;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
background: var(--background-secondary);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
position: relative;
|
|
z-index: 11;
|
|
font-size: 0.95em;
|
|
color: var(--text-muted);
|
|
font-weight: 500;
|
|
border-bottom: 2px solid transparent;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-tab-button:hover {
|
|
color: var(--text-normal);
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-tab-button.active {
|
|
background: var(--background-primary);
|
|
border-color: var(--color-accent);
|
|
color: var(--color-accent);
|
|
font-weight: 600;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
z-index: 12;
|
|
border-bottom-color: var(--interactive-accent);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-tab-button:hover:not(.active) {
|
|
background: var(--background-modifier-hover);
|
|
border-color: var(--color-accent);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-content-area {
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
background: var(--background-primary);
|
|
padding: 20px;
|
|
position: relative;
|
|
z-index: 1;
|
|
margin-top: 0;
|
|
min-height: 300px;
|
|
max-height: 400px;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .items-container {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
overflow-y: auto;
|
|
padding: 8px;
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
transition: all 0.3s ease;
|
|
display: grid;
|
|
gap: 12px;
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
align-content: start;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .items-container::-webkit-scrollbar {
|
|
width: 8px;
|
|
height: 8px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .items-container::-webkit-scrollbar-thumb {
|
|
background: var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .items-container::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .items-container.active {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .items-container::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .items-container::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .items-container::-webkit-scrollbar-thumb {
|
|
background-color: var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .meal-card,
|
|
.enhanced-add-to-macros-modal .food-card,
|
|
.enhanced-add-to-macros-modal .group-food-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: var(--background-secondary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
padding: 16px;
|
|
margin-bottom: 12px;
|
|
transition: all 0.2s ease;
|
|
cursor: pointer;
|
|
position: relative;
|
|
animation: fadeInUp 0.3s ease forwards;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .meal-card:hover,
|
|
.enhanced-add-to-macros-modal .food-card:hover,
|
|
.enhanced-add-to-macros-modal .group-food-card:hover:not(.disabled) {
|
|
border-color: var(--color-accent);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .meal-card.selected,
|
|
.enhanced-add-to-macros-modal .food-card.selected {
|
|
border-color: var(--interactive-accent);
|
|
background-color: rgba(var(--interactive-accent-rgb), 0.1);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .meal-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .meal-name,
|
|
.enhanced-add-to-macros-modal .food-name {
|
|
margin: 0 0 12px 0;
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .meal-count {
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
background: var(--background-modifier-border);
|
|
padding: 4px 8px;
|
|
border-radius: 12px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .meal-items-preview {
|
|
margin-top: 12px;
|
|
order: 3;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .preview-item {
|
|
font-size: 0.8rem;
|
|
background: var(--background-primary);
|
|
color: var(--text-muted);
|
|
padding: 4px 8px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .preview-more {
|
|
font-size: 0.8rem;
|
|
color: var(--text-accent);
|
|
font-weight: 500;
|
|
padding: 4px 8px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-nutrition-info {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 8px;
|
|
margin: 12px 0;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-nutrition-item {
|
|
padding: 8px 12px;
|
|
border-radius: 6px;
|
|
font-size: 0.9em;
|
|
font-weight: 600;
|
|
color: var(--text-on-accent);
|
|
text-align: center;
|
|
min-height: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-nutrition-item.calories {
|
|
background: var(--color-orange);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-nutrition-item.protein {
|
|
background: var(--color-green);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-nutrition-item.fat {
|
|
background: var(--color-red);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-nutrition-item.carbs {
|
|
background: var(--color-blue);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .serving-info {
|
|
margin: 8px 0;
|
|
font-size: 0.85em;
|
|
color: var(--text-muted);
|
|
text-align: center;
|
|
font-style: italic;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .add-button {
|
|
margin-top: 16px;
|
|
order: 4;
|
|
padding: 10px 16px;
|
|
border-radius: 6px;
|
|
border: 1px solid var(--interactive-accent);
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
text-align: center;
|
|
width: 100%;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .meal-add-button,
|
|
.enhanced-add-to-macros-modal .food-add-button,
|
|
.enhanced-add-to-macros-modal .group-food-add-button {
|
|
background: var(--interactive-accent);
|
|
border-color: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .meal-add-button:hover,
|
|
.enhanced-add-to-macros-modal .food-add-button:hover,
|
|
.enhanced-add-to-macros-modal .group-food-add-button:hover {
|
|
background: var(--interactive-accent-hover);
|
|
border-color: var(--interactive-accent-hover);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .add-button:hover {
|
|
background: var(--interactive-accent-hover);
|
|
border-color: var(--interactive-accent-hover);
|
|
color: var(--text-on-accent);
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .add-button.selected {
|
|
background: var(--color-green);
|
|
border-color: var(--color-green);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .add-button.selected:hover {
|
|
background: var(--color-green);
|
|
border-color: var(--color-green);
|
|
color: var(--text-on-accent);
|
|
transform: none;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .group-name-section {
|
|
margin-bottom: 16px; /* Reduced from 24px to 16px */
|
|
padding: 16px;
|
|
background: var(--background-secondary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .group-name-label {
|
|
display: block;
|
|
font-weight: 600;
|
|
font-size: 1em;
|
|
color: var(--text-normal);
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .group-name-input {
|
|
width: 100%;
|
|
padding: 12px 16px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-size: 0.95em;
|
|
transition: all 0.2s ease;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .group-name-input:focus {
|
|
outline: none;
|
|
border-color: var(--color-accent);
|
|
box-shadow: 0 0 0 2px var(--color-accent-2);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .group-name-input::placeholder {
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .group-food-card.disabled {
|
|
opacity: 0.5;
|
|
pointer-events: none;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .group-food-card.disabled .add-button {
|
|
background: var(--background-modifier-border);
|
|
border-color: var(--background-modifier-border);
|
|
color: var(--text-muted);
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .group-food-section {
|
|
margin-top: 1px;
|
|
padding-top: 1px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .group-food-title {
|
|
font-size: 1.1em;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
margin-bottom: 16px;
|
|
text-align: center; /* Center the title */
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .selected-item-tag.group-item-tag {
|
|
background: var(--color-accent-1);
|
|
border: 1px solid var(--color-accent-2);
|
|
font-weight: 600;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .selected-item-tag.group-item-tag .item-text {
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .selected-items-section {
|
|
background: var(--background-secondary);
|
|
border-radius: 8px;
|
|
padding: 16px;
|
|
margin-bottom: 1.5rem;
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .selected-title {
|
|
margin: 0 0 12px 0;
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .selected-items-container {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .no-selected-items {
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
text-align: center;
|
|
padding: 16px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .selected-item-tag {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
padding: 6px 12px;
|
|
border-radius: 16px;
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .remove-item-button {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
border: none;
|
|
color: var(--text-on-accent);
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 14px;
|
|
line-height: 1;
|
|
transition: background-color 0.2s ease;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .remove-item-button:hover {
|
|
background: rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-action-buttons {
|
|
display: flex;
|
|
gap: 12px;
|
|
justify-content: flex-end;
|
|
padding-top: 16px;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .cancel-button,
|
|
.enhanced-add-to-macros-modal .confirm-button {
|
|
padding: 12px 24px;
|
|
border: 2px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
min-width: 120px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .cancel-button {
|
|
background: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .cancel-button:hover {
|
|
background: var(--background-modifier-hover);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .confirm-button {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .confirm-button:hover:not(.disabled) {
|
|
background: var(--interactive-accent-hover);
|
|
border-color: var(--interactive-accent-hover);
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 12px rgba(var(--interactive-accent-rgb), 0.3);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .confirm-button.disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
background: var(--background-modifier-border);
|
|
color: var(--text-muted);
|
|
border-color: var(--background-modifier-border);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-no-results {
|
|
text-align: center;
|
|
padding: 32px 16px;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-loading-state {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 32px;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
}
|
|
|
|
/* ==============================
|
|
* 18. ENHANCED MEAL TEMPLATE MODAL
|
|
* ============================== */
|
|
|
|
.enhanced-meal-template-modal {
|
|
max-width: 800px;
|
|
width: 90%;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-modal-header {
|
|
text-align: center;
|
|
margin-bottom: 1.5rem;
|
|
padding-bottom: 1rem;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-modal-title {
|
|
margin: 0 0 0.5rem 0;
|
|
color: var(--text-accent);
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-modal-description {
|
|
margin: 0;
|
|
color: var(--text-muted);
|
|
font-size: 0.95rem;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .meal-name-section {
|
|
margin-bottom: 1.5rem;
|
|
padding: 1rem;
|
|
background: var(--background-secondary);
|
|
border-radius: 8px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .meal-name-label {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .meal-name-input {
|
|
width: 100%;
|
|
padding: 12px 16px;
|
|
font-size: 1.1rem;
|
|
font-weight: 500;
|
|
border: 2px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
background-color: var(--background-primary);
|
|
color: var(--text-normal);
|
|
transition: all 0.2s ease;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .meal-name-input:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 3px rgba(var(--interactive-accent-rgb), 0.15);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .meal-name-input::placeholder {
|
|
color: var(--text-muted);
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-search-container {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-search-wrapper {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-search-icon {
|
|
position: absolute;
|
|
left: 12px;
|
|
font-size: 1rem;
|
|
color: var(--text-muted);
|
|
z-index: 1;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-search-input {
|
|
width: 100%;
|
|
padding: 12px 12px 12px 40px;
|
|
font-size: 1rem;
|
|
border: 2px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
background-color: var(--background-primary);
|
|
color: var(--text-normal);
|
|
transition: all 0.2s ease;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-search-input:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 3px rgba(var(--interactive-accent-rgb), 0.15);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .foods-section {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .section-header {
|
|
margin-bottom: 1rem;
|
|
padding-bottom: 0.5rem;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .section-title {
|
|
margin: 0;
|
|
font-size: 1.2rem;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .foods-container {
|
|
max-height: 400px;
|
|
overflow-y: auto;
|
|
padding: 8px;
|
|
display: grid;
|
|
gap: 12px;
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
align-content: start;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .foods-container::-webkit-scrollbar {
|
|
width: 8px;
|
|
height: 8px;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .foods-container::-webkit-scrollbar-thumb {
|
|
background: var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .foods-container::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .foods-container::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .foods-container::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .foods-container::-webkit-scrollbar-thumb {
|
|
background-color: var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .food-card {
|
|
background: var(--background-secondary);
|
|
border: 2px solid var(--background-modifier-border);
|
|
border-radius: 12px;
|
|
padding: 16px;
|
|
transition: all 0.2s ease;
|
|
cursor: pointer;
|
|
position: relative;
|
|
animation: fadeInUp 0.3s ease forwards;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .food-card:hover {
|
|
border-color: var(--interactive-accent);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .food-card.selected {
|
|
border-color: var(--interactive-accent);
|
|
background-color: rgba(var(--interactive-accent-rgb), 0.1);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .food-name {
|
|
margin: 0 0 12px 0;
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-nutrition-info {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 8px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-nutrition-item {
|
|
font-size: 0.85rem;
|
|
padding: 4px 8px;
|
|
border-radius: 6px;
|
|
text-align: center;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-nutrition-item.calories {
|
|
background: rgba(232, 150, 43, 0.15);
|
|
color: var(--calories-color, #e8962b);
|
|
border: 1px solid rgba(232, 150, 43, 0.3);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-nutrition-item.protein {
|
|
background: rgba(76, 175, 80, 0.15);
|
|
color: var(--protein-color, #4caf50);
|
|
border: 1px solid rgba(76, 175, 80, 0.3);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-nutrition-item.fat {
|
|
background: rgba(244, 67, 54, 0.15);
|
|
color: var(--fat-color, #f44336);
|
|
border: 1px solid rgba(244, 67, 54, 0.3);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-nutrition-item.carbs {
|
|
background: rgba(33, 150, 243, 0.15);
|
|
color: var(--carbs-color, #2196f3);
|
|
border: 1px solid rgba(33, 150, 243, 0.3);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .serving-info {
|
|
text-align: center;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .serving-size {
|
|
font-size: 0.8rem;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-button-container {
|
|
display: flex;
|
|
gap: 8px;
|
|
justify-content: center;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .add-button,
|
|
.enhanced-meal-template-modal .remove-button,
|
|
.enhanced-meal-template-modal .edit-button {
|
|
flex: 1;
|
|
padding: 8px 12px;
|
|
border: 2px solid;
|
|
background: transparent;
|
|
font-weight: 600;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .add-button {
|
|
border-color: var(--interactive-accent);
|
|
color: var(--interactive-accent);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .add-button:hover {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .remove-button {
|
|
border-color: var(--text-error, #e74c3c);
|
|
color: var(--text-error, #e74c3c);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .remove-button:hover {
|
|
background: var(--text-error, #e74c3c);
|
|
color: white;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .edit-button {
|
|
border-color: var(--text-warning, #f39c12);
|
|
color: var(--text-warning, #f39c12);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .edit-button:hover {
|
|
background: var(--text-warning, #f39c12);
|
|
color: white;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .selected-items-section {
|
|
background: var(--background-secondary);
|
|
border-radius: 8px;
|
|
padding: 16px;
|
|
margin-bottom: 1.5rem;
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .selected-title {
|
|
margin: 0 0 12px 0;
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .selected-items-container {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .no-selected-items {
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
text-align: center;
|
|
padding: 16px;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .selected-item-tag {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
padding: 6px 12px;
|
|
border-radius: 16px;
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .remove-item-button {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
border: none;
|
|
color: var(--text-on-accent);
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 14px;
|
|
line-height: 1;
|
|
transition: background-color 0.2s ease;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .remove-item-button:hover {
|
|
background: rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-action-buttons {
|
|
display: flex;
|
|
gap: 12px;
|
|
justify-content: flex-end;
|
|
padding-top: 16px;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .cancel-button,
|
|
.enhanced-meal-template-modal .save-button,
|
|
.enhanced-meal-template-modal .create-button {
|
|
padding: 12px 24px;
|
|
border: 2px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
min-width: 120px;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .cancel-button {
|
|
background: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .cancel-button:hover {
|
|
background: var(--background-modifier-hover);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .save-button,
|
|
.enhanced-meal-template-modal .create-button {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .save-button:hover:not(.disabled),
|
|
.enhanced-meal-template-modal .create-button:hover:not(.disabled) {
|
|
background: var(--interactive-accent-hover);
|
|
border-color: var(--interactive-accent-hover);
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 12px rgba(var(--interactive-accent-rgb), 0.3);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .save-button.disabled,
|
|
.enhanced-meal-template-modal .create-button.disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
background: var(--background-modifier-border);
|
|
color: var(--text-muted);
|
|
border-color: var(--background-modifier-border);
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-no-results {
|
|
text-align: center;
|
|
padding: 32px 16px;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-loading-state {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 32px;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
}
|
|
|
|
/* ==============================
|
|
* 19. COMMENT MODAL STYLES
|
|
* ============================== */
|
|
|
|
.comment-modal {
|
|
min-width: 400px;
|
|
max-width: 500px;
|
|
}
|
|
|
|
.comment-modal-header {
|
|
margin-bottom: 16px;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
padding-bottom: 12px;
|
|
}
|
|
|
|
.comment-modal-title {
|
|
margin: 0;
|
|
font-size: 1.2em;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.comment-modal-description {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.comment-description-text {
|
|
margin: 0;
|
|
color: var(--text-muted);
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.comment-input-container {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.comment-input-label {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.comment-input-textarea {
|
|
width: 100%;
|
|
padding: 12px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-family: var(--font-interface);
|
|
font-size: 0.9em;
|
|
line-height: 1.4;
|
|
resize: vertical;
|
|
min-height: 80px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.comment-input-textarea:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 2px var(--interactive-accent-hover);
|
|
}
|
|
|
|
.comment-input-textarea:focus-visible {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.comment-char-count {
|
|
text-align: right;
|
|
font-size: 0.8em;
|
|
color: var(--text-muted);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.comment-char-count.char-count-warning {
|
|
color: var(--text-warning);
|
|
}
|
|
|
|
.comment-button-container {
|
|
display: flex;
|
|
gap: 12px;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.comment-cancel-btn,
|
|
.comment-save-btn,
|
|
.comment-remove-btn {
|
|
padding: 8px 16px;
|
|
border-radius: 6px;
|
|
font-size: 0.9em;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.comment-cancel-btn {
|
|
background: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.comment-cancel-btn:hover {
|
|
background: var(--background-modifier-hover);
|
|
}
|
|
|
|
.comment-save-btn {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
border: 1px solid var(--interactive-accent);
|
|
}
|
|
|
|
.comment-save-btn:hover {
|
|
background: var(--interactive-accent-hover);
|
|
}
|
|
|
|
.comment-remove-btn {
|
|
background: var(--background-modifier-error);
|
|
color: var(--text-on-accent);
|
|
border: 1px solid var(--background-modifier-error);
|
|
}
|
|
|
|
.comment-remove-btn:hover {
|
|
background: var(--background-modifier-error-hover);
|
|
}
|
|
|
|
.comment-modal button:focus-visible {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.meal-comment-icon {
|
|
display: inline-block;
|
|
margin-left: 8px;
|
|
opacity: 0.8;
|
|
cursor: help;
|
|
font-size: 0.9em;
|
|
transition: all 0.2s ease;
|
|
user-select: none;
|
|
color: inherit;
|
|
background: none;
|
|
background-color: transparent;
|
|
filter: none;
|
|
}
|
|
|
|
.meal-comment-icon:hover,
|
|
.meal-comment-icon:focus {
|
|
opacity: 1;
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.meal-comment-icon:focus {
|
|
outline: 1px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
.meal-comment-icon.newly-added {
|
|
animation: commentIconAdded 0.3s ease-out;
|
|
}
|
|
|
|
.food-comment-icon {
|
|
flex-shrink: 0;
|
|
min-width: 12px;
|
|
width: 12px;
|
|
height: 12px;
|
|
margin: 0;
|
|
opacity: 0.8;
|
|
font-size: 0.65em;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
z-index: 2;
|
|
align-self: flex-start;
|
|
cursor: help;
|
|
transition: all 0.2s ease;
|
|
user-select: none;
|
|
color: inherit;
|
|
background: none;
|
|
background-color: transparent;
|
|
filter: none;
|
|
}
|
|
|
|
.food-comment-icon:hover,
|
|
.food-comment-icon:focus {
|
|
opacity: 0.9;
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.food-comment-icon:focus {
|
|
outline: 1px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
.food-comment-icon.newly-added {
|
|
animation: commentIconAdded 0.3s ease-out;
|
|
}
|
|
|
|
.meal-comment,
|
|
.food-comment {
|
|
display: none;
|
|
}
|
|
|
|
.meal-header-cell .meal-comment-icon,
|
|
.macro-food-name-container .food-comment-icon {
|
|
background: transparent;
|
|
backdrop-filter: none;
|
|
filter: none;
|
|
}
|
|
|
|
/* ==============================
|
|
* 20. DELETION CONFIRMATION
|
|
* ============================== */
|
|
|
|
.delete-confirmation-header {
|
|
text-align: center;
|
|
margin-bottom: 1.5rem;
|
|
padding-bottom: 1rem;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.delete-confirmation-title {
|
|
margin: 0;
|
|
color: var(--text-error, #e74c3c);
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.delete-confirmation-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
align-items: center;
|
|
text-align: center;
|
|
}
|
|
|
|
.delete-message-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
margin: 1rem 0;
|
|
}
|
|
|
|
.delete-warning-icon {
|
|
font-size: 3rem;
|
|
margin-bottom: 0.5rem;
|
|
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
|
|
}
|
|
|
|
.delete-confirmation-message {
|
|
font-size: 1.1rem;
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
margin: 0;
|
|
line-height: 1.4;
|
|
max-width: 400px;
|
|
}
|
|
|
|
.delete-context-message {
|
|
font-size: 0.95rem;
|
|
color: var(--text-muted);
|
|
margin: 0;
|
|
line-height: 1.3;
|
|
max-width: 350px;
|
|
font-style: italic;
|
|
}
|
|
|
|
.modal-button-container {
|
|
display: flex;
|
|
gap: 1rem;
|
|
justify-content: center;
|
|
margin-top: 1.5rem;
|
|
padding-top: 1rem;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.modal-button-container button {
|
|
padding: 0.75rem 1.5rem;
|
|
font-weight: 600;
|
|
border-radius: 6px;
|
|
min-width: 100px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.modal-button-container .mod-muted {
|
|
background-color: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.modal-button-container .mod-muted:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.modal-button-container .mod-warning {
|
|
background-color: var(--text-error, #e74c3c);
|
|
color: white;
|
|
border: 1px solid var(--text-error, #e74c3c);
|
|
}
|
|
|
|
.modal-button-container .mod-warning:hover {
|
|
background-color: var(--text-error, #c0392b);
|
|
border-color: var(--text-error, #c0392b);
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 2px 12px rgba(231, 76, 60, 0.3);
|
|
}
|
|
|
|
/* ==============================
|
|
* 21. ID SUGGESTION STYLES
|
|
* ============================== */
|
|
|
|
.macros-id-suggestion {
|
|
padding: 8px 12px;
|
|
border-radius: 6px;
|
|
transition: background-color 0.15s ease;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.macros-id-suggestion:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.macros-id-suggestion.is-selected,
|
|
.macros-id-suggestion.mod-selected {
|
|
background-color: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.macros-id-suggestion.is-selected .macros-id-suggestion-title,
|
|
.macros-id-suggestion.mod-selected .macros-id-suggestion-title {
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.macros-id-suggestion.is-selected .macros-id-suggestion-desc,
|
|
.macros-id-suggestion.mod-selected .macros-id-suggestion-desc {
|
|
color: var(--text-on-accent);
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.macros-id-suggestion.is-selected .macros-id-suggestion-preview,
|
|
.macros-id-suggestion.mod-selected .macros-id-suggestion-preview {
|
|
color: var(--text-on-accent);
|
|
background-color: rgba(255, 255, 255, 0.15);
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.suggestion-item.is-selected .macros-id-suggestion {
|
|
background-color: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.suggestion-item.is-selected .macros-id-suggestion * {
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.suggestion-item.is-selected .macros-id-suggestion-preview {
|
|
background-color: rgba(255, 255, 255, 0.15);
|
|
}
|
|
|
|
.macros-id-suggestion-main {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.macros-id-suggestion-icon {
|
|
font-size: 16px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.macros-id-suggestion-title {
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
flex: 1;
|
|
}
|
|
|
|
.macros-id-suggestion-desc {
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
margin-bottom: 3px;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.macros-id-suggestion-preview {
|
|
font-size: 11px;
|
|
color: var(--text-faint);
|
|
font-family: var(--font-monospace);
|
|
background-color: var(--background-modifier-border);
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.suggestion-container.macros-id-suggestions {
|
|
min-width: 280px;
|
|
max-width: 400px;
|
|
}
|
|
|
|
.macros-context-menu,
|
|
.macros-plugin .menu {
|
|
z-index: 10000;
|
|
position: fixed;
|
|
}
|
|
|
|
/* ==============================
|
|
* 22. MOBILE RESPONSIVE STYLES
|
|
* ============================== */
|
|
|
|
@media (min-width: 769px) {
|
|
.macroscalc-id-cell-container {
|
|
text-align: center;
|
|
padding-left: 12px;
|
|
padding-right: 12px;
|
|
}
|
|
|
|
.macroscalc-id-cell-container .macroscalc-expand-toggle {
|
|
display: inline-block;
|
|
width: 16px;
|
|
height: 16px;
|
|
margin-right: 4px;
|
|
margin-left: 0;
|
|
text-align: center;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.macroscalc-id-cell-container .macroscalc-id-text {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
margin-left: 0;
|
|
}
|
|
|
|
.macro-food-remove-btn {
|
|
display: inline-flex;
|
|
}
|
|
|
|
.macro-food-name {
|
|
max-width: calc(100% - 32px);
|
|
}
|
|
|
|
.macro-food-name-container {
|
|
gap: 8px;
|
|
min-height: 24px;
|
|
padding: 2px 0;
|
|
}
|
|
|
|
.macros-button-container {
|
|
flex-direction: row;
|
|
}
|
|
|
|
.macros-button-container button {
|
|
min-width: 120px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.header-text-desktop {
|
|
display: none;
|
|
}
|
|
|
|
.header-text-mobile {
|
|
display: inline;
|
|
}
|
|
|
|
.macro-food-remove-btn {
|
|
display: none;
|
|
}
|
|
|
|
.macros-table tr {
|
|
touch-action: manipulation;
|
|
min-height: 44px;
|
|
}
|
|
|
|
.macros-table tr.long-press-active {
|
|
background-color: var(--interactive-accent);
|
|
color: white;
|
|
transform: scale(1.01);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.long-press-active td {
|
|
color: white;
|
|
border-color: rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
.macro-food-name-container {
|
|
gap: 12px;
|
|
min-height: 36px;
|
|
padding: 4px 0;
|
|
}
|
|
|
|
.macro-food-name {
|
|
font-size: 14px;
|
|
line-height: 1.4;
|
|
font-weight: 500;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.macros-table td,
|
|
.macros-table th,
|
|
.macros-table .column-header {
|
|
padding: 6px 8px;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.macro-percentage {
|
|
font-size: 0.7rem;
|
|
}
|
|
|
|
.remove-item-button {
|
|
width: 24px;
|
|
height: 24px;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.editable-quantity {
|
|
padding: 4px 6px;
|
|
font-size: 0.9rem;
|
|
min-height: 32px;
|
|
border: 1px dashed rgba(255, 255, 255, 0.3);
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.editable-quantity:hover,
|
|
.editable-quantity:focus,
|
|
.editable-quantity:active {
|
|
border-color: var(--interactive-accent);
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.editable-quantity input {
|
|
width: 60px;
|
|
padding: 3px 6px;
|
|
font-size: 16px;
|
|
min-height: 24px;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.macro-dashboard {
|
|
margin-top: 0.5rem;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.macro-dashboard-content {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
grid-template-rows: 1fr 1fr;
|
|
gap: 12px;
|
|
padding: 12px;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.macro-metric-card {
|
|
min-width: auto;
|
|
width: 100%;
|
|
padding: 12px;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
min-height: 80px;
|
|
}
|
|
|
|
.macro-metric-card .macro-metric-label {
|
|
font-size: 0.9rem;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.macro-metric-card .macro-metric-value {
|
|
font-size: 1.2rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.macro-metric-card .macro-metric-percentage {
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.macro-pie-chart-container {
|
|
width: 250px;
|
|
height: 250px;
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.macro-pie-chart-summary-container {
|
|
min-height: 250px;
|
|
padding: 8px 12px;
|
|
}
|
|
|
|
.macroscalc-id-cell-container {
|
|
text-align: left;
|
|
padding-left: 8px;
|
|
padding-right: 4px;
|
|
}
|
|
|
|
.macroscalc-id-cell-container .macroscalc-expand-toggle {
|
|
margin-right: 6px;
|
|
width: 14px;
|
|
height: 14px;
|
|
}
|
|
|
|
.macroscalc-details-table {
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.macroscalc-details-table th,
|
|
.macroscalc-details-table td {
|
|
padding: 4px 6px;
|
|
}
|
|
|
|
.macroscalc-meal-header {
|
|
font-size: 0.9rem;
|
|
padding: 6px 8px;
|
|
}
|
|
|
|
.macroscalc-expand-toggle {
|
|
width: 18px;
|
|
height: 18px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.macroscalc-id-text {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.macro-tooltip,
|
|
.macro-tooltip-mobile {
|
|
min-width: 180px;
|
|
max-width: calc(100vw - 40px);
|
|
padding: 12px 16px;
|
|
font-size: 14px;
|
|
line-height: 1.4;
|
|
background-color: rgba(0, 0, 0, 0.95);
|
|
backdrop-filter: blur(8px);
|
|
-webkit-backdrop-filter: blur(8px);
|
|
transform: translateX(-50%) translateY(-4px) scale(1);
|
|
}
|
|
|
|
.tooltip-visible {
|
|
transform: translateX(-50%) translateY(0px) scale(1);
|
|
}
|
|
|
|
.macro-progress-container,
|
|
.target-progress-container,
|
|
.macro-metric-progress-container {
|
|
height: 6px;
|
|
margin-top: 3px;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.delete-confirmation-content {
|
|
padding: 0 1rem;
|
|
}
|
|
|
|
.delete-confirmation-message {
|
|
font-size: 1rem;
|
|
max-width: 300px;
|
|
}
|
|
|
|
.delete-context-message {
|
|
font-size: 0.9rem;
|
|
max-width: 280px;
|
|
}
|
|
|
|
.macros-button-container {
|
|
flex-direction: column-reverse;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.macros-button-container button {
|
|
width: 100%;
|
|
min-width: auto;
|
|
padding: 1rem 1.5rem;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal,
|
|
.enhanced-meal-template-modal {
|
|
width: 95%;
|
|
max-width: none;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .items-container,
|
|
.enhanced-meal-template-modal .foods-container {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-nutrition-info,
|
|
.enhanced-meal-template-modal .macros-nutrition-info {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-action-buttons,
|
|
.enhanced-meal-template-modal .macros-action-buttons {
|
|
flex-direction: column-reverse;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .cancel-button,
|
|
.enhanced-add-to-macros-modal .confirm-button,
|
|
.enhanced-meal-template-modal .cancel-button,
|
|
.enhanced-meal-template-modal .save-button,
|
|
.enhanced-meal-template-modal .create-button {
|
|
width: 100%;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .tabs-container {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .tabs-container.centered-tabs {
|
|
padding: 0 10px;
|
|
gap: 4px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-tab-button {
|
|
min-width: 120px;
|
|
max-width: 140px;
|
|
padding: 10px 12px;
|
|
font-size: 0.85em;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
border-right: none;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-tab-button.active {
|
|
border-bottom-color: var(--interactive-accent);
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-content-area {
|
|
padding: 15px;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-button-container {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .group-name-section {
|
|
padding: 12px;
|
|
}
|
|
|
|
.nutrition-fields {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.comment-button-container {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.comment-cancel-btn,
|
|
.comment-save-btn,
|
|
.comment-remove-btn {
|
|
width: 100%;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.header-left {
|
|
flex-wrap: nowrap;
|
|
gap: 4px;
|
|
}
|
|
|
|
.food-name-content {
|
|
flex-wrap: nowrap;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.macro-food-name {
|
|
max-width: calc(100% - 16px);
|
|
}
|
|
|
|
.meal-comment-icon,
|
|
.food-comment-icon {
|
|
font-size: 0.85em;
|
|
margin-left: 3px;
|
|
}
|
|
|
|
.comment-modal {
|
|
min-width: 90vw;
|
|
max-width: 95vw;
|
|
}
|
|
|
|
.macros-table td:first-child {
|
|
max-width: 200px;
|
|
min-width: 120px;
|
|
width: 35%;
|
|
padding: 6px 4px;
|
|
}
|
|
|
|
.macro-food-name {
|
|
min-width: 50px;
|
|
font-size: 0.85em;
|
|
max-width: calc(100% - 16px);
|
|
}
|
|
|
|
.food-comment-icon {
|
|
width: 12px;
|
|
height: 12px;
|
|
font-size: 0.7em;
|
|
}
|
|
|
|
.food-name-content {
|
|
max-width: calc(100% - 4px);
|
|
}
|
|
|
|
.macros-table th:first-child,
|
|
.macros-table td:first-child {
|
|
width: 35%;
|
|
}
|
|
|
|
.macros-table th:nth-child(2),
|
|
.macros-table td:nth-child(2) {
|
|
width: 13%;
|
|
}
|
|
|
|
.macros-table th:nth-child(3),
|
|
.macros-table td:nth-child(3),
|
|
.macros-table th:nth-child(4),
|
|
.macros-table td:nth-child(4),
|
|
.macros-table th:nth-child(5),
|
|
.macros-table td:nth-child(5),
|
|
.macros-table th:nth-child(6),
|
|
.macros-table td:nth-child(6) {
|
|
width: 13%;
|
|
}
|
|
|
|
.dual-energy-inputs {
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.energy-input-group {
|
|
width: 100%;
|
|
}
|
|
|
|
.energy-input {
|
|
width: 100%;
|
|
}
|
|
|
|
.energy-fields-container {
|
|
flex-direction: column;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.energy-field {
|
|
flex: none;
|
|
}
|
|
|
|
.macros-table-header {
|
|
padding: 6px 8px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.macros-table-controls {
|
|
gap: 6px;
|
|
}
|
|
|
|
.meal-header-content {
|
|
flex-wrap: wrap;
|
|
gap: 4px;
|
|
}
|
|
|
|
.header-calorie-summary {
|
|
font-size: 0.85rem;
|
|
margin-left: 6px;
|
|
}
|
|
|
|
.macroscalc-details-table {
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.macroscalc-details-table th,
|
|
.macroscalc-details-table td {
|
|
padding: 3px 4px;
|
|
}
|
|
|
|
.macroscalc-meal-header {
|
|
font-size: 0.85rem;
|
|
padding: 4px 6px;
|
|
}
|
|
|
|
.macroscalc-header-container {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 2px;
|
|
}
|
|
|
|
.macroscalc-sort-icon {
|
|
margin-left: 0;
|
|
align-self: flex-end;
|
|
}
|
|
|
|
.macroscalc-detail-row td {
|
|
padding: 4px 6px;
|
|
}
|
|
|
|
.macroscalc-chart-section {
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.macroscalc-chart-wrapper {
|
|
height: 250px;
|
|
}
|
|
|
|
.macros-id-suggestion {
|
|
padding: 10px;
|
|
}
|
|
|
|
.macros-id-suggestion-main {
|
|
gap: 6px;
|
|
}
|
|
|
|
.macros-id-suggestion-icon {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.macros-id-suggestion-title {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.macros-id-suggestion-desc {
|
|
font-size: 11px;
|
|
}
|
|
|
|
.macros-id-suggestion-preview {
|
|
font-size: 10px;
|
|
}
|
|
|
|
.suggestion-container.macros-id-suggestions {
|
|
min-width: 240px;
|
|
max-width: 320px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.macros-table td,
|
|
.macros-table th,
|
|
.macros-table .column-header {
|
|
padding: 4px 6px;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.header-text-mobile {
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.macro-percentage {
|
|
font-size: 0.65rem;
|
|
}
|
|
|
|
.macro-dashboard-content {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
grid-template-rows: 1fr 1fr;
|
|
gap: 8px;
|
|
padding: 8px;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.macro-metric-card {
|
|
min-width: auto;
|
|
width: 100%;
|
|
padding: 10px;
|
|
border-radius: 6px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
min-height: 70px;
|
|
}
|
|
|
|
.macro-metric-card .macro-metric-label {
|
|
font-size: 0.8rem;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.macro-metric-card .macro-metric-value {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.macro-metric-card .macro-metric-percentage {
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
.macro-metric-card .macro-metric-progress-container {
|
|
height: 6px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.macro-dashboard-flex-container {
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 15px;
|
|
}
|
|
|
|
.macro-pie-chart-container {
|
|
width: 200px;
|
|
height: 200px;
|
|
margin-left: 0;
|
|
}
|
|
|
|
.macro-pie-chart-summary-container {
|
|
min-height: auto;
|
|
max-width: none;
|
|
width: 100%;
|
|
}
|
|
|
|
.macro-tooltip,
|
|
.macro-tooltip-mobile {
|
|
min-width: 160px;
|
|
max-width: calc(100vw - 20px);
|
|
padding: 10px 14px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.delete-warning-icon {
|
|
font-size: 2.5rem;
|
|
}
|
|
|
|
.delete-confirmation-message {
|
|
font-size: 0.95rem;
|
|
max-width: 250px;
|
|
}
|
|
|
|
.delete-context-message {
|
|
font-size: 0.85rem;
|
|
max-width: 220px;
|
|
}
|
|
|
|
.macroscalc-header-container {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 4px;
|
|
width: 100%;
|
|
}
|
|
|
|
.macroscalc-sort-icon {
|
|
margin-left: 2px;
|
|
align-self: center;
|
|
font-size: 0.7rem;
|
|
}
|
|
|
|
.macroscalc-id-cell {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 4px;
|
|
width: 100%;
|
|
text-align: center;
|
|
}
|
|
|
|
.macroscalc-id-text {
|
|
text-align: center;
|
|
}
|
|
|
|
.macro-food-name {
|
|
font-size: 0.8em;
|
|
min-width: 45px;
|
|
}
|
|
|
|
.food-comment-icon {
|
|
width: 10px;
|
|
height: 10px;
|
|
font-size: 0.65em;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .tabs-container.centered-tabs {
|
|
padding: 0 10px;
|
|
gap: 4px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-tab-button {
|
|
min-width: 120px;
|
|
max-width: 140px;
|
|
padding: 10px 12px;
|
|
font-size: 0.85em;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-content-area {
|
|
padding: 15px;
|
|
}
|
|
|
|
.enhanced-add-to-macros-modal .macros-nutrition-info,
|
|
.enhanced-meal-template-modal .macros-nutrition-info {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.enhanced-meal-template-modal .macros-button-container {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.nutrition-fields {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.macros-button-container {
|
|
flex-direction: column-reverse;
|
|
}
|
|
|
|
.macros-button-container .mod-button {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.dual-energy-inputs {
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.energy-input-group {
|
|
width: 100%;
|
|
}
|
|
|
|
.energy-input {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
/* ==============================
|
|
* 23. ANIMATIONS AND EFFECTS
|
|
* ============================== */
|
|
|
|
@keyframes long-press-pulse {
|
|
from {
|
|
background-color: var(--text-error, #e74c3c);
|
|
transform: scale(1);
|
|
}
|
|
to {
|
|
background-color: var(--text-error, #c0392b);
|
|
transform: scale(1.02);
|
|
}
|
|
}
|
|
|
|
@keyframes fadeInUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes commentIconAdded {
|
|
0% {
|
|
opacity: 0;
|
|
transform: scale(0.8);
|
|
}
|
|
100% {
|
|
opacity: 0.7;
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
/* ==============================
|
|
* 24. THEME SUPPORT
|
|
* ============================== */
|
|
|
|
body:not(.theme-obsidian) .api-credentials-warning {
|
|
color: #e74c3c;
|
|
background-color: rgba(231, 76, 60, 0.1);
|
|
border: 1px solid rgba(231, 76, 60, 0.3);
|
|
}
|
|
|
|
body:not(.theme-obsidian) .api-credentials-success {
|
|
color: #27ae60;
|
|
background-color: rgba(39, 174, 96, 0.1);
|
|
border: 1px solid rgba(39, 174, 96, 0.3);
|
|
}
|
|
|
|
.theme-dark .api-credentials-warning {
|
|
color: #ff6b6b;
|
|
background-color: rgba(255, 107, 107, 0.15);
|
|
border: 1px solid rgba(255, 107, 107, 0.3);
|
|
}
|
|
|
|
.theme-dark .api-credentials-success {
|
|
color: #51cf66;
|
|
background-color: rgba(81, 207, 102, 0.15);
|
|
border: 1px solid rgba(81, 207, 102, 0.3);
|
|
}
|
|
|
|
.theme-dark .status-indicator.status-success {
|
|
background-color: rgba(76, 175, 80, 0.2);
|
|
color: #81c784;
|
|
}
|
|
|
|
.theme-dark .status-indicator.status-warning {
|
|
background-color: rgba(255, 152, 0, 0.2);
|
|
color: #ffb74d;
|
|
}
|
|
|
|
.theme-dark .api-error-message {
|
|
background-color: rgba(255, 107, 107, 0.2);
|
|
color: #ff8a80;
|
|
}
|
|
|
|
.theme-dark .validation-errors {
|
|
background-color: rgba(255, 107, 107, 0.2);
|
|
}
|
|
|
|
.theme-dark .validation-errors .error-message {
|
|
color: #ff8a80;
|
|
}
|
|
|
|
.theme-dark .form-input {
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.theme-dark .form-input:focus {
|
|
box-shadow: 0 0 0 3px rgba(var(--interactive-accent-rgb), 0.2);
|
|
}
|
|
|
|
.theme-dark .enhanced-add-to-macros-modal .nutrition-item.calories,
|
|
.theme-dark .enhanced-meal-template-modal .nutrition-item.calories {
|
|
background: rgba(232, 150, 43, 0.2);
|
|
color: #ffb74d;
|
|
}
|
|
|
|
.theme-dark .enhanced-add-to-macros-modal .nutrition-item.protein,
|
|
.theme-dark .enhanced-meal-template-modal .nutrition-item.protein {
|
|
background: rgba(76, 175, 80, 0.2);
|
|
color: #81c784;
|
|
}
|
|
|
|
.theme-dark .enhanced-add-to-macros-modal .nutrition-item.fat,
|
|
.theme-dark .enhanced-meal-template-modal .nutrition-item.fat {
|
|
background: rgba(244, 67, 54, 0.2);
|
|
color: #e57373;
|
|
}
|
|
|
|
.theme-dark .enhanced-add-to-macros-modal .nutrition-item.carbs,
|
|
.theme-dark .enhanced-meal-template-modal .nutrition-item.carbs {
|
|
background: rgba(33, 150, 243, 0.2);
|
|
color: #64b5f6;
|
|
}
|
|
|
|
.theme-dark .macros-table tr.long-press-active {
|
|
background-color: var(--interactive-accent);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
.theme-dark .macros-table tr.long-press-ready {
|
|
background-color: var(--text-error, #e74c3c);
|
|
box-shadow: 0 4px 16px rgba(231, 76, 60, 0.3);
|
|
}
|
|
|
|
.theme-dark .delete-confirmation-content {
|
|
background-color: var(--background-primary);
|
|
}
|
|
|
|
.theme-dark .macro-tooltip-mobile {
|
|
background-color: rgba(25, 25, 25, 0.95);
|
|
border-color: rgba(255, 255, 255, 0.15);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.theme-dark .comment-input-textarea {
|
|
background: var(--background-primary-alt);
|
|
}
|
|
|
|
.theme-dark .comment-modal {
|
|
background: var(--background-primary);
|
|
}
|
|
|
|
.theme-dark .macrospc-id-suggestion-preview {
|
|
background-color: var(--background-secondary-alt);
|
|
}
|
|
|
|
.theme-dark .macros-id-suggestion.is-selected .macros-id-suggestion-preview {
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.theme-light .macros-table tr.long-press-active {
|
|
background-color: var(--interactive-accent);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.theme-light .macros-table tr.long-press-ready {
|
|
background-color: #e74c3c;
|
|
box-shadow: 0 4px 12px rgba(231, 76, 60, 0.25);
|
|
}
|
|
|
|
.theme-light .macro-tooltip,
|
|
.theme-light .macro-tooltip-mobile {
|
|
background-color: #2d2d2d;
|
|
color: #ffffff;
|
|
border-color: rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
/* ==============================
|
|
* 25. ACCESSIBILITY AND PREFERENCES
|
|
* ============================== */
|
|
|
|
@media (prefers-contrast: high) {
|
|
.macros-table tr.long-press-active {
|
|
background-color: var(--interactive-accent);
|
|
border: 2px solid var(--text-normal);
|
|
}
|
|
|
|
.macros-table tr.long-press-ready {
|
|
background-color: #800000;
|
|
border: 3px solid #ffffff;
|
|
}
|
|
|
|
.delete-confirmation-title {
|
|
color: var(--text-error, #800000);
|
|
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
|
|
}
|
|
|
|
.modal-button-container .mod-warning {
|
|
background-color: #800000;
|
|
border: 2px solid #ffffff;
|
|
}
|
|
|
|
.macro-tooltip,
|
|
.macro-tooltip-mobile {
|
|
background-color: black;
|
|
color: white;
|
|
border: 2px solid white;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.macros-id-suggestion.is-selected,
|
|
.macros-id-suggestion.mod-selected,
|
|
.suggestion-item.is-selected .macros-id-suggestion {
|
|
background-color: var(--text-accent);
|
|
color: var(--background-primary);
|
|
border: 2px solid var(--text-normal);
|
|
}
|
|
|
|
.macros-id-suggestion.is-selected *,
|
|
.macros-id-suggestion.mod-selected *,
|
|
.suggestion-item.is-selected .macros-id-suggestion * {
|
|
color: var(--background-primary);
|
|
}
|
|
|
|
.energy-field .form-input {
|
|
border-width: 2px;
|
|
}
|
|
|
|
.energy-info {
|
|
border-left-width: 4px;
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.macros-table tr,
|
|
.modal-button-container button,
|
|
.macro-tooltip,
|
|
.macro-tooltip-mobile,
|
|
.energy-field .form-input {
|
|
transition: none;
|
|
animation: none;
|
|
}
|
|
|
|
.macros-table tr.long-press-active,
|
|
.macros-table tr.long-press-ready,
|
|
.modal-button-container button:hover {
|
|
transform: none;
|
|
}
|
|
|
|
.macros-table tr.long-press-ready {
|
|
background-color: var(--text-error, #c0392b);
|
|
}
|
|
}
|
|
|
|
@media print {
|
|
.meal-comment-icon,
|
|
.food-comment-icon {
|
|
display: none;
|
|
}
|
|
|
|
.comment-modal {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
/* ==============================
|
|
* SORTABLE TAB ORDER STYLES
|
|
* ============================== */
|
|
|
|
.sortable-tab-order-container {
|
|
margin: 1rem 0;
|
|
padding: 1rem;
|
|
background-color: var(--background-secondary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.sortable-instructions {
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
margin-bottom: 1rem;
|
|
padding: 0.5rem;
|
|
background-color: var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.sortable-tab-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
max-width: 400px;
|
|
}
|
|
|
|
.sortable-tab-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 12px 16px;
|
|
margin-bottom: 8px;
|
|
background-color: var(--background-primary);
|
|
border: 2px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
cursor: move;
|
|
transition: all 0.2s ease;
|
|
user-select: none;
|
|
position: relative;
|
|
}
|
|
|
|
.sortable-tab-item:hover {
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.sortable-tab-item.dragging {
|
|
opacity: 0.5;
|
|
transform: scale(0.95);
|
|
z-index: 1000;
|
|
}
|
|
|
|
.sortable-tab-item.drag-over-before::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: -4px;
|
|
left: 0;
|
|
right: 0;
|
|
height: 3px;
|
|
background-color: var(--interactive-accent);
|
|
border-radius: 2px;
|
|
z-index: 10;
|
|
}
|
|
|
|
.sortable-tab-item.drag-over-after::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: -4px;
|
|
left: 0;
|
|
right: 0;
|
|
height: 3px;
|
|
background-color: var(--interactive-accent);
|
|
border-radius: 2px;
|
|
z-index: 10;
|
|
}
|
|
|
|
.drag-handle {
|
|
font-size: 16px;
|
|
color: var(--text-muted);
|
|
cursor: grab;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 20px;
|
|
height: 20px;
|
|
opacity: 0.6;
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
.drag-handle:hover {
|
|
opacity: 1;
|
|
color: var(--interactive-accent);
|
|
}
|
|
|
|
.drag-handle:active {
|
|
cursor: grabbing;
|
|
}
|
|
|
|
.tab-content {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex: 1;
|
|
}
|
|
|
|
.tab-icon {
|
|
font-size: 16px;
|
|
width: 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.tab-label {
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.position-indicator {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 24px;
|
|
height: 24px;
|
|
background-color: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
border-radius: 50%;
|
|
font-size: 0.8rem;
|
|
font-weight: bold;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Dark theme adjustments */
|
|
.theme-dark .sortable-tab-item {
|
|
background-color: var(--background-primary-alt);
|
|
}
|
|
|
|
.theme-dark .sortable-instructions {
|
|
background-color: var(--background-modifier-border-hover);
|
|
}
|
|
|
|
/* High contrast mode */
|
|
@media (prefers-contrast: high) {
|
|
.sortable-tab-item {
|
|
border-width: 3px;
|
|
}
|
|
|
|
.sortable-tab-item.drag-over-before::before,
|
|
.sortable-tab-item.drag-over-after::after {
|
|
height: 4px;
|
|
}
|
|
|
|
.position-indicator {
|
|
border: 2px solid var(--text-normal);
|
|
}
|
|
}
|
|
|
|
/* Reduced motion */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.sortable-tab-item,
|
|
.drag-handle {
|
|
transition: none;
|
|
}
|
|
|
|
.sortable-tab-item:hover {
|
|
transform: none;
|
|
}
|
|
|
|
.sortable-tab-item.dragging {
|
|
transform: none;
|
|
}
|
|
}
|
|
|
|
/* Mobile responsive */
|
|
@media (max-width: 768px) {
|
|
.sortable-tab-order-container {
|
|
padding: 0.75rem;
|
|
}
|
|
|
|
.sortable-tab-item {
|
|
padding: 10px 12px;
|
|
gap: 10px;
|
|
}
|
|
|
|
.tab-label {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.position-indicator {
|
|
width: 20px;
|
|
height: 20px;
|
|
font-size: 0.75rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.sortable-tab-list {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.sortable-tab-item {
|
|
padding: 8px 10px;
|
|
gap: 8px;
|
|
}
|
|
|
|
.tab-icon {
|
|
font-size: 14px;
|
|
width: 16px;
|
|
}
|
|
|
|
.tab-label {
|
|
font-size: 0.85rem;
|
|
}
|
|
}
|
|
|
|
.macros-table tr.long-press-active {
|
|
background-color: var(--background-modifier-hover);
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
transition: background-color 0.1s ease;
|
|
}
|
|
|
|
/* Remove the aggressive red "ready to delete" state since we're using context menu */
|
|
.macros-table tr.long-press-ready {
|
|
/* This class is no longer used but kept for backward compatibility */
|
|
background-color: var(--background-modifier-hover);
|
|
transform: none; /* Remove the scaling effect */
|
|
animation: none; /* Remove the pulsing animation */
|
|
}
|
|
|
|
/* Dark theme adjustments for the subtle approach */
|
|
.theme-dark .macros-table tr.long-press-active {
|
|
background-color: var(--background-modifier-hover);
|
|
box-shadow: none; /* Remove dramatic shadows */
|
|
}
|
|
|
|
.theme-light .macros-table tr.long-press-active {
|
|
background-color: var(--background-modifier-hover);
|
|
box-shadow: none; /* Remove dramatic shadows */
|
|
}
|
|
|
|
/* High contrast mode - keep subtle but visible */
|
|
@media (prefers-contrast: high) {
|
|
.macros-table tr.long-press-active {
|
|
background-color: var(--interactive-accent);
|
|
border: 1px solid var(--text-normal);
|
|
}
|
|
}
|
|
|
|
/* Remove the dramatic pulsing animation since it's no longer needed */
|
|
@keyframes long-press-pulse {
|
|
/* Keep the keyframes definition to avoid CSS errors, but make it subtle */
|
|
from {
|
|
background-color: var(--background-modifier-hover);
|
|
transform: scale(1);
|
|
}
|
|
to {
|
|
background-color: var(--background-modifier-hover);
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
/* Enhanced context menu positioning for mobile */
|
|
.macros-context-menu,
|
|
.macros-plugin .menu {
|
|
z-index: 10000;
|
|
}
|
|
|
|
/* Better touch targets for context menu items on mobile */
|
|
@media (max-width: 768px) {
|
|
.macros-context-menu .menu-item,
|
|
.macros-plugin .menu .menu-item {
|
|
min-height: 44px;
|
|
padding: 12px 16px;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.macros-context-menu .menu-separator,
|
|
.macros-plugin .menu .menu-separator {
|
|
margin: 8px 0;
|
|
}
|
|
|
|
.macros-context-menu,
|
|
.macros-plugin .menu {
|
|
max-width: calc(100vw - 40px);
|
|
margin: 20px;
|
|
}
|
|
}
|
|
|
|
/* Improved mobile tooltip for long press instructions */
|
|
@media (max-width: 768px) {
|
|
.macro-tooltip,
|
|
.macro-tooltip-mobile {
|
|
font-size: 14px;
|
|
padding: 10px 14px;
|
|
max-width: calc(100vw - 40px);
|
|
line-height: 1.4;
|
|
}
|
|
}
|
|
|
|
/* Visual indicator for rows that support long press (subtle) */
|
|
@media (max-width: 768px) {
|
|
.macros-table tr[data-macro-line]:not([data-parent]) {
|
|
/* Very subtle indicator that the row is interactive */
|
|
position: relative;
|
|
}
|
|
|
|
.macros-table tr[data-macro-line]:not([data-parent])::after {
|
|
content: '';
|
|
position: absolute;
|
|
right: 8px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
width: 3px;
|
|
height: 3px;
|
|
background-color: var(--text-muted);
|
|
border-radius: 50%;
|
|
opacity: 0.3;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Hide the indicator when row is being pressed */
|
|
.macros-table tr.long-press-active::after {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
/* ==============================
|
|
* SEARCH CLEAR BUTTON STYLES
|
|
* ============================== */
|
|
|
|
.macros-search-wrapper {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.macros-search-clear-button {
|
|
position: absolute;
|
|
right: 12px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 0;
|
|
width: 20px;
|
|
height: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 14px;
|
|
line-height: 1;
|
|
color: var(--text-muted);
|
|
border-radius: 50%;
|
|
transition: all 0.2s ease;
|
|
z-index: 10;
|
|
font-family: var(--font-interface);
|
|
font-weight: normal;
|
|
}
|
|
|
|
.macros-search-clear-button:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
color: var(--text-normal);
|
|
transform: translateY(-50%) scale(1.1);
|
|
}
|
|
|
|
.macros-search-clear-button:active {
|
|
background-color: var(--background-modifier-active);
|
|
transform: translateY(-50%) scale(0.95);
|
|
}
|
|
|
|
.macros-search-clear-button:focus {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.macros-search-input {
|
|
padding-right: 40px;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.macros-search-clear-button {
|
|
width: 18px;
|
|
height: 18px;
|
|
font-size: 13px;
|
|
right: 14px;
|
|
padding: 3px;
|
|
min-width: 24px;
|
|
min-height: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.macros-search-clear-button:hover {
|
|
transform: translateY(-50%) scale(1.05);
|
|
}
|
|
|
|
.macros-search-input {
|
|
font-size: 16px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.macros-search-clear-button {
|
|
right: 12px;
|
|
}
|
|
|
|
.macros-search-input {
|
|
padding-right: 42px;
|
|
}
|
|
}
|
|
|
|
@media (prefers-contrast: high) {
|
|
.macros-search-clear-button {
|
|
border: 1px solid var(--text-muted);
|
|
background-color: var(--background-primary);
|
|
}
|
|
|
|
.macros-search-clear-button:hover {
|
|
border-color: var(--text-normal);
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.macros-search-clear-button {
|
|
transition: none;
|
|
}
|
|
|
|
.macros-search-clear-button:hover,
|
|
.macros-search-clear-button:active {
|
|
transform: translateY(-50%);
|
|
}
|
|
}
|
|
|
|
/* Macros Plugin - USDA Integration Styles */
|
|
|
|
/* Search Tabs */
|
|
.macros-search-tabs {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
margin-bottom: 16px;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
padding-bottom: 8px;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.macros-search-tab {
|
|
padding: 8px 16px;
|
|
border: none;
|
|
background: var(--background-secondary);
|
|
color: var(--text-muted);
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
transition: all 0.2s ease;
|
|
flex: 0 0 auto;
|
|
min-width: 120px;
|
|
max-width: calc(33.333% - 6px);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.macros-search-tab:hover {
|
|
background: var(--background-modifier-hover);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.macros-search-tab.active {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.macros-search-tab.active:hover {
|
|
background: var(--interactive-accent-hover);
|
|
}
|
|
|
|
/* Source Chips */
|
|
.macros-source-chip {
|
|
display: inline-block;
|
|
font-size: 11px;
|
|
padding: 2px 6px;
|
|
border-radius: 9999px;
|
|
opacity: 0.85;
|
|
margin-left: 4px;
|
|
font-weight: 500;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.macros-source-fatsecret {
|
|
background: rgba(76, 175, 80, 0.15);
|
|
color: var(--color-green);
|
|
border: 1px solid rgba(76, 175, 80, 0.3);
|
|
}
|
|
|
|
.macros-source-usda {
|
|
background: rgba(33, 150, 243, 0.15);
|
|
color: var(--color-blue);
|
|
border: 1px solid rgba(33, 150, 243, 0.3);
|
|
}
|
|
|
|
.macros-source-foundation {
|
|
background: rgba(156, 39, 176, 0.15);
|
|
color: var(--color-purple);
|
|
border: 1px solid rgba(156, 39, 176, 0.3);
|
|
}
|
|
|
|
.macros-source-branded {
|
|
background: rgba(255, 152, 0, 0.15);
|
|
color: var(--color-orange);
|
|
border: 1px solid rgba(255, 152, 0, 0.3);
|
|
}
|
|
|
|
/* Open Food Facts Source Chip */
|
|
.macros-source-openfoodfacts {
|
|
background: rgba(255, 87, 34, 0.15);
|
|
color: var(--color-red);
|
|
border: 1px solid rgba(255, 87, 34, 0.3);
|
|
}
|
|
|
|
/* Quality Indicator Chips */
|
|
.macros-quality-chip {
|
|
display: inline-block;
|
|
font-size: 11px;
|
|
padding: 2px 6px;
|
|
border-radius: 9999px;
|
|
margin-left: 4px;
|
|
font-weight: 500;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.macros-foundation-indicator {
|
|
background: rgba(156, 39, 176, 0.2);
|
|
color: var(--color-purple);
|
|
border: 1px solid rgba(156, 39, 176, 0.4);
|
|
}
|
|
|
|
.macros-off-high-quality {
|
|
background: rgba(76, 175, 80, 0.2);
|
|
color: var(--color-green);
|
|
border: 1px solid rgba(76, 175, 80, 0.4);
|
|
}
|
|
|
|
.macros-off-medium-quality {
|
|
background: rgba(255, 193, 7, 0.2);
|
|
color: var(--color-yellow);
|
|
border: 1px solid rgba(255, 193, 7, 0.4);
|
|
}
|
|
|
|
/* Nutrition Grade Chips */
|
|
.macros-nutrition-grade {
|
|
display: inline-block;
|
|
font-size: 10px;
|
|
padding: 2px 5px;
|
|
border-radius: 3px;
|
|
margin-left: 4px;
|
|
font-weight: 600;
|
|
vertical-align: middle;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.macros-nutrition-grade-a {
|
|
background: rgba(76, 175, 80, 0.9);
|
|
color: white;
|
|
border: 1px solid rgba(76, 175, 80, 1);
|
|
}
|
|
|
|
.macros-nutrition-grade-b {
|
|
background: rgba(139, 195, 74, 0.9);
|
|
color: white;
|
|
border: 1px solid rgba(139, 195, 74, 1);
|
|
}
|
|
|
|
.macros-nutrition-grade-c {
|
|
background: rgba(255, 193, 7, 0.9);
|
|
color: white;
|
|
border: 1px solid rgba(255, 193, 7, 1);
|
|
}
|
|
|
|
.macros-nutrition-grade-d {
|
|
background: rgba(255, 152, 0, 0.9);
|
|
color: white;
|
|
border: 1px solid rgba(255, 152, 0, 1);
|
|
}
|
|
|
|
.macros-nutrition-grade-e {
|
|
background: rgba(244, 67, 54, 0.9);
|
|
color: white;
|
|
border: 1px solid rgba(244, 67, 54, 1);
|
|
}
|
|
|
|
/* NOVA Processing Level Chips */
|
|
.macros-nova-chip {
|
|
display: inline-block;
|
|
font-size: 10px;
|
|
padding: 2px 5px;
|
|
border-radius: 3px;
|
|
margin-left: 4px;
|
|
font-weight: 600;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.macros-nova-1 {
|
|
background: rgba(76, 175, 80, 0.15);
|
|
color: var(--color-green);
|
|
border: 1px solid rgba(76, 175, 80, 0.3);
|
|
}
|
|
|
|
.macros-nova-2 {
|
|
background: rgba(255, 193, 7, 0.15);
|
|
color: var(--color-yellow);
|
|
border: 1px solid rgba(255, 193, 7, 0.3);
|
|
}
|
|
|
|
.macros-nova-3 {
|
|
background: rgba(255, 152, 0, 0.15);
|
|
color: var(--color-orange);
|
|
border: 1px solid rgba(255, 152, 0, 0.3);
|
|
}
|
|
|
|
.macros-nova-4 {
|
|
background: rgba(244, 67, 54, 0.15);
|
|
color: var(--color-red);
|
|
border: 1px solid rgba(244, 67, 54, 0.3);
|
|
}
|
|
|
|
/* Food Result Items */
|
|
.food-result-item {
|
|
padding: 12px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s ease;
|
|
border: 1px solid transparent;
|
|
}
|
|
|
|
.food-result-item:hover {
|
|
background: var(--background-modifier-hover);
|
|
}
|
|
|
|
.food-result-item.highlighted-result {
|
|
background: var(--background-modifier-hover);
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
.food-result-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.food-result-name {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
gap: 8px;
|
|
}
|
|
|
|
.food-name-content {
|
|
flex: 1;
|
|
min-width: 0; /* Allow text to truncate */
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.food-brand-name {
|
|
color: var(--text-muted);
|
|
font-weight: 400;
|
|
font-style: italic;
|
|
}
|
|
|
|
.food-result-chips {
|
|
display: flex;
|
|
gap: 4px;
|
|
flex-shrink: 0;
|
|
white-space: nowrap;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
}
|
|
|
|
.food-result-description {
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
line-height: 1.4;
|
|
}
|
|
|
|
/* Micronutrient summary shown for results whose source provided per-100g data */
|
|
.food-result-micros {
|
|
margin-top: 6px;
|
|
}
|
|
|
|
.food-result-micros-label {
|
|
display: block;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.food-result-micros-chips {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 4px;
|
|
}
|
|
|
|
.food-result-micro-chip {
|
|
display: inline-block;
|
|
font-size: 11px;
|
|
padding: 1px 6px;
|
|
border-radius: 9999px;
|
|
background: var(--background-modifier-hover);
|
|
color: var(--text-normal);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* Product Image for Open Food Facts */
|
|
.food-result-image {
|
|
margin-top: 8px;
|
|
text-align: center;
|
|
}
|
|
|
|
.food-product-image {
|
|
max-width: 80px;
|
|
max-height: 60px;
|
|
border-radius: 4px;
|
|
object-fit: cover;
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
/* Dark theme adjustments */
|
|
.theme-dark .macros-source-fatsecret {
|
|
background: rgba(76, 175, 80, 0.2);
|
|
border-color: rgba(76, 175, 80, 0.4);
|
|
}
|
|
|
|
.theme-dark .macros-source-usda {
|
|
background: rgba(33, 150, 243, 0.2);
|
|
border-color: rgba(33, 150, 243, 0.4);
|
|
}
|
|
|
|
.theme-dark .macros-source-foundation {
|
|
background: rgba(156, 39, 176, 0.2);
|
|
border-color: rgba(156, 39, 176, 0.4);
|
|
}
|
|
|
|
.theme-dark .macros-source-branded {
|
|
background: rgba(255, 152, 0, 0.2);
|
|
border-color: rgba(255, 152, 0, 0.4);
|
|
}
|
|
|
|
.theme-dark .macros-source-openfoodfacts {
|
|
background: rgba(255, 87, 34, 0.2);
|
|
border-color: rgba(255, 87, 34, 0.4);
|
|
}
|
|
|
|
.theme-dark .macros-off-high-quality {
|
|
background: rgba(76, 175, 80, 0.25);
|
|
border-color: rgba(76, 175, 80, 0.5);
|
|
}
|
|
|
|
.theme-dark .macros-off-medium-quality {
|
|
background: rgba(255, 193, 7, 0.25);
|
|
border-color: rgba(255, 193, 7, 0.5);
|
|
}
|
|
|
|
.theme-dark .macros-nova-1 {
|
|
background: rgba(76, 175, 80, 0.2);
|
|
border-color: rgba(76, 175, 80, 0.4);
|
|
}
|
|
|
|
.theme-dark .macros-nova-2 {
|
|
background: rgba(255, 193, 7, 0.2);
|
|
border-color: rgba(255, 193, 7, 0.4);
|
|
}
|
|
|
|
.theme-dark .macros-nova-3 {
|
|
background: rgba(255, 152, 0, 0.2);
|
|
border-color: rgba(255, 152, 0, 0.4);
|
|
}
|
|
|
|
.theme-dark .macros-nova-4 {
|
|
background: rgba(244, 67, 54, 0.2);
|
|
border-color: rgba(244, 67, 54, 0.4);
|
|
}
|
|
|
|
/* Loading and empty states */
|
|
.macros-loading-indicator {
|
|
text-align: center;
|
|
padding: 20px;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
}
|
|
|
|
.no-results-message {
|
|
text-align: center;
|
|
padding: 20px;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Modal adjustments */
|
|
.live-food-search-modal {
|
|
min-width: 500px;
|
|
max-width: 600px;
|
|
}
|
|
|
|
.live-food-search-modal .modal-content {
|
|
max-height: 70vh;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
/* Search input styling */
|
|
.live-search-input {
|
|
width: 100%;
|
|
padding: 12px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-size: 14px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.live-search-input:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 2px rgba(var(--interactive-accent-rgb), 0.2);
|
|
}
|
|
|
|
/* Results container */
|
|
.macros-results-container {
|
|
max-height: 400px;
|
|
overflow-y: auto;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
background: var(--background-primary);
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
.macros-results-container:empty {
|
|
display: none;
|
|
}
|
|
|
|
/* Infinite scroll loading indicator */
|
|
.infinite-scroll-loading {
|
|
text-align: center;
|
|
padding: 16px;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
/* Accessibility improvements */
|
|
.macros-search-tab:focus {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.food-result-item:focus {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
/* High contrast mode support */
|
|
@media (prefers-contrast: high) {
|
|
.macros-source-chip {
|
|
opacity: 1;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.macros-source-fatsecret {
|
|
background: var(--color-green);
|
|
color: var(--background-primary);
|
|
border: 2px solid var(--color-green);
|
|
}
|
|
|
|
.macros-source-usda {
|
|
background: var(--color-blue);
|
|
color: var(--background-primary);
|
|
border: 2px solid var(--color-blue);
|
|
}
|
|
|
|
.macros-source-foundation {
|
|
background: var(--color-purple);
|
|
color: var(--background-primary);
|
|
border: 2px solid var(--color-purple);
|
|
}
|
|
|
|
.macros-source-branded {
|
|
background: var(--color-orange);
|
|
color: var(--background-primary);
|
|
border: 2px solid var(--color-orange);
|
|
}
|
|
|
|
.macros-source-openfoodfacts {
|
|
background: var(--color-red);
|
|
color: var(--background-primary);
|
|
border: 2px solid var(--color-red);
|
|
}
|
|
|
|
.macros-quality-chip,
|
|
.macros-nutrition-grade,
|
|
.macros-nova-chip {
|
|
opacity: 1;
|
|
font-weight: 700;
|
|
}
|
|
}
|
|
|
|
/* Animation for smooth transitions */
|
|
.food-result-item {
|
|
animation: fadeIn 0.2s ease-in-out;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(4px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
/* Search tabs container spacing */
|
|
.search-tabs-container {
|
|
margin: 0 0 16px 0;
|
|
}
|
|
|
|
/* Ensure proper spacing in modal */
|
|
.live-food-search-modal .modal-header {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
/* Improve readability of highlighted search terms */
|
|
.food-result-name strong {
|
|
background: rgba(var(--interactive-accent-rgb), 0.2);
|
|
padding: 1px 2px;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
/* Responsive adjustments */
|
|
@media (max-width: 600px) {
|
|
.live-food-search-modal {
|
|
min-width: 90vw;
|
|
max-width: 90vw;
|
|
}
|
|
|
|
.macros-search-tabs {
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
}
|
|
|
|
.macros-search-tab {
|
|
flex: 1 1 auto;
|
|
min-width: 100px;
|
|
max-width: calc(50% - 4px);
|
|
font-size: 12px;
|
|
padding: 6px 12px;
|
|
}
|
|
|
|
.food-result-name {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 4px;
|
|
}
|
|
|
|
.food-name-content {
|
|
width: 100%;
|
|
}
|
|
|
|
.food-result-chips {
|
|
align-self: flex-end;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.food-result-image {
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.food-product-image {
|
|
max-width: 60px;
|
|
max-height: 45px;
|
|
}
|
|
}
|
|
|
|
/* Medium screen adjustments for tabs */
|
|
@media (min-width: 601px) and (max-width: 900px) {
|
|
.macros-search-tab {
|
|
max-width: calc(50% - 4px);
|
|
min-width: 140px;
|
|
}
|
|
}
|
|
|
|
/* Large screen - allow 3 per row */
|
|
@media (min-width: 901px) {
|
|
.macros-search-tab {
|
|
max-width: calc(33.333% - 6px);
|
|
min-width: 160px;
|
|
}
|
|
}
|
|
|
|
.search-container.with-barcode {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.search-container.with-barcode .live-search-input {
|
|
padding-right: 45px; /* Make room for barcode button */
|
|
flex: 1;
|
|
}
|
|
|
|
/* Barcode Scanner Modal */
|
|
.barcode-scanner-modal {
|
|
max-width: 600px;
|
|
max-height: 80vh;
|
|
}
|
|
|
|
.barcode-scanner-header {
|
|
text-align: center;
|
|
margin-bottom: 1rem;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.barcode-scanner-status {
|
|
text-align: center;
|
|
padding: 1rem;
|
|
background-color: var(--background-secondary);
|
|
border-radius: 8px;
|
|
margin-bottom: 1rem;
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.barcode-scanner-video-container {
|
|
position: relative;
|
|
background-color: var(--background-primary-alt);
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
margin-bottom: 1rem;
|
|
min-height: 300px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.barcode-scanner-video {
|
|
width: 100%;
|
|
height: auto;
|
|
max-height: 400px;
|
|
object-fit: cover;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.barcode-scanner-controls {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.5rem;
|
|
justify-content: center;
|
|
}
|
|
|
|
.barcode-scanner-controls button {
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 6px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
background-color: var(--background-primary);
|
|
color: var(--text-normal);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.barcode-scanner-controls button:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.barcode-scanner-controls .mod-cta {
|
|
background-color: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
.barcode-scanner-controls .mod-cta:hover {
|
|
background-color: var(--interactive-accent-hover);
|
|
}
|
|
|
|
/* Manual Barcode Entry Modal */
|
|
.manual-barcode-entry-modal {
|
|
max-width: 400px;
|
|
}
|
|
|
|
.barcode-input-container {
|
|
margin: 1rem 0;
|
|
}
|
|
|
|
.barcode-manual-input {
|
|
width: 100%;
|
|
padding: 0.5rem;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
background-color: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-family: var(--font-monospace);
|
|
font-size: 1.1rem;
|
|
text-align: center;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
.barcode-manual-input:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 2px var(--interactive-accent-hover);
|
|
}
|
|
|
|
/* Enhanced search results for barcode results */
|
|
.food-result-item.barcode-result {
|
|
border-left: 3px solid var(--interactive-accent);
|
|
background-color: var(--background-secondary);
|
|
}
|
|
|
|
.food-result-item.barcode-result::before {
|
|
content: '📊';
|
|
position: absolute;
|
|
top: 0.5rem;
|
|
left: 0.5rem;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
/* Enhanced chips for barcode sources */
|
|
.macros-source-chip.macros-source-openfoodfacts {
|
|
background-color: var(--color-green);
|
|
color: white;
|
|
}
|
|
|
|
.macros-quality-chip.macros-off-high-quality {
|
|
background-color: var(--color-green);
|
|
color: white;
|
|
}
|
|
|
|
.macros-quality-chip.macros-off-medium-quality {
|
|
background-color: var(--color-orange);
|
|
color: white;
|
|
}
|
|
|
|
.macros-nutrition-grade {
|
|
font-weight: bold;
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.macros-nutrition-grade-a {
|
|
background-color: var(--color-green);
|
|
color: white;
|
|
}
|
|
|
|
.macros-nutrition-grade-b {
|
|
background-color: #8bc34a;
|
|
color: white;
|
|
}
|
|
|
|
.macros-nutrition-grade-c {
|
|
background-color: var(--color-orange);
|
|
color: white;
|
|
}
|
|
|
|
.macros-nutrition-grade-d {
|
|
background-color: #ff9800;
|
|
color: white;
|
|
}
|
|
|
|
.macros-nutrition-grade-e {
|
|
background-color: var(--color-red);
|
|
color: white;
|
|
}
|
|
|
|
.macros-nova-chip {
|
|
font-weight: bold;
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.macros-nova-1 {
|
|
background-color: var(--color-green);
|
|
color: white;
|
|
}
|
|
|
|
.macros-nova-2 {
|
|
background-color: #8bc34a;
|
|
color: white;
|
|
}
|
|
|
|
.macros-nova-3 {
|
|
background-color: var(--color-orange);
|
|
color: white;
|
|
}
|
|
|
|
.macros-nova-4 {
|
|
background-color: var(--color-red);
|
|
color: white;
|
|
}
|
|
|
|
/* Product images in search results */
|
|
.food-result-image {
|
|
margin-top: 0.5rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.food-product-image {
|
|
max-width: 60px;
|
|
max-height: 60px;
|
|
border-radius: 4px;
|
|
object-fit: cover;
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
/* Loading states */
|
|
.barcode-scanner-button.loading {
|
|
animation: pulse 1.5s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0% {
|
|
opacity: 1;
|
|
}
|
|
50% {
|
|
opacity: 0.5;
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* Mobile responsive */
|
|
@media (max-width: 768px) {
|
|
.barcode-scanner-modal {
|
|
max-width: 95vw;
|
|
max-height: 90vh;
|
|
}
|
|
|
|
.barcode-scanner-controls {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.barcode-scanner-controls button {
|
|
width: 100%;
|
|
}
|
|
|
|
.barcode-scanner-video {
|
|
max-height: 250px;
|
|
}
|
|
}
|
|
|
|
/* Dark mode adjustments */
|
|
.theme-dark .barcode-scanner-video-container {
|
|
background-color: var(--background-primary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.theme-dark .barcode-manual-input {
|
|
background-color: var(--background-primary-alt);
|
|
}
|
|
|
|
/* Metrics Section Headers */
|
|
.macroscalc-metrics-section-header {
|
|
font-size: 0.75em;
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
margin: 24px 0 12px 0; /* 24px top, 12px bottom for proper spacing */
|
|
padding: 8px 12px 4px 12px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.8px;
|
|
background: var(--background-primary-alt);
|
|
border-radius: 4px;
|
|
border-left: 3px solid var(--accent-color);
|
|
width: 100%;
|
|
max-width: 100%;
|
|
box-sizing: border-box;
|
|
overflow: hidden; /* Prevent text overflow */
|
|
word-wrap: break-word;
|
|
/* Ensure it stays within bounds */
|
|
margin-left: 0;
|
|
margin-right: 0;
|
|
}
|
|
.macroscalc-metrics-section-header:first-child {
|
|
margin-top: 0; /* No extra margin for first header */
|
|
}
|
|
.macroscalc-metrics-section-header:last-child {
|
|
margin-bottom: 0; /* Remove bottom margin from last header */
|
|
}
|
|
|
|
/* Dashboard Container Fix */
|
|
.macroscalc-dashboard-container {
|
|
width: 100%;
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
box-sizing: border-box;
|
|
}
|
|
.macroscalc-dashboard-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
box-sizing: border-box;
|
|
padding: 16px; /* Add padding around entire content */
|
|
}
|
|
|
|
/* Dashboard Header - Fix button positioning */
|
|
.macroscalc-dashboard-header .header-content {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
width: 100%;
|
|
}
|
|
|
|
.macroscalc-dashboard-header .header-label {
|
|
flex: 1;
|
|
margin-right: auto;
|
|
}
|
|
|
|
.macroscalc-dashboard-header .macroscalc-edit-metrics-btn {
|
|
margin-left: auto; /* Push to the right */
|
|
order: 1; /* Place before toggle */
|
|
}
|
|
|
|
.macroscalc-dashboard-header .toggle-icon {
|
|
order: 2; /* Place after edit button */
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Custom Metric Cards - Base styling */
|
|
.macroscalc-custom-metric-card {
|
|
background: var(--background-secondary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
padding: 8px 10px;
|
|
margin: 0;
|
|
min-height: 55px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
transition: all 0.2s ease;
|
|
position: relative;
|
|
border-left: 3px solid var(--background-modifier-border);
|
|
width: 100%;
|
|
max-width: 100%; /* Ensure cards don't exceed container */
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
min-width: 0; /* Allow flex items to shrink below content size */
|
|
}
|
|
.macroscalc-custom-metric-card:hover {
|
|
background: var(--background-secondary-alt);
|
|
border-color: var(--background-modifier-border-hover);
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
/* Colored border for specific metrics */
|
|
.macroscalc-custom-metric-card.colored-metric {
|
|
border-left-width: 4px;
|
|
}
|
|
|
|
/* Metric Label */
|
|
.macroscalc-custom-metric-card .metric-label {
|
|
font-size: 0.75em;
|
|
font-weight: 500;
|
|
color: var(--text-muted);
|
|
margin-bottom: 2px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.2px;
|
|
line-height: 1.1;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
/* Metric Value Container */
|
|
.macroscalc-custom-metric-card .metric-value {
|
|
font-size: 1.1em;
|
|
font-weight: 700;
|
|
color: var(--text-normal);
|
|
margin-bottom: 1px;
|
|
line-height: 1;
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: 2px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
/* Metric Unit */
|
|
.macroscalc-custom-metric-card .metric-value .metric-unit {
|
|
font-size: 0.6em;
|
|
font-weight: 400;
|
|
color: var(--text-muted);
|
|
margin-left: 1px;
|
|
}
|
|
|
|
/* Metric Subtext */
|
|
.macroscalc-custom-metric-card .metric-subtext {
|
|
font-size: 0.65em;
|
|
color: var(--text-muted);
|
|
font-weight: 400;
|
|
line-height: 1.1;
|
|
margin-top: 1px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
/* Create organized sections for different metric categories */
|
|
.macroscalc-metrics-category-section {
|
|
margin-bottom: 12px; /* Add spacing between sections */
|
|
width: 100%;
|
|
max-width: 100%;
|
|
box-sizing: border-box;
|
|
overflow: hidden; /* Prevent any overflow */
|
|
}
|
|
|
|
/* Consistent bottom margin for last section */
|
|
.macroscalc-metrics-category-section:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.macroscalc-metrics-category-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
|
gap: 12px;
|
|
margin-bottom: 0;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
box-sizing: border-box;
|
|
overflow: hidden; /* Prevent grid overflow */
|
|
}
|
|
|
|
/* Special grid layouts for different sections */
|
|
.macroscalc-totals-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
|
gap: 12px;
|
|
margin-bottom: 0;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
box-sizing: border-box;
|
|
overflow: hidden; /* Prevent grid overflow */
|
|
}
|
|
.macroscalc-ratios-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
|
|
gap: 12px;
|
|
margin-bottom: 0;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
box-sizing: border-box;
|
|
overflow: hidden; /* Prevent grid overflow */
|
|
}
|
|
.macroscalc-trends-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
|
gap: 12px;
|
|
margin-bottom: 0;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
box-sizing: border-box;
|
|
overflow: hidden; /* Prevent grid overflow */
|
|
}
|
|
.macroscalc-extremes-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
|
gap: 12px;
|
|
margin-bottom: 0;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
box-sizing: border-box;
|
|
overflow: hidden; /* Prevent grid overflow */
|
|
}
|
|
.macroscalc-adherence-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
|
gap: 12px;
|
|
margin-bottom: 0;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
box-sizing: border-box;
|
|
overflow: hidden; /* Prevent grid overflow */
|
|
}
|
|
|
|
/* Mobile Optimizations - Progressive responsive design */
|
|
@media (max-width: 900px) {
|
|
.macroscalc-totals-grid {
|
|
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
|
gap: 6px;
|
|
}
|
|
|
|
.macroscalc-ratios-grid {
|
|
grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
|
|
gap: 6px;
|
|
}
|
|
|
|
.macroscalc-trends-grid,
|
|
.macroscalc-extremes-grid,
|
|
.macroscalc-adherence-grid {
|
|
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
|
gap: 6px;
|
|
}
|
|
|
|
/* Reduce section header margin on tablets */
|
|
.macroscalc-metrics-section-header {
|
|
margin: 18px 0 8px 0;
|
|
padding: 6px 10px 3px 10px;
|
|
}
|
|
.macroscalc-metrics-section-header:first-child {
|
|
margin-top: 12px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
/* Remove desktop padding on mobile */
|
|
.macroscalc-dashboard-content {
|
|
padding: 0;
|
|
}
|
|
|
|
/* Rectangular cards with better proportions */
|
|
.macroscalc-custom-metric-card {
|
|
padding: 8px 6px;
|
|
min-height: 45px;
|
|
aspect-ratio: 1.4; /* Rectangular - wider than tall */
|
|
border-radius: 4px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
text-align: center;
|
|
}
|
|
|
|
.macroscalc-custom-metric-card .metric-value {
|
|
font-size: 1em;
|
|
margin-bottom: 2px;
|
|
font-weight: 700;
|
|
line-height: 1;
|
|
}
|
|
|
|
.macroscalc-custom-metric-card .metric-label {
|
|
font-size: 0.6em;
|
|
margin-bottom: 0;
|
|
letter-spacing: 0.1px;
|
|
text-align: center;
|
|
white-space: normal;
|
|
overflow: visible;
|
|
text-overflow: unset;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.macroscalc-custom-metric-card .metric-subtext {
|
|
font-size: 0.5em;
|
|
margin-top: 1px;
|
|
text-align: center;
|
|
white-space: normal;
|
|
overflow: visible;
|
|
text-overflow: unset;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
/* Consistent 3-column grid with better spacing */
|
|
.macroscalc-ratios-grid,
|
|
.macroscalc-totals-grid,
|
|
.macroscalc-extremes-grid,
|
|
.macroscalc-trends-grid,
|
|
.macroscalc-adherence-grid,
|
|
.macroscalc-metrics-category-grid {
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 8px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
/* Reduce section spacing */
|
|
.macroscalc-metrics-category-section {
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.macroscalc-metrics-section-header {
|
|
font-size: 0.65em;
|
|
margin: 12px 0 6px 0;
|
|
padding: 4px 6px 2px 6px;
|
|
}
|
|
.macroscalc-metrics-section-header:first-child {
|
|
margin-top: 6px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
/* Smaller rectangular cards for small phones */
|
|
.macroscalc-custom-metric-card {
|
|
padding: 6px 5px;
|
|
min-height: 40px;
|
|
aspect-ratio: 1.4;
|
|
}
|
|
|
|
.macroscalc-custom-metric-card .metric-value {
|
|
font-size: 0.9em;
|
|
font-weight: 700;
|
|
margin-bottom: 1px;
|
|
}
|
|
|
|
.macroscalc-custom-metric-card .metric-label {
|
|
font-size: 0.55em;
|
|
line-height: 1;
|
|
}
|
|
|
|
.macroscalc-custom-metric-card .metric-subtext {
|
|
font-size: 0.45em;
|
|
line-height: 1;
|
|
}
|
|
|
|
/* Keep 3-column grid with good spacing */
|
|
.macroscalc-ratios-grid,
|
|
.macroscalc-totals-grid,
|
|
.macroscalc-extremes-grid,
|
|
.macroscalc-trends-grid,
|
|
.macroscalc-adherence-grid,
|
|
.macroscalc-metrics-category-grid {
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 6px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
/* Section spacing */
|
|
.macroscalc-metrics-category-section {
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.macroscalc-metrics-section-header {
|
|
font-size: 0.6em;
|
|
margin: 10px 0 4px 0;
|
|
padding: 3px 5px 2px 5px;
|
|
}
|
|
.macroscalc-metrics-section-header:first-child {
|
|
margin-top: 5px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
/* Compact rectangular cards for tiny screens */
|
|
.macroscalc-custom-metric-card {
|
|
padding: 5px 4px;
|
|
min-height: 36px;
|
|
aspect-ratio: 1.4;
|
|
}
|
|
|
|
.macroscalc-custom-metric-card .metric-value {
|
|
font-size: 0.85em;
|
|
font-weight: 700;
|
|
margin-bottom: 1px;
|
|
}
|
|
|
|
.macroscalc-custom-metric-card .metric-label {
|
|
font-size: 0.5em;
|
|
line-height: 1;
|
|
}
|
|
|
|
.macroscalc-custom-metric-card .metric-subtext {
|
|
font-size: 0.4em;
|
|
line-height: 1;
|
|
}
|
|
|
|
/* 3-column grid with minimal but visible spacing */
|
|
.macroscalc-ratios-grid,
|
|
.macroscalc-totals-grid,
|
|
.macroscalc-extremes-grid,
|
|
.macroscalc-trends-grid,
|
|
.macroscalc-adherence-grid,
|
|
.macroscalc-metrics-category-grid {
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 4px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.macroscalc-metrics-category-section {
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.macroscalc-metrics-section-header {
|
|
font-size: 0.55em;
|
|
margin: 8px 0 3px 0;
|
|
padding: 2px 4px 1px 4px;
|
|
}
|
|
.macroscalc-metrics-section-header:first-child {
|
|
margin-top: 4px;
|
|
}
|
|
}
|
|
|
|
/* Special styling for different metric categories */
|
|
.macroscalc-custom-metric-card[data-category='totals'] {
|
|
background: var(--background-primary-alt);
|
|
}
|
|
.macroscalc-custom-metric-card[data-category='trends'] {
|
|
background: linear-gradient(
|
|
135deg,
|
|
var(--background-secondary) 0%,
|
|
var(--background-secondary-alt) 100%
|
|
);
|
|
}
|
|
.macroscalc-custom-metric-card[data-category='adherence'] .metric-value {
|
|
color: var(--color-green);
|
|
}
|
|
.macroscalc-custom-metric-card[data-category='extremes'] .metric-value {
|
|
color: var(--color-orange);
|
|
}
|
|
|
|
/* Animation for new metrics appearing */
|
|
.macroscalc-custom-metric-card {
|
|
animation: fadeInUp 0.3s ease-out;
|
|
}
|
|
@keyframes fadeInUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(10px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
/* Dark theme specific adjustments */
|
|
.theme-dark .macroscalc-custom-metric-card {
|
|
background: var(--background-secondary);
|
|
border-color: var(--background-modifier-border);
|
|
}
|
|
.theme-dark .macroscalc-custom-metric-card:hover {
|
|
background: var(--background-primary-alt);
|
|
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
/* Metrics Edit Modal Styles - Fixed scrolling and sizing */
|
|
.macroscalc-metrics-edit-modal {
|
|
width: 90vw;
|
|
max-width: 520px;
|
|
height: 80vh;
|
|
max-height: 700px;
|
|
/* Ensure modal itself can't scroll */
|
|
overflow: hidden;
|
|
}
|
|
|
|
.macroscalc-metrics-edit-modal .modal-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
/* Fix: Ensure content doesn't overflow */
|
|
max-height: 100%;
|
|
}
|
|
|
|
.macroscalc-metrics-edit-modal .modal-header {
|
|
flex-shrink: 0;
|
|
padding: 16px 20px 12px 20px;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
/* Ensure header doesn't shrink */
|
|
min-height: auto;
|
|
}
|
|
|
|
.macroscalc-metrics-edit-modal .modal-header h2 {
|
|
margin: 0 0 6px 0;
|
|
font-size: 1.3em;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.macroscalc-metrics-edit-modal .modal-description {
|
|
margin: 0;
|
|
color: var(--text-muted);
|
|
font-size: 0.85em;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.macroscalc-metrics-edit-modal .modal-body {
|
|
flex: 1;
|
|
/* Fix: Enable scrolling and prevent overflow */
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
padding: 16px 20px;
|
|
/* Ensure body can shrink */
|
|
min-height: 0;
|
|
/* Add scroll behavior */
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
.macroscalc-metrics-edit-modal .modal-footer {
|
|
flex-shrink: 0;
|
|
padding: 12px 20px 16px 20px;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
background: var(--background-primary-alt);
|
|
/* Ensure footer doesn't shrink */
|
|
min-height: auto;
|
|
}
|
|
|
|
/* Metrics Categories Container - Fixed for scrolling */
|
|
.metrics-categories-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
max-width: 100%;
|
|
width: 100%;
|
|
/* Fix: Remove height constraints that prevent scrolling */
|
|
min-height: min-content;
|
|
}
|
|
|
|
.metrics-category {
|
|
background: var(--background-secondary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
padding: 14px 16px;
|
|
transition: all 0.2s ease;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
/* Fix: Ensure categories can expand naturally */
|
|
min-height: auto;
|
|
}
|
|
|
|
.metrics-category:hover {
|
|
border-color: var(--background-modifier-border-hover);
|
|
background: var(--background-secondary-alt);
|
|
}
|
|
|
|
.metrics-category-header {
|
|
font-size: 0.8em;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.6px;
|
|
color: var(--text-muted);
|
|
margin-bottom: 12px;
|
|
padding-bottom: 6px;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
/* Metrics List Container */
|
|
.metrics-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Scoped Setting Items - Improved for narrow width */
|
|
.metrics-setting-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
margin: 0;
|
|
padding: 0;
|
|
border: none;
|
|
background: none;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.metrics-setting-item-header {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
margin-bottom: 6px;
|
|
width: 100%;
|
|
}
|
|
|
|
.metrics-setting-item-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
width: 100%;
|
|
}
|
|
|
|
.metrics-setting-item-name {
|
|
font-size: 0.9em;
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
margin-bottom: 3px;
|
|
line-height: 1.3;
|
|
word-wrap: break-word;
|
|
overflow-wrap: break-word;
|
|
hyphens: auto;
|
|
}
|
|
|
|
.metrics-setting-item-description {
|
|
font-size: 0.75em;
|
|
color: var(--text-muted);
|
|
line-height: 1.3;
|
|
margin: 0;
|
|
word-wrap: break-word;
|
|
overflow-wrap: break-word;
|
|
hyphens: auto;
|
|
}
|
|
|
|
.metrics-setting-item-control {
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
/* Metric Toggle Switch - Slightly smaller */
|
|
.metric-toggle {
|
|
position: relative;
|
|
width: 40px;
|
|
height: 22px;
|
|
background: var(--background-modifier-border);
|
|
border-radius: 11px;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.metric-toggle::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 2px;
|
|
left: 2px;
|
|
width: 16px;
|
|
height: 16px;
|
|
background: var(--background-primary);
|
|
border-radius: 50%;
|
|
transition: all 0.3s ease;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.metric-toggle.enabled {
|
|
background: var(--interactive-accent);
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
.metric-toggle.enabled::before {
|
|
transform: translateX(18px);
|
|
background: white;
|
|
}
|
|
|
|
.metric-toggle:hover {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.metric-toggle:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
/* Configuration Container - Improved spacing */
|
|
.metric-config-container {
|
|
margin-top: 8px;
|
|
padding: 10px 12px;
|
|
background: var(--background-primary-alt);
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
animation: slideDown 0.2s ease-out;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
@keyframes slideDown {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(-5px);
|
|
max-height: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
max-height: 200px;
|
|
}
|
|
}
|
|
|
|
/* Configuration Settings inside the container */
|
|
.metric-config-container .setting-item {
|
|
margin-bottom: 8px;
|
|
padding: 0;
|
|
border: none;
|
|
width: 100%;
|
|
}
|
|
|
|
.metric-config-container .setting-item:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.metric-config-container .setting-item-info {
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.metric-config-container .setting-item-name {
|
|
font-size: 0.8em;
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.metric-config-container .setting-item-description {
|
|
font-size: 0.7em;
|
|
color: var(--text-muted);
|
|
margin-top: 2px;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.metric-config-container .setting-item-control {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
/* Buttons - Improved for narrow modal */
|
|
.modal-button-container {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 10px;
|
|
margin: 0;
|
|
}
|
|
|
|
.btn-secondary,
|
|
.btn-primary {
|
|
padding: 7px 14px;
|
|
border-radius: 5px;
|
|
font-size: 0.85em;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
border: 1px solid;
|
|
min-width: 70px;
|
|
text-align: center;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: var(--background-secondary);
|
|
border-color: var(--background-modifier-border);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: var(--background-secondary-alt);
|
|
border-color: var(--background-modifier-border-hover);
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--interactive-accent);
|
|
border-color: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: var(--interactive-accent-hover);
|
|
border-color: var(--interactive-accent-hover);
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.btn-primary:active,
|
|
.btn-secondary:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
/* Responsive Design - Further improvements for modal */
|
|
@media (max-width: 600px) {
|
|
.macroscalc-metrics-edit-modal {
|
|
width: 95vw;
|
|
height: 90vh;
|
|
max-width: none;
|
|
}
|
|
|
|
.macroscalc-metrics-edit-modal .modal-header,
|
|
.macroscalc-metrics-edit-modal .modal-body,
|
|
.macroscalc-metrics-edit-modal .modal-footer {
|
|
padding-left: 16px;
|
|
padding-right: 16px;
|
|
}
|
|
|
|
.metrics-category {
|
|
padding: 12px 14px;
|
|
}
|
|
|
|
.metrics-setting-item-header {
|
|
gap: 10px;
|
|
}
|
|
|
|
.metrics-setting-item-name {
|
|
font-size: 0.85em;
|
|
}
|
|
|
|
.metrics-setting-item-description {
|
|
font-size: 0.7em;
|
|
}
|
|
|
|
.modal-button-container {
|
|
gap: 8px;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.btn-secondary,
|
|
.btn-primary {
|
|
width: 100%;
|
|
min-width: unset;
|
|
}
|
|
}
|
|
|
|
/* Dark theme adjustments */
|
|
.theme-dark .metrics-category {
|
|
background: var(--background-primary-alt);
|
|
border-color: var(--background-modifier-border);
|
|
}
|
|
|
|
.theme-dark .metrics-category:hover {
|
|
background: var(--background-secondary);
|
|
}
|
|
|
|
.theme-dark .metric-config-container {
|
|
background: var(--background-secondary);
|
|
}
|
|
|
|
/* Loading and disabled states */
|
|
.metric-toggle:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.metric-toggle:disabled:hover {
|
|
transform: none;
|
|
}
|
|
|
|
/* Focus states for accessibility */
|
|
.metric-toggle:focus-visible {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.btn-primary:focus-visible,
|
|
.btn-secondary:focus-visible {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* Ensure all containers respect the modal width */
|
|
.macroscalc-metrics-edit-modal * {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.macroscalc-metrics-edit-modal .modal-content,
|
|
.macroscalc-metrics-edit-modal .modal-body,
|
|
.metrics-categories-container,
|
|
.metrics-category,
|
|
.metrics-list,
|
|
.metrics-setting-item {
|
|
max-width: 100%;
|
|
}
|
|
|
|
/* Custom scrollbar styling for better UX */
|
|
.macroscalc-metrics-edit-modal .modal-body::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.macroscalc-metrics-edit-modal .modal-body::-webkit-scrollbar-track {
|
|
background: var(--background-modifier-border);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.macroscalc-metrics-edit-modal .modal-body::-webkit-scrollbar-thumb {
|
|
background: var(--text-muted);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.macroscalc-metrics-edit-modal .modal-body::-webkit-scrollbar-thumb:hover {
|
|
background: var(--text-normal);
|
|
}
|
|
|
|
/* Timestamp Modal Styles */
|
|
.timestamp-modal .modal-content {
|
|
padding: 20px;
|
|
}
|
|
|
|
.timestamp-modal-header {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.timestamp-modal-title {
|
|
margin: 0;
|
|
font-size: 1.4em;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.timestamp-modal-description {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.timestamp-description-text {
|
|
margin: 0;
|
|
color: var(--text-muted);
|
|
font-size: 0.95em;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
/* Timestamp Input Container */
|
|
.timestamp-input-container {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.timestamp-input-label {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
font-size: 0.95em;
|
|
}
|
|
|
|
.timestamp-input-time {
|
|
width: 100%;
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-size: 1em;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.timestamp-input-time:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 2px var(--interactive-accent-alpha);
|
|
}
|
|
|
|
/* Quick Time Selection */
|
|
.quick-time-container {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.quick-time-label {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.quick-time-buttons {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.quick-time-btn {
|
|
padding: 6px 12px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
background: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
font-size: 0.85em;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.quick-time-btn:hover {
|
|
background: var(--background-modifier-hover);
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
.quick-time-btn:active {
|
|
transform: translateY(1px);
|
|
}
|
|
|
|
/* Timestamp Button Container */
|
|
.timestamp-button-container {
|
|
display: flex;
|
|
gap: 12px;
|
|
justify-content: flex-end;
|
|
margin-top: 20px;
|
|
padding-top: 16px;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.timestamp-cancel-btn,
|
|
.timestamp-save-btn,
|
|
.timestamp-remove-btn {
|
|
padding: 8px 16px;
|
|
border-radius: 4px;
|
|
font-size: 0.9em;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
border: none;
|
|
}
|
|
|
|
.timestamp-cancel-btn {
|
|
background: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.timestamp-cancel-btn:hover {
|
|
background: var(--background-modifier-hover);
|
|
}
|
|
|
|
.timestamp-save-btn {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.timestamp-save-btn:hover {
|
|
background: var(--interactive-accent-hover);
|
|
}
|
|
|
|
.timestamp-remove-btn {
|
|
background: var(--color-red);
|
|
color: white;
|
|
}
|
|
|
|
.timestamp-remove-btn:hover {
|
|
background: var(--color-red-hover, #d73527);
|
|
}
|
|
|
|
/* Timestamp Icons in Tables */
|
|
.food-timestamp-icon,
|
|
.meal-timestamp-icon {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 0.9em;
|
|
opacity: 0.8;
|
|
cursor: help;
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
.food-timestamp-icon:hover,
|
|
.meal-timestamp-icon:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* Responsive Design */
|
|
@media (max-width: 768px) {
|
|
.timestamp-modal .modal-content {
|
|
padding: 16px;
|
|
}
|
|
|
|
.quick-time-buttons {
|
|
justify-content: center;
|
|
}
|
|
|
|
.quick-time-btn {
|
|
flex: 1;
|
|
min-width: 70px;
|
|
text-align: center;
|
|
}
|
|
|
|
.timestamp-button-container {
|
|
flex-direction: column-reverse;
|
|
gap: 8px;
|
|
}
|
|
|
|
.timestamp-cancel-btn,
|
|
.timestamp-save-btn,
|
|
.timestamp-remove-btn {
|
|
width: 100%;
|
|
padding: 12px;
|
|
}
|
|
}
|
|
|
|
/* Dark Theme Adjustments */
|
|
.theme-dark .timestamp-input-time {
|
|
border-color: var(--background-modifier-border-hover);
|
|
}
|
|
|
|
.theme-dark .quick-time-btn {
|
|
border-color: var(--background-modifier-border-hover);
|
|
}
|
|
|
|
.theme-dark .quick-time-btn:hover {
|
|
background: var(--background-modifier-border);
|
|
}
|
|
|
|
/* Animation for timestamp icon appearance */
|
|
@keyframes timestampAppear {
|
|
0% {
|
|
opacity: 0;
|
|
transform: scale(0.8);
|
|
}
|
|
100% {
|
|
opacity: 0.8;
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
.food-timestamp-icon,
|
|
.meal-timestamp-icon {
|
|
animation: timestampAppear 0.3s ease-out;
|
|
}
|
|
|
|
/* Ensure proper spacing between icons */
|
|
.food-name-content {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.food-name-content .macro-food-name {
|
|
flex: 1;
|
|
min-width: 0; /* Allow text truncation */
|
|
}
|
|
|
|
.food-comment-icon + .food-tolerance-icon,
|
|
.meal-comment-icon + .food-tolerance-icon {
|
|
margin-left: 2px;
|
|
}
|
|
|
|
/* Header name container for meals/groups */
|
|
.header-name-container {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.header-icons-container {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
/* Food name content container */
|
|
.food-name-content {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
width: 100%;
|
|
}
|
|
|
|
.food-icons-container {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Emoji icon styling for better visibility */
|
|
.meal-timestamp-icon,
|
|
.food-timestamp-icon,
|
|
.food-tolerance-icon,
|
|
.meal-comment-icon,
|
|
.food-comment-icon {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 12px;
|
|
opacity: 0.8;
|
|
transition: opacity 0.2s ease;
|
|
line-height: 1;
|
|
}
|
|
|
|
.food-tolerance-icon:hover,
|
|
.meal-timestamp-icon:hover,
|
|
.food-timestamp-icon:hover,
|
|
.meal-comment-icon:hover,
|
|
.food-comment-icon:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* Ensure food name doesn't get compressed */
|
|
.macro-food-name {
|
|
flex: 1;
|
|
min-width: 0; /* Allow text truncation if needed */
|
|
}
|
|
|
|
/* Mobile responsive adjustments */
|
|
@media (max-width: 768px) {
|
|
.header-name-container {
|
|
gap: 4px;
|
|
}
|
|
|
|
.food-name-content {
|
|
gap: 4px;
|
|
}
|
|
|
|
.header-icons-container,
|
|
.food-icons-container {
|
|
gap: 2px;
|
|
}
|
|
|
|
.food-tolerance-icon .meal-timestamp-icon,
|
|
.food-timestamp-icon,
|
|
.meal-comment-icon,
|
|
.food-comment-icon {
|
|
font-size: 11px;
|
|
}
|
|
}
|
|
|
|
/* Tolerance Modal Styles */
|
|
.tolerance-modal .modal-content {
|
|
padding: 20px;
|
|
}
|
|
|
|
.tolerance-modal-header {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.tolerance-modal-title {
|
|
margin: 0;
|
|
font-size: 1.4em;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.tolerance-modal-description {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.tolerance-description-text {
|
|
margin: 0;
|
|
color: var(--text-muted);
|
|
font-size: 0.95em;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
/* Severity Selection Container */
|
|
.tolerance-severity-container {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.tolerance-severity-label {
|
|
display: block;
|
|
margin-bottom: 12px;
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
font-size: 0.95em;
|
|
}
|
|
|
|
.tolerance-severity-options {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.tolerance-severity-option {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
/* Default state - ensure no selection styling */
|
|
.tolerance-severity-btn {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 12px;
|
|
width: 100%;
|
|
padding: 14px 16px;
|
|
border: 2px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
background: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
text-align: left;
|
|
min-height: 60px;
|
|
}
|
|
|
|
/* Hover state - only when not selected */
|
|
.tolerance-severity-btn:hover:not(.selected) {
|
|
background: var(--background-modifier-hover);
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
/* Selected state - explicit and high specificity */
|
|
.tolerance-severity-btn.selected {
|
|
background: var(--interactive-accent);
|
|
border-color: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
box-shadow: 0 2px 8px var(--interactive-accent-alpha);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
/* Ensure selected state takes precedence over hover */
|
|
.tolerance-severity-btn.selected:hover {
|
|
background: var(--interactive-accent-hover);
|
|
border-color: var(--interactive-accent-hover);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.severity-icon {
|
|
font-size: 18px;
|
|
line-height: 1;
|
|
flex-shrink: 0;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.severity-text {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
flex: 1;
|
|
min-width: 0; /* Allow text to wrap */
|
|
}
|
|
|
|
.severity-label {
|
|
font-weight: 500;
|
|
font-size: 0.95em;
|
|
line-height: 1.2;
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
.severity-description {
|
|
font-size: 0.82em;
|
|
opacity: 0.8;
|
|
line-height: 1.3;
|
|
word-wrap: break-word;
|
|
overflow-wrap: break-word;
|
|
}
|
|
|
|
.tolerance-severity-btn.selected .severity-description {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
/* Force reset any persistent selected states */
|
|
.tolerance-severity-btn:not(.selected) {
|
|
background: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
border-color: var(--background-modifier-border);
|
|
box-shadow: none;
|
|
transform: none;
|
|
}
|
|
|
|
.tolerance-severity-btn:not(.selected) .severity-description {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
/* Symptoms Input Container */
|
|
.tolerance-symptoms-container {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.tolerance-symptoms-label {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
font-size: 0.95em;
|
|
}
|
|
|
|
.tolerance-symptoms-textarea {
|
|
width: 100%;
|
|
min-height: 80px;
|
|
max-height: 120px;
|
|
padding: 12px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-size: 0.95em;
|
|
line-height: 1.4;
|
|
resize: vertical;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.tolerance-symptoms-textarea:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 2px var(--interactive-accent-alpha);
|
|
}
|
|
|
|
.tolerance-symptoms-textarea::placeholder {
|
|
color: var(--text-muted);
|
|
opacity: 0.7;
|
|
}
|
|
|
|
/* Character Count */
|
|
.tolerance-char-count {
|
|
text-align: right;
|
|
margin-top: 4px;
|
|
font-size: 0.8em;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.tolerance-char-count.char-count-warning {
|
|
color: var(--color-orange);
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* Tolerance Button Container */
|
|
.tolerance-button-container {
|
|
display: flex;
|
|
gap: 12px;
|
|
justify-content: flex-end;
|
|
margin-top: 20px;
|
|
padding-top: 16px;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.tolerance-cancel-btn,
|
|
.tolerance-save-btn,
|
|
.tolerance-remove-btn {
|
|
padding: 8px 16px;
|
|
border-radius: 4px;
|
|
font-size: 0.9em;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
border: none;
|
|
}
|
|
|
|
.tolerance-cancel-btn {
|
|
background: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.tolerance-cancel-btn:hover {
|
|
background: var(--background-modifier-hover);
|
|
}
|
|
|
|
.tolerance-save-btn {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.tolerance-save-btn:hover {
|
|
background: var(--interactive-accent-hover);
|
|
}
|
|
|
|
.tolerance-remove-btn {
|
|
background: var(--color-red);
|
|
color: white;
|
|
}
|
|
|
|
.tolerance-remove-btn:hover {
|
|
background: var(--color-red-hover, #d73527);
|
|
}
|
|
|
|
/* Tolerance Icons in Tables
|
|
.food-tolerance-icon {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 0.9em;
|
|
margin-left: 4px;
|
|
opacity: 0.9;
|
|
cursor: help;
|
|
transition: opacity 0.2s ease;
|
|
line-height: 1;
|
|
}
|
|
|
|
.food-tolerance-icon:hover {
|
|
opacity: 1;
|
|
transform: scale(1.1);
|
|
}
|
|
*/
|
|
|
|
/* Settings Page Tolerance Items */
|
|
.tolerances-container {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.no-tolerances-message {
|
|
padding: 16px;
|
|
background: var(--background-secondary);
|
|
border-radius: 6px;
|
|
color: var(--text-muted);
|
|
text-align: center;
|
|
font-style: italic;
|
|
}
|
|
|
|
.tolerance-item {
|
|
padding: 12px;
|
|
background: var(--background-secondary);
|
|
border-radius: 6px;
|
|
margin-bottom: 8px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.tolerance-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.tolerance-icon {
|
|
font-size: 16px;
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.tolerance-name {
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
flex: 1;
|
|
}
|
|
|
|
.tolerance-actions {
|
|
display: flex;
|
|
gap: 6px;
|
|
}
|
|
|
|
.tolerance-actions .mod-button {
|
|
padding: 4px 8px;
|
|
font-size: 0.8em;
|
|
}
|
|
|
|
.tolerance-symptoms {
|
|
color: var(--text-muted);
|
|
font-size: 0.9em;
|
|
line-height: 1.3;
|
|
margin-bottom: 4px;
|
|
font-style: italic;
|
|
}
|
|
|
|
.tolerance-date {
|
|
color: var(--text-faint);
|
|
font-size: 0.8em;
|
|
}
|
|
|
|
/* Responsive Design */
|
|
@media (max-width: 768px) {
|
|
.tolerance-modal .modal-content {
|
|
padding: 16px;
|
|
}
|
|
|
|
.tolerance-severity-btn {
|
|
padding: 12px 14px;
|
|
gap: 10px;
|
|
min-height: 55px;
|
|
}
|
|
|
|
.severity-icon {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.severity-label {
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.severity-description {
|
|
font-size: 0.78em;
|
|
}
|
|
|
|
.tolerance-symptoms-textarea {
|
|
min-height: 70px;
|
|
padding: 10px;
|
|
}
|
|
|
|
.tolerance-button-container {
|
|
flex-direction: column-reverse;
|
|
gap: 8px;
|
|
}
|
|
|
|
.tolerance-cancel-btn,
|
|
.tolerance-save-btn,
|
|
.tolerance-remove-btn {
|
|
width: 100%;
|
|
padding: 12px;
|
|
}
|
|
|
|
.tolerance-header {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 8px;
|
|
}
|
|
|
|
.tolerance-actions {
|
|
align-self: flex-end;
|
|
}
|
|
}
|
|
|
|
/* Dark Theme Adjustments */
|
|
.theme-dark .tolerance-symptoms-textarea {
|
|
border-color: var(--background-modifier-border-hover);
|
|
}
|
|
|
|
.theme-dark .tolerance-severity-btn {
|
|
border-color: var(--background-modifier-border-hover);
|
|
}
|
|
|
|
.theme-dark .tolerance-severity-btn:hover {
|
|
background: var(--background-modifier-border);
|
|
}
|
|
|
|
.theme-dark .tolerance-item {
|
|
border-color: var(--background-modifier-border-hover);
|
|
}
|
|
|
|
/* Animation for tolerance icon appearance */
|
|
@keyframes toleranceAppear {
|
|
0% {
|
|
opacity: 0;
|
|
transform: scale(0.8);
|
|
}
|
|
100% {
|
|
opacity: 0.9;
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
/*
|
|
.food-tolerance-icon {
|
|
animation: toleranceAppear 0.3s ease-out;
|
|
}
|
|
*/
|
|
|
|
/* Ensure proper icon ordering - tolerance should come first (most important) */
|
|
.food-icons-container .food-timestamp-icon {
|
|
order: 1;
|
|
}
|
|
|
|
.food-icons-container .food-tolerance-icon {
|
|
order: 2;
|
|
}
|
|
|
|
.food-icons-container .food-comment-icon {
|
|
order: 3;
|
|
}
|
|
|
|
/* Enhanced visual feedback for selected severity */
|
|
.tolerance-severity-btn.selected {
|
|
box-shadow: 0 2px 8px var(--interactive-accent-alpha);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.tolerance-severity-btn:active:not(.selected) {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
/* Ensure no residual selected state on non-selected buttons */
|
|
.tolerance-severity-btn:not(.selected):active {
|
|
transform: translateY(1px);
|
|
}
|
|
|
|
/* Better focus states */
|
|
.tolerance-severity-btn:focus-visible {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.tolerance-symptoms-textarea:focus-visible {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* ===========================================
|
|
MACROS PLUGIN - TABBED SETTINGS STYLES
|
|
=========================================== */
|
|
|
|
/* Tab Navigation */
|
|
.macros-settings-nav {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
margin-bottom: 20px;
|
|
border-right: 1px solid var(--background-modifier-border);
|
|
padding-right: 16px;
|
|
min-width: 200px;
|
|
float: left;
|
|
}
|
|
|
|
/* Individual Tab Button */
|
|
.macros-settings-tab {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 12px 16px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
background: transparent;
|
|
border: 1px solid transparent;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.macros-settings-tab:hover {
|
|
background: var(--background-modifier-hover);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.macros-settings-tab.active {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
/* Tab Icon */
|
|
.macros-settings-tab-icon {
|
|
width: 16px;
|
|
height: 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.macros-settings-tab-icon svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
}
|
|
|
|
/* Tab Label */
|
|
.macros-settings-tab-label {
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* Tab Content Area */
|
|
.macros-settings-content {
|
|
margin-left: 220px;
|
|
min-height: 400px;
|
|
padding: 0 16px;
|
|
}
|
|
|
|
/* Support Tab Specific Styles */
|
|
.buy-me-coffee-container {
|
|
text-align: center;
|
|
margin: 20px 0;
|
|
padding: 20px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
background: var(--background-secondary);
|
|
}
|
|
|
|
.buy-me-coffee-container iframe {
|
|
border: none;
|
|
width: 100%;
|
|
max-width: 400px;
|
|
height: 400px;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.support-links-container {
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.support-links-container ul {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.support-links-container li {
|
|
margin: 8px 0;
|
|
padding: 8px 12px;
|
|
background: var(--background-secondary);
|
|
border-radius: 6px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.support-links-container a {
|
|
text-decoration: none;
|
|
color: var(--text-accent);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.support-links-container a:hover {
|
|
color: var(--text-accent-hover);
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.plugin-info-container {
|
|
margin: 20px 0;
|
|
padding: 16px;
|
|
background: var(--background-secondary);
|
|
border-radius: 8px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.plugin-info-container p {
|
|
margin: 8px 0;
|
|
font-family: var(--font-monospace);
|
|
font-size: 0.9em;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.thanks-container {
|
|
margin: 20px 0;
|
|
padding: 16px;
|
|
background: var(--background-primary-alt);
|
|
border-radius: 8px;
|
|
border-left: 4px solid var(--interactive-accent);
|
|
}
|
|
|
|
.thanks-container p {
|
|
margin: 0;
|
|
font-style: italic;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
/* Food Tolerances Tab Styles */
|
|
.tolerances-container {
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.tolerance-item {
|
|
margin: 12px 0;
|
|
padding: 16px;
|
|
background: var(--background-secondary);
|
|
border-radius: 8px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.tolerance-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.tolerance-icon {
|
|
font-size: 18px;
|
|
width: 24px;
|
|
text-align: center;
|
|
}
|
|
|
|
.tolerance-name {
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.tolerance-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.tolerance-symptoms {
|
|
margin: 8px 0 4px 36px;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
}
|
|
|
|
.tolerance-date {
|
|
margin: 4px 0 0 36px;
|
|
color: var(--text-faint);
|
|
font-size: 0.85em;
|
|
}
|
|
|
|
.no-tolerances-message {
|
|
text-align: center;
|
|
padding: 40px 20px;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
background: var(--background-secondary);
|
|
border-radius: 8px;
|
|
border: 1px dashed var(--background-modifier-border);
|
|
}
|
|
|
|
/* Meal Templates Tab Styles */
|
|
.meal-templates-container {
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.no-templates-message {
|
|
text-align: center;
|
|
padding: 40px 20px;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
background: var(--background-secondary);
|
|
border-radius: 8px;
|
|
border: 1px dashed var(--background-modifier-border);
|
|
}
|
|
|
|
/* API Status Indicators */
|
|
.api-credentials-warning {
|
|
background: var(--background-modifier-error-rgb);
|
|
border: 1px solid var(--background-modifier-error);
|
|
border-radius: 6px;
|
|
padding: 12px;
|
|
margin: 8px 0;
|
|
}
|
|
|
|
.api-credentials-warning p {
|
|
margin: 0;
|
|
color: var(--text-error);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.api-credentials-success {
|
|
background: var(--background-modifier-success-rgb);
|
|
border: 1px solid var(--background-modifier-success);
|
|
border-radius: 6px;
|
|
padding: 12px;
|
|
margin: 8px 0;
|
|
}
|
|
|
|
.api-credentials-success p {
|
|
margin: 0;
|
|
color: var(--text-success);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.off-status-container {
|
|
margin: 12px 0;
|
|
}
|
|
|
|
/* Macro Templates Dropdown */
|
|
.macro-template-dropdown {
|
|
margin: 16px 0 24px 0;
|
|
}
|
|
|
|
.macro-template-dropdown .setting-item-control select {
|
|
min-width: 300px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.macro-template-info {
|
|
margin-top: 8px;
|
|
padding: 8px 12px;
|
|
background: var(--background-primary-alt);
|
|
border-radius: 4px;
|
|
border-left: 3px solid var(--interactive-accent);
|
|
font-size: 0.9em;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* Nutrition Targets Section Spacing */
|
|
.nutrition-targets-section {
|
|
margin-top: 20px;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
padding-top: 16px;
|
|
}
|
|
.energy-target-container {
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.dual-energy-inputs {
|
|
display: flex;
|
|
gap: 16px;
|
|
align-items: center;
|
|
}
|
|
|
|
.energy-input-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
min-width: 120px;
|
|
}
|
|
|
|
.energy-input-label {
|
|
font-size: 0.85em;
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.energy-input {
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-size: 14px;
|
|
}
|
|
|
|
.energy-input:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 2px var(--interactive-accent-rgb);
|
|
}
|
|
|
|
/* Sortable Tab Order Styles */
|
|
.sortable-tab-order-container {
|
|
margin: 16px 0;
|
|
}
|
|
|
|
.sortable-instructions {
|
|
margin: 0 0 12px 0;
|
|
color: var(--text-muted);
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.sortable-tab-list {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
background: var(--background-secondary);
|
|
}
|
|
|
|
.sortable-tab-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
cursor: grab;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.sortable-tab-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.sortable-tab-item:hover {
|
|
background: var(--background-modifier-hover);
|
|
}
|
|
|
|
.sortable-tab-item.dragging {
|
|
opacity: 0.5;
|
|
cursor: grabbing;
|
|
}
|
|
|
|
.sortable-tab-item.drag-over-before {
|
|
border-top: 2px solid var(--interactive-accent);
|
|
}
|
|
|
|
.sortable-tab-item.drag-over-after {
|
|
border-bottom: 2px solid var(--interactive-accent);
|
|
}
|
|
|
|
.drag-handle {
|
|
color: var(--text-muted);
|
|
cursor: grab;
|
|
user-select: none;
|
|
font-family: var(--font-monospace);
|
|
}
|
|
|
|
.tab-content {
|
|
flex-grow: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.tab-label {
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.position-indicator {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
border-radius: 50%;
|
|
width: 24px;
|
|
height: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 0.8em;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Chart Preview Styles */
|
|
.macrospc-preview-container {
|
|
margin: 20px 0;
|
|
padding: 20px;
|
|
background: var(--background-secondary);
|
|
border-radius: 8px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
text-align: center;
|
|
}
|
|
|
|
.settings-preview-canvas {
|
|
max-width: 100%;
|
|
height: auto;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
/* API Notice Styles */
|
|
.macrospc-api-notice {
|
|
margin: 16px 0;
|
|
padding: 16px;
|
|
background: var(--background-secondary);
|
|
border-radius: 6px;
|
|
border-left: 4px solid var(--interactive-accent);
|
|
}
|
|
|
|
.macrospc-api-notice p {
|
|
margin: 8px 0;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.macrospc-api-notice a {
|
|
color: var(--text-accent);
|
|
text-decoration: none;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.macrospc-api-notice a:hover {
|
|
color: var(--text-accent-hover);
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* Note Text */
|
|
.note-text {
|
|
margin: 16px 0;
|
|
padding: 12px 16px;
|
|
background: var(--background-primary-alt);
|
|
border-radius: 6px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
color: var(--text-muted);
|
|
font-size: 0.9em;
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Mobile Responsive Design */
|
|
@media (max-width: 768px) {
|
|
.macros-settings-nav {
|
|
float: none;
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 16px;
|
|
padding-right: 0;
|
|
border-right: none;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
padding-bottom: 16px;
|
|
min-width: auto;
|
|
max-width: 100%;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.macros-settings-content {
|
|
margin-left: 0;
|
|
padding: 0 8px;
|
|
}
|
|
|
|
.macros-settings-tab {
|
|
flex: 1;
|
|
min-width: 120px;
|
|
justify-content: center;
|
|
text-align: center;
|
|
padding: 10px 8px;
|
|
}
|
|
|
|
.macros-settings-tab-label {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.dual-energy-inputs {
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.energy-input-group {
|
|
min-width: 100%;
|
|
}
|
|
|
|
.buy-me-coffee-container iframe {
|
|
height: 300px;
|
|
}
|
|
|
|
.tolerance-header {
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.tolerance-actions {
|
|
width: 100%;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.tolerance-symptoms,
|
|
.tolerance-date {
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
|
|
/* Small Mobile Screens */
|
|
@media (max-width: 480px) {
|
|
.macros-settings-nav {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.macros-settings-tab {
|
|
min-width: auto;
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
.macros-settings-tab-label {
|
|
font-size: 14px;
|
|
}
|
|
}
|
|
|
|
/* Dark Mode Specific Adjustments */
|
|
.theme-dark .macros-settings-tab {
|
|
border-color: transparent;
|
|
}
|
|
|
|
.theme-dark .macros-settings-tab:hover {
|
|
background: var(--background-modifier-hover);
|
|
}
|
|
|
|
.theme-dark .macros-settings-tab.active {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
/* High Contrast Mode Support */
|
|
@media (prefers-contrast: high) {
|
|
.macros-settings-tab {
|
|
border: 2px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.macros-settings-tab.active {
|
|
border: 2px solid var(--interactive-accent);
|
|
}
|
|
|
|
.tolerance-item,
|
|
.buy-me-coffee-container,
|
|
.plugin-info-container {
|
|
border-width: 2px;
|
|
}
|
|
}
|
|
|
|
/* Reduced Motion Support */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.macros-settings-tab,
|
|
.sortable-tab-item {
|
|
transition: none;
|
|
}
|
|
}
|
|
|
|
/* Live Search Modal Styles */
|
|
.live-food-search-modal {
|
|
--search-container-height: 28px;
|
|
--barcode-button-width: 28px;
|
|
}
|
|
|
|
/* Search container with barcode button */
|
|
.search-container.macros-search-container.with-barcode {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
width: 100%;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
/* Search input styling */
|
|
.live-search-input {
|
|
flex: 1;
|
|
height: var(--search-container-height);
|
|
padding: 6px 12px;
|
|
padding-right: 32px; /* Space for 24px button + 8px margin */
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-size: 14px;
|
|
outline: none;
|
|
transition: border-color 0.2s ease;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.live-search-input:focus {
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 2px var(--interactive-accent-hover);
|
|
}
|
|
|
|
.live-search-input::placeholder {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* Barcode button styling - positioned inside the search input */
|
|
.barcode-scanner-button {
|
|
position: absolute;
|
|
right: 2px;
|
|
top: 2px;
|
|
width: 24px;
|
|
height: 24px;
|
|
background: var(--background-modifier-border-hover);
|
|
border: none;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--text-normal);
|
|
opacity: 0.9;
|
|
transition: all 0.2s ease;
|
|
z-index: 10;
|
|
}
|
|
|
|
.barcode-scanner-button:hover {
|
|
background: var(--background-modifier-border-hover);
|
|
opacity: 1;
|
|
transform: translateY(-50%) scale(1.05);
|
|
}
|
|
|
|
.barcode-scanner-button:active {
|
|
transform: translateY(-50%) scale(0.95);
|
|
}
|
|
|
|
/* Icon sizing within the barcode button - override Obsidian's default SVG size */
|
|
.barcode-scanner-button svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
stroke-width: 2;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Focus states for accessibility */
|
|
.barcode-scanner-button:focus {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 1px;
|
|
}
|
|
|
|
/* Dark theme adjustments */
|
|
.theme-dark .barcode-scanner-button {
|
|
background: var(--background-modifier-hover);
|
|
}
|
|
|
|
.theme-dark .barcode-scanner-button:hover {
|
|
background: var(--background-modifier-border-hover);
|
|
}
|
|
|
|
/* Mobile responsive adjustments */
|
|
@media (max-width: 768px) {
|
|
.live-food-search-modal {
|
|
--search-container-height: 32px;
|
|
--barcode-button-width: 32px;
|
|
}
|
|
|
|
.live-search-input {
|
|
font-size: 16px; /* Prevents zoom on iOS */
|
|
padding: 8px 12px;
|
|
padding-right: 36px; /* Adjusted for mobile button */
|
|
}
|
|
|
|
.barcode-scanner-button {
|
|
right: 4px;
|
|
width: 25px;
|
|
height: 25px;
|
|
}
|
|
|
|
.barcode-scanner-button svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
}
|
|
}
|
|
|
|
/* High contrast mode support */
|
|
@media (prefers-contrast: high) {
|
|
.barcode-scanner-button {
|
|
border: 1px solid var(--text-normal);
|
|
}
|
|
|
|
.barcode-scanner-button:hover {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
}
|
|
|
|
/* Reduced motion support */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.barcode-scanner-button {
|
|
transition: none;
|
|
}
|
|
|
|
.barcode-scanner-button:hover {
|
|
transform: none;
|
|
}
|
|
|
|
.barcode-scanner-button:active {
|
|
transform: none;
|
|
}
|
|
}
|
|
|
|
.meals-header-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 1rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.create-meal-template-button {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
padding: 0.625rem 1rem;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
border-radius: 6px;
|
|
transition: all 0.15s ease;
|
|
cursor: pointer;
|
|
border: 1px solid var(--background-modifier-border-hover);
|
|
background-color: var(--background-modifier-form-field);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.create-meal-template-button:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
color: var(--text-normal);
|
|
border-color: var(--background-modifier-border-focus);
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.create-meal-template-button:active {
|
|
background-color: var(--background-modifier-active-hover);
|
|
transform: scale(0.99);
|
|
}
|
|
|
|
/* Adjust meals container when header is present */
|
|
.meals-container.active {
|
|
padding-top: 0;
|
|
}
|
|
|
|
/* Responsive adjustments */
|
|
@media (max-width: 768px) {
|
|
.meals-header-section {
|
|
padding: 0.75rem;
|
|
}
|
|
|
|
.create-meal-template-button {
|
|
padding: 0.5rem 0.875rem;
|
|
font-size: 0.8125rem;
|
|
}
|
|
}
|
|
/* =========================================================
|
|
Micronutrients feature
|
|
========================================================= */
|
|
|
|
/* ---- Settings: Micronutrients tab ---- */
|
|
.micronutrient-profile-info {
|
|
margin: 0.25rem 0 1rem;
|
|
padding: 0.5rem 0.75rem;
|
|
border-left: 3px solid var(--interactive-accent);
|
|
background-color: var(--background-secondary);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.micronutrient-targets-container {
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
/* Inputs that are showing a recommended placeholder (no override set) */
|
|
.micronutrient-input-default::placeholder {
|
|
color: var(--text-faint);
|
|
font-style: italic;
|
|
}
|
|
|
|
/* ---- Manual food entry: optional micronutrient section ---- */
|
|
.micronutrient-entry-section {
|
|
margin: 1rem 0;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.micronutrient-entry-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
padding: 0.6rem 0.75rem;
|
|
cursor: pointer;
|
|
background-color: var(--background-secondary);
|
|
user-select: none;
|
|
}
|
|
|
|
.micronutrient-entry-header:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.micronutrient-entry-toggle {
|
|
font-size: 0.75rem;
|
|
color: var(--text-muted);
|
|
width: 1rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.micronutrient-entry-title {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.micronutrient-entry-body {
|
|
padding: 0.75rem;
|
|
}
|
|
|
|
.micronutrient-picker-row {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
align-items: center;
|
|
margin: 0.5rem 0 0.75rem;
|
|
}
|
|
|
|
.micronutrient-picker-row .micronutrient-select {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* The shared form-input styling is tuned for text inputs (large vertical
|
|
padding, centered text) which clips a native <select>. Restore native
|
|
select rendering with left-aligned, fully visible text. */
|
|
.micronutrient-select {
|
|
-webkit-appearance: menulist;
|
|
appearance: menulist;
|
|
text-align: left;
|
|
text-align-last: left;
|
|
padding: 0.45rem 0.6rem;
|
|
font-size: 0.95rem;
|
|
line-height: normal;
|
|
height: auto;
|
|
min-height: 2.25rem;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.micronutrient-select:focus {
|
|
transform: none;
|
|
}
|
|
|
|
.micronutrient-select option,
|
|
.micronutrient-select optgroup {
|
|
color: var(--text-normal);
|
|
background-color: var(--background-primary);
|
|
}
|
|
|
|
.micronutrient-add-btn {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.micronutrient-fields-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.micronutrient-field-row {
|
|
margin: 0;
|
|
}
|
|
|
|
.micronutrient-input-wrapper {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.micronutrient-input-wrapper input {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.micronutrient-remove-btn {
|
|
flex: 0 0 auto;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* ---- Processor: macrosmicro table ---- */
|
|
.macrosmicro-container {
|
|
margin: 0.5rem 0;
|
|
}
|
|
|
|
.macrosmicro-header {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 0.5rem;
|
|
margin-top: 0.75rem;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
gap: 0.4rem;
|
|
}
|
|
|
|
.macrosmicro-header:hover .macrosmicro-title {
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.macrosmicro-toggle {
|
|
font-size: 0.7rem;
|
|
color: var(--text-muted);
|
|
width: 0.9rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.macrosmicro-body {
|
|
margin-top: 0.25rem;
|
|
}
|
|
|
|
.macrosmicro-title {
|
|
font-size: 1.05rem;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.macrosmicro-loading,
|
|
.macrosmicro-empty {
|
|
padding: 0.75rem;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
}
|
|
|
|
.macrosmicro-error {
|
|
padding: 0.75rem;
|
|
color: var(--text-error);
|
|
}
|
|
|
|
.macrosmicro-table {
|
|
width: 100%;
|
|
}
|
|
|
|
.macrosmicro-table th {
|
|
text-align: left;
|
|
}
|
|
|
|
.macrosmicro-category-row td {
|
|
background-color: var(--background-secondary);
|
|
font-weight: 600;
|
|
padding-top: 0.4rem;
|
|
padding-bottom: 0.4rem;
|
|
}
|
|
|
|
.macrosmicro-category-label {
|
|
text-transform: uppercase;
|
|
font-size: 0.75rem;
|
|
letter-spacing: 0.04em;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.macrosmicro-name {
|
|
font-weight: 500;
|
|
}
|
|
|
|
.macrosmicro-limit-badge {
|
|
margin-left: 0.4rem;
|
|
padding: 0.05rem 0.35rem;
|
|
font-size: 0.65rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.03em;
|
|
border-radius: 3px;
|
|
background-color: var(--background-modifier-border);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.macrosmicro-amount,
|
|
.macrosmicro-target {
|
|
white-space: nowrap;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.macrosmicro-percent-cell {
|
|
min-width: 120px;
|
|
}
|
|
|
|
.macrosmicro-bar-wrap {
|
|
position: relative;
|
|
height: 8px;
|
|
border-radius: 4px;
|
|
background-color: var(--background-modifier-border);
|
|
overflow: hidden;
|
|
margin-bottom: 0.2rem;
|
|
}
|
|
|
|
.macrosmicro-bar {
|
|
height: 100%;
|
|
border-radius: 4px;
|
|
transition: width 0.3s ease;
|
|
background-color: var(--interactive-accent);
|
|
}
|
|
|
|
.macrosmicro-bar.is-low {
|
|
background-color: var(--color-red, #e05252);
|
|
}
|
|
|
|
.macrosmicro-bar.is-near {
|
|
background-color: var(--color-orange, #e0a052);
|
|
}
|
|
|
|
.macrosmicro-bar.is-met {
|
|
background-color: var(--color-green, #52b788);
|
|
}
|
|
|
|
.macrosmicro-bar.is-within-limit {
|
|
background-color: var(--color-green, #52b788);
|
|
}
|
|
|
|
.macrosmicro-bar.is-over-limit {
|
|
background-color: var(--color-red, #e05252);
|
|
}
|
|
|
|
.macrosmicro-percent-label {
|
|
font-size: 0.75rem;
|
|
color: var(--text-muted);
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.macrosmicro-footnote {
|
|
margin-top: 0.5rem;
|
|
font-size: 0.75rem;
|
|
color: var(--text-faint);
|
|
}
|
|
|
|
.macros-u-hidden { display: none; }
|
|
|
|
/* === Food name cell layout (appended override) === */
|
|
.macros-table td:first-child {
|
|
padding-left: 4px;
|
|
}
|
|
.macro-food-name-container {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
width: 100%;
|
|
padding: 2px 0;
|
|
gap: 4px;
|
|
}
|
|
.food-name-content {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
}
|
|
.macro-food-name {
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
width: auto;
|
|
max-width: 100%;
|
|
margin: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.food-icons-container {
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
/* Center the "Food" column header. The td:first-child left-align above is
|
|
meant for the food-name data cells, not the header cell, so restore center
|
|
alignment to match the other column headers. */
|
|
.macros-table .column-header:first-child {
|
|
text-align: center;
|
|
}
|