html,
body {
  color: #020202;
  font: 12px 'Helvetica Neue', Arial, Helvetica, Geneva, sans-serif;
}

body {
  line-height: 20px;
}

::-moz-selection {
  background-color: #020202;
  color: white;
}

::selection {
  background-color: #020202;
  color: white;
}

a {
  text-decoration: none;
}

p {
  margin-bottom: 20px;
}

h3 {
  color: white;
  font-size: 20px;
  text-transform: uppercase;
  line-height: 20px;
  margin-bottom: 20px;
  margin-top: 20px;
  font-weight: 500;
}

#container {
  background-color: #fbc52d;
  min-width: 320px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;

  overflow: hidden;
  padding-top: 40px;
}

@media only screen and(min-device-width: 640px) {
  #container {
    margin-top: 40px;
  }
}

#header {
  color: white;
  margin-bottom: 60px;
  margin-left: 40px;
  margin-right: 40px;
}

#header h1 {
  font-size: 40px;
  line-height: 40px;
  text-transform: uppercase;
  font-weight: 500;
}

#header h1 a {
  color: white;
}

#header .tagline {
  font: italic 16px Georgia, 'Times New Roman', Times, serif;
}

#results {
  text-align: center;
  margin-bottom: 60px;
}

#results .information a,
#results .app-promo-footer a {
  text-decoration: underline;
  color: black;
}

#results .shutter_count {
  font-size: 80px;
  line-height: 80px;
  color: white;
  margin-bottom: 20px;
  margin-top: 20px;
}

#results .model {
  margin-bottom: 20px;
}

.next {
  margin-top: 20px;
}

.next a {
  color: white;
  font-size: 14px;
  text-transform: uppercase;
}

#cameras,
#upload,
#results {
  padding-left: 40px;
  padding-right: 40px;
}

#cameras {
  background-color: #020202;
  color: white;

  margin-top: 60px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.supported {
  text-transform: uppercase;
  font-size: 10px;
  color: green;
}

.canon-link {
  margin-top: 24px;
  margin-bottom: 0;
  font-size: 12px;
}

.canon-link a {
  color: white;
  text-decoration: underline;
}

.ebay_link {
    padding-top: 30px;
      padding-bottom: 10px;
}

.ebay_link a {
    background-color: #287e29;
color: white;
  padding: 9px;
  border-radius: 5px;
    text-decoration: none;
}

.ebay_link a:hover {
  background-color: #085c12;

}

.ebay_affiliate_disclosure {
      margin-bottom: 30px;
}

/* "Use our app" result — readable items, a clear button, a quiet Mac note */
.app-pitch p {
  max-width: 600px;
  margin: 0 auto 14px;
  font-size: 16px;
  line-height: 1.5;
}
#results .information a.app-cta {
  display: inline-block;
  margin: 18px 0 6px;
  padding: 14px 30px;
  background-color: #020202;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
}
#results .information a.app-cta:hover {
  background-color: #333;
}
/* Fujifilm USB call for testers, the Fujifilm count-wrap caveat on bodies the
   app reads, and the cumulative-count note on the Canon bodies whose photos
   carry only the total, all shown with a successful result in place of the
   generic app footer. Reuse .app-cta for the button. */
#results .fuji-usb-help,
#results .fuji-count-wraps,
#results .cumulative-count {
  max-width: 600px;
  margin: 30px auto 0;
  padding: 20px 24px;
  border: 2px solid #020202;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.4);
}
#results .fuji-usb-help p,
#results .fuji-count-wraps p,
#results .cumulative-count p {
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.5;
}
#results .fuji-usb-help a.app-cta,
#results .fuji-count-wraps a.app-cta,
#results .cumulative-count a.app-cta {
  margin-bottom: 0;
  font-size: 16px;
}
/* The caveat sits directly under the number it qualifies, ahead of the eBay
   link, so it spaces from the model line above rather than from a link. */
#results .information.fuji-count-wraps {
  margin: 0 auto 30px;
}
/* A body still being tested: the caveat, then the call for testers. */
#results .fuji-usb-help p + p {
  margin-top: 14px;
}

.digitalphotogallery {
  background-color: black;
  padding-top: 10px;
  padding-bottom: 10px;
}

.digitalphotogallery a {
  background-image: url("/assets/digitalphotogallery-47b982ed.png");
  width: 221px;
  height: 28px;
  display: block;
  text-indent: 100%;
  white-space: nowrap;
  overflow: hidden;
  background-size: 221px 28px;
  margin-left: auto;
  margin-right: auto;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .digitalphotogallery a {
    background-image: url("/assets/digitalphotogallery@2x-8a91616d.png");
  }
}

#footer {
  background-color: white;
  text-align: right;
  text-transform: none;
  font: 10px 'Helvetica Neue', Arial, Helvetica, Geneva, sans-serif;
}

#footer p {
  margin-bottom: 0;
  padding-top: 5px;
  padding-bottom: 5px;
}

#footer a {
  color: #000;
}

/* Phone-photo guidance shares the existing app-pitch text and CTA styling. */
#results.photo-source-result {
  overflow-wrap: anywhere;
}

.photo-source-steps {
  max-width: 520px;
  margin: 24px auto 0;
  padding-inline-start: 24px;
  list-style: decimal;
  text-align: start;
  font-size: 16px;
  line-height: 1.5;
}

