/* Photo assistance inherits the active calculator; amber means a value needs checking. */
.calculator .photo-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  font-family: var(--sans);
}
.calculator #photo-pick {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: inherit;
  background: transparent;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 8px;
  cursor: pointer;
}
.calculator #photo-pick:hover {
  background: color-mix(in srgb, currentColor 10%, transparent);
}
.calculator .photo-dialog {
  width: min(340px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid #dfe3d9;
  border-radius: 12px;
  background: #fff;
  color: #193b35;
  font-family: var(--sans);
}
.calculator .photo-dialog::backdrop {
  background: #071b16aa;
}
.calculator .photo-dialog h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 18px/1.3 var(--sans);
  margin-bottom: 20px;
}
.calculator #photo-pick img,
.calculator .photo-title-icon {
  object-fit: contain;
  flex-shrink: 0;
}
.calculator .photo-dialog button {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border: 1px solid #dfe3d9;
  border-radius: 6px;
  background: #edf2eb;
  color: #193b35;
  font: 500 15px var(--sans);
}
.calculator .photo-dialog .photo-cancel {
  background: transparent;
  border-color: transparent;
}
.calculator .photo-camera-dialog {
  width: min(520px, calc(100% - 32px));
}
.calculator #photo-video {
  display: block;
  width: 100%;
  max-height: 45vh;
  border-radius: 6px;
  background: #0b211c;
}
.calculator #photo-camera-status {
  margin: 10px 0;
}
.calculator #photo-shutter:disabled {
  opacity: 0.5;
  cursor: wait;
}
.calculator .photo-panel p {
  flex-basis: 100%;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}
.calculator .photo-actions button {
  border: 1px solid currentColor;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  padding: 8px 11px;
  font: 600 12px var(--sans);
  cursor: pointer;
}
.calculator .photo-previews {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.calculator .photo-previews:empty {
  display: none;
}
.calculator .photo-previews img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 5px;
}
.calculator .photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.calculator .photo-actions button {
  min-height: 44px;
}
.calculator #photo-analyse {
  background: #f1d277;
  color: #302708;
  border-color: #f1d277;
}
.calculator #photo-analyse:disabled {
  opacity: 0.65;
  cursor: wait;
}
.calculator #photo-remove {
  border-color: transparent;
}
.calculator #photo-remove:not([hidden]) {
  display: grid;
  place-items: center;
}
.calculator #photo-privacy {
  font-size: 11px;
  opacity: 0.8;
}
.calculator #photo-status:empty {
  display: none;
}
.calculator #photo-status[data-error="true"] {
  color: #a02020;
}
html .calculator .controls .photo-field-badge,
html .calculator .controls #photo-purity-radio-badge {
  display: inline-block;
  color: #5c4100;
  background: #ffebac;
  border-radius: 4px;
  padding: 2px 6px;
  font: 600 10px/1.5 var(--sans);
  margin-left: 5px;
  vertical-align: 1px;
}
html .calculator .controls #photo-purity-radio-badge:empty {
  display: none;
}
html .calculator .controls .photo-field-help,
html
  .calculator
  .controls
  .weight-control[data-photo-state="estimated"]
  #weight-help {
  display: block;
  color: #614500;
  background: #fff4cf;
  border-left: 3px solid #d9a526;
  border-radius: 3px;
  padding: 8px 10px;
  margin-top: 8px;
  font: 400 12px/1.5 var(--sans);
}
html
  .calculator
  .controls
  .weight-control[data-photo-state="estimated"]
  .weight-input {
  background: #fff0b8;
  color: #3d2c00;
  border-color: #d9a526;
}
html
  .calculator
  .controls
  .weight-control[data-photo-state="estimated"]
  .weight-input
  input,
html
  .calculator
  .controls
  .weight-control[data-photo-state="estimated"]
  .weight-input
  > span {
  color: #3d2c00;
}
html .calculator [hidden] {
  display: none;
}
html .calculator .controls [hidden] {
  display: none;
}
@media (max-width: 480px) {
  html .calculator .controls .photo-field-badge {
    margin: 4px 0 0;
  }
}
