/* Application styles */

/* Field log exposure list */
.exposure-list {
  border-top: 1px solid #808080;
}

.exposure-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #808080;
  font-family: var(--font-sans);
  font-size: 12px;
}

.exposure-row-title {
  font-weight: bold;
  font-size: 14px;
}

.exposure-row-detail {
  color: #444;
}

.exposure-row-right {
  text-align: right;
  white-space: nowrap;
  color: #444;
}

/* Win98-inspired segmented control */
.segmented-control {
  display: flex;
  gap: 1px;
  width: 60%;
  align-self: center;
  font-family: var(--font-sans);
  font-size: 18px;
}

@media (min-width: 640px) {
  .segmented-control {
    font-size: 11px;
  }
}

.segmented-control label {
  flex: 1 1 0%;
  min-width: 0;
  padding: 4px 16px;
  cursor: pointer;
  background: #c0c0c0;
  color: #222;
  user-select: none;
  text-align: center;
  box-shadow:
    inset 1px 1px #fff,
    inset -1px -1px #000,
    inset 2px 2px #dfdfdf,
    inset -2px -2px #808080;
}

.segmented-control input[type="radio"] {
  appearance: none;
  position: absolute;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented-control label:has(input:checked) {
  font-weight: bold;
  box-shadow:
    inset -1px -1px #fff,
    inset 1px 1px #000,
    inset -2px -2px #dfdfdf,
    inset 2px 2px #808080;
  padding: 5px 15px 3px 17px;
}

/* Computation readout */
.computation-readout {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-family: var(--font-sans);
  font-size: 18px;
  padding: 6px 12px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  border-radius: 3px;
}

@media (min-width: 640px) {
  .computation-readout {
    font-size: 11px;
  }
}

/* Custom exposure steppers: override phaedo-ui defaults */
.aperture-stepper .stepper-segment,
.speed-stepper .stepper-segment {
  position: relative !important;
  min-width: 0;
}

/* Aperture stepper overrides */
.aperture-stepper {
  max-width: 14rem;
}

/* Speed stepper overrides */
.speed-stepper {
  max-width: none;
}

.speed-stepper-minute,
.speed-stepper-second {
  flex: none;
  width: 5rem;
}

.speed-stepper-fraction {
  flex: none;
  width: 8.5rem;
}

.speed-stepper-minute .stepper-segment-value,
.speed-stepper-second .stepper-segment-value {
  padding-right: 8px;
}

.speed-stepper .stepper-segment-value small {
  font-size: 0.5em;
  font-weight: normal;
  opacity: 0.6;
  vertical-align: baseline;
}

.speed-stepper-fraction .stepper-segment-value {
  text-align: left;
  padding-left: 8px;
}

.aperture-stepper-whole {
  flex: none;
  width: 10rem;
}

.aperture-stepper-fraction {
  flex: none;
  width: 3.5rem;
}

.aperture-stepper-fraction .stepper-segment-value {
  text-align: left;
  padding-left: 8px;
}

/* Field log tab panel needs flex column for margin-top: auto on save button */
.toolbar-tabs [role="tabpanel"] {
  display: flex;
  flex-direction: column;
}

/* Exposure form buttons */
.save-exposure-btn,
.cancel-exposure-btn {
  display: block;
  width: 100%;
  flex-shrink: 0;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: 18px;
  color: #222;
  background: #c0c0c0;
  border: none;
  box-shadow:
    inset 1px 1px #fff,
    inset -1px -1px #000,
    inset 2px 2px #dfdfdf,
    inset -2px -2px #808080;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

/* Side-by-side in the exposure tab button row */
.flex.gap-2 > .save-exposure-btn,
.flex.gap-2 > .cancel-exposure-btn {
  flex: 1;
  width: auto;
}

.save-exposure-btn:active,
.cancel-exposure-btn:active {
  box-shadow:
    inset -1px -1px #fff,
    inset 1px 1px #000,
    inset -2px -2px #dfdfdf,
    inset 2px 2px #808080;
  padding: 9px 15px 7px 17px;
}

@media (min-width: 640px) {
  .save-exposure-btn,
  .cancel-exposure-btn {
    font-size: 11px;
  }
}

.computation-readout--error {
  color: #a00;
  font-weight: bold;
}