.photo-source-steps li {
  padding-inline-start: 8px;
  margin-bottom: 16px;
}

.photo-source-steps li::marker {
  font-weight: 700;
}

/* Leica owner-study invitation: use the same typography and CTA as Canon. */
#results.leica-experiment-result {
  overflow-wrap: anywhere;
}

.leica-experiment-steps {
  margin-top: 24px;
  margin-bottom: 8px;
}

.app-pitch .leica-experiment-note {
  margin-top: 24px;
  margin-bottom: 0;
  font-size: 14px;
}


#upload fieldset {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#upload .chooser {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

#upload input[type="file"] {
  box-sizing: border-box;
  color: #020202;
  cursor: pointer;
  display: block;
  font: 16px 'Helvetica Neue', Arial, Helvetica, Geneva, sans-serif;
  width: 100%;
}

#upload .chooser.mirrored #file {
  height: 48px;
  overflow: hidden;
}

#upload #file_name {
  background-color: #fde08a;
  border-radius: 5px;
  height: 48px;
  line-height: 48px;
  padding: 0 14px;
  pointer-events: none;
}

#upload #file_name[hidden] {
  display: none;
}

#upload #file_name::file-selector-button {
  border: 0;
  display: inline-block;
  font-size: 0;
  height: 0;
  margin: 0;
  opacity: 0;
  padding: 0;
  width: 0;
}

#upload input[type="file"]::file-selector-button {
  -webkit-tap-highlight-color: transparent;
  background-color: transparent;
  border: 2px solid #020202;
  border-radius: 5px;
  box-sizing: border-box;
  color: #020202;
  cursor: pointer;
  display: block;
  font: bold 18px 'Helvetica Neue', Arial, Helvetica, Geneva, sans-serif;
  height: 48px;
  line-height: normal;
  margin: 0;
  padding: 0 30px;
  width: 100%;
}

#upload input[type="submit"] {
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  background-color: #020202;
  border: 0;
  border-radius: 5px;
  box-sizing: border-box;
  color: white;
  cursor: pointer;
  font: bold 18px 'Helvetica Neue', Arial, Helvetica, Geneva, sans-serif;
  min-height: 48px;
  padding: 0 30px;
  width: 100%;
}

@media (hover: hover) {
  #upload input[type="file"]:hover::file-selector-button {
    background-color: #020202;
    color: white;
  }

  #upload input[type="submit"]:not(.sending):hover {
    background-color: green;
  }
}

#upload input[type="file"]:active::file-selector-button {
  background-color: #005a00;
  border-color: #005a00;
  color: white;
}

#upload input[type="submit"]:not(.sending):active {
  background-color: #005a00;
}

#upload input[type="file"]:focus-visible,
#upload input[type="submit"]:focus-visible {
  outline: 3px solid white;
  outline-offset: 2px;
}

#upload input[type="submit"].sending {
  background-color: green;
  cursor: default;
}

#upload_progress {
  align-items: center;
  background-color: #020202;
  border-radius: 5px;
  bottom: 0;
  box-sizing: border-box;
  color: white;
  display: flex;
  font-size: 16px;
  height: 48px;
  left: 0;
  overflow: hidden;
  padding: 0 14px;
  position: absolute;
  right: 0;
}

#upload_progress[hidden],
#upload_cancel[hidden] {
  display: none;
}

#upload_progress .bar {
  background-color: green;
  bottom: 0;
  left: 0;
  position: absolute;
  top: 0;
  width: 0;
}

#upload_progress .text {
  flex: 1;
  font-weight: bold;
  position: relative;
}

#upload_progress.failed {
  background-color: #fde08a;
  color: #020202;
  height: auto;
  margin-top: 12px;
  padding: 10px 14px;
  position: static;
}

#upload_progress a {
  -webkit-tap-highlight-color: transparent;
  align-items: center;
  align-self: stretch;
  color: white;
  display: flex;
  font-weight: bold;
  margin: 0 -14px 0 12px;
  padding: 0 18px;
  position: relative;
  text-decoration: none;
}

@media (hover: hover) {
  #upload_progress a:hover {
    background-color: red;
  }
}

#upload_progress a:active {
  background-color: #b80000;
}

@media (max-width: 640px) {
  html {
    background-color: #fbc52d;
  }

  #container {
    padding-top: 32px;
  }

  #header {
    margin-bottom: 48px;
    margin-left: max(24px, env(safe-area-inset-left));
    margin-right: max(24px, env(safe-area-inset-right));
  }

  #header .tagline {
    line-height: 22px;
    margin-top: 10px;
    text-wrap: balance;
  }

  #upload > p {
    text-wrap: balance;
  }

  #cameras,
  #upload,
  #results {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }

  h3 {
    margin-bottom: 12px;
    margin-top: 0;
  }

  #cameras {
    margin-top: 48px;
    padding-bottom: 32px;
    padding-top: 32px;
  }

  #cameras h4 {
    margin-bottom: 8px;
  }

  .supported {
    line-height: 17px;
  }

  #results {
    margin-bottom: 48px;
  }

  .ebay_link a,
  .next a {
    display: inline-block;
    padding: 13px 20px;
  }

  .next {
    margin-top: 8px;
  }

  #footer {
    background-color: #fbc52d;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
    padding-top: 12px;
    text-align: left;
  }

  #footer a {
    display: inline-block;
    padding-bottom: 12px;
    padding-top: 12px;
  }
}
