diff --git a/iframe.html b/iframe.html index dbd8103..589c954 100644 --- a/iframe.html +++ b/iframe.html @@ -497,6 +497,29 @@ background-color: #433c4f; color: #b8b0c2; } + + .dog-calculator-container.theme-dark .dog-calculator-inline-unit { + background-color: #312b3b; + border-color: rgba(241, 154, 95, 0.5); + color: #f5f3f7; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); + background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5f3f7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); + } + + .dog-calculator-container.theme-dark .dog-calculator-inline-unit:hover { + border-color: #f19a5f; + box-shadow: 0 2px 6px rgba(241, 154, 95, 0.3); + } + + .dog-calculator-container.theme-dark .dog-calculator-inline-unit:focus { + border-color: #f19a5f; + box-shadow: 0 0 0 3px rgba(241, 154, 95, 0.15); + } + + .dog-calculator-container.theme-dark .dog-calculator-inline-unit option { + background-color: #312b3b; + color: #f5f3f7; + } .dog-calculator-container.theme-dark .dog-calculator-results { background: linear-gradient(135deg, rgba(241, 154, 95, 0.15) 0%, rgba(241, 154, 95, 0.08) 100%); @@ -604,6 +627,29 @@ background-color: #433c4f; color: #b8b0c2; } + + .dog-calculator-container.theme-system .dog-calculator-inline-unit { + background-color: #312b3b; + border-color: rgba(241, 154, 95, 0.5); + color: #f5f3f7; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); + background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5f3f7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); + } + + .dog-calculator-container.theme-system .dog-calculator-inline-unit:hover { + border-color: #f19a5f; + box-shadow: 0 2px 6px rgba(241, 154, 95, 0.3); + } + + .dog-calculator-container.theme-system .dog-calculator-inline-unit:focus { + border-color: #f19a5f; + box-shadow: 0 0 0 3px rgba(241, 154, 95, 0.15); + } + + .dog-calculator-container.theme-system .dog-calculator-inline-unit option { + background-color: #312b3b; + color: #f5f3f7; + } .dog-calculator-container.theme-system .dog-calculator-results { background: linear-gradient(135deg, rgba(241, 154, 95, 0.15) 0%, rgba(241, 154, 95, 0.08) 100%); @@ -1474,6 +1520,108 @@ cursor: help; } + /* Inline unit selector in results */ + .dog-calculator-inline-unit { + margin-left: 12px; + min-width: 110px; + padding: 4px 8px; + background: var(--bg-primary); + border: 1px solid rgba(241, 154, 95, 0.4); + border-radius: 6px; + color: var(--text-primary); + font-size: 0.9rem; + font-weight: 500; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + transition: all 0.2s ease; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f3f6d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 8px center; + background-size: 16px; + padding-right: 32px; + } + + .dog-calculator-inline-unit:hover { + border-color: #f19a5f; + box-shadow: 0 2px 6px rgba(241, 154, 95, 0.2); + } + + .dog-calculator-inline-unit:focus { + outline: none; + border-color: #f19a5f; + box-shadow: 0 0 0 3px rgba(241, 154, 95, 0.1); + } + + /* Inline days input in breakdown header */ + .dog-calculator-inline-days { + width: 60px; + padding: 2px 6px; + border: 1px solid var(--border-color); + border-radius: 4px; + text-align: center; + font-size: inherit; + font-family: inherit; + margin: 0 4px; + } + + /* Mobile responsive adjustments for inline unit selector */ + @media (max-width: 576px) { + .dog-calculator-result-item { + display: flex; + flex-direction: column; + align-items: center; + gap: 8px; + } + + .dog-calculator-result-label { + width: 100%; + text-align: center; + margin-bottom: 4px; + } + + .dog-calculator-result-value { + display: inline-block; + } + + .dog-calculator-inline-unit { + display: inline-block; + margin-left: 8px; + min-width: 90px; + vertical-align: middle; + } + + /* Center the breakdown header on mobile */ + .dog-calculator-section-title { + text-align: center; + } + + /* Ensure food breakdown items stay on one line */ + .dog-calculator-food-amount-item { + display: flex; + justify-content: space-between; + align-items: center; + flex-wrap: nowrap; + text-align: left; + } + + .dog-calculator-food-amount-label { + flex: 1; + min-width: 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-align: left; + } + + .dog-calculator-food-amount-value { + flex-shrink: 0; + margin-left: 8px; + text-align: right; + } + } + .dog-calculator-total-row { display: flex; justify-content: space-between; @@ -1556,13 +1704,28 @@ /* Responsive adjustments */ @media (max-width: 576px) { .dog-calculator-food-amount-item { - flex-direction: column; + flex-direction: row !important; gap: 0.5rem; - text-align: center; + text-align: left !important; + justify-content: space-between !important; + align-items: center !important; + flex-wrap: nowrap !important; } .dog-calculator-food-amount-label { - justify-content: center; + justify-content: flex-start !important; + text-align: left !important; + flex: 1; + min-width: 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .dog-calculator-food-amount-value { + flex-shrink: 0; + margin-left: 8px; + text-align: right !important; } .dog-calculator-food-source-name-input { @@ -1652,19 +1815,7 @@
Total Daily Amount: - g/day -
- - - -
-
- - -
Please enter a valid number of days (minimum 1)
-
-
- - @@ -1674,7 +1825,12 @@