/* ---------------------------------------------------------------------------
   RATE

   The one tab that is not a mockup of an app, so it has no app's look to
   match. It borrows the shell's own vocabulary instead: the same blue as a
   selected rating, the same green as a saved note, the same 12px radii and
   type sizes, so it reads as part of the page around it rather than a fourth
   dating app nobody has heard of.
   --------------------------------------------------------------------------- */

.app-rate {
  padding: 62px 16px 28px;
  background: #fff;
  min-height: 100%;
}

.app-rate .rate-q {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.2px;
  margin: 0 0 6px;
}

.app-rate .rate-blurb {
  font-size: 13.5px;
  line-height: 1.45;
  color: #6d6d72;
  margin: 0 0 16px;
}

/* What the number is about, so nobody has to tab back to remember. Square
   crops at three across: small enough to stay subordinate to the scale,
   large enough to recognise a face in. Small enough, too, that nobody should
   have to score a face at this size, so each one is a button that opens the
   photo full size over the page. */
.app-rate .rate-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.app-rate .rate-photo {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 10px;
  font-family: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.app-rate button.rate-photo { cursor: zoom-in; }
.app-rate .rate-photo:focus-visible {
  outline: 2px solid #3a6fd8;
  outline-offset: 2px;
}
.app-rate .rate-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  border-radius: 10px;
}
/* Small enough to leave the photo alone, plain enough to read as a control
   rather than as something printed on the picture. */
.app-rate .rate-zoom-hint {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.app-rate .rate-zoom-hint svg {
  width: 13px;
  height: 13px;
  display: block;
}

.app-rate .photo-slot {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: #f1f1f4;
  color: #9a9aa1;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px;
}

/* --- The scale ------------------------------------------------------------
   Two rows of five rather than one row of ten. Ten across the 332px this
   screen has to spend leaves 32px a tile, which no thumb can hit; five
   leaves 60. The rows also put 1 and 10 at opposite corners, so the ends of
   the scale are where the labels under them say they are.                   */

.app-rate .rate-scale {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}
.app-rate .score-row {
  display: flex;
  gap: 8px;
}

.app-rate .score {
  flex: 1;
  height: 54px;
  border: 1.5px solid #dededf;
  border-radius: 12px;
  background: #fff;
  color: #55555c;
  font-family: inherit;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.app-rate .score:hover:not(.on):not([disabled]) { border-color: #b9c6e4; }
.app-rate .score.on {
  background: #3a6fd8;
  border-color: #3a6fd8;
  color: #fff;
}
/* Saved: the same tile, in the green the rest of the page uses for a note
   that has landed. Disabled only until Change it is pressed. */
.app-rate .score[disabled] { cursor: default; }
.app-rate .score[disabled].on {
  background: #2f9e5e;
  border-color: #2f9e5e;
}

.app-rate .rate-anchors {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 11.5px;
  font-weight: 700;
  color: #8a8a90;
}

/* --- Note, and committing it ---------------------------------------------- */

.app-rate .rate-note,
.app-rate .rate-note-saved {
  width: 100%;
  margin-top: 22px;
  border: 1.5px solid #dededf;
  border-radius: 12px;
  padding: 13px 14px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  color: #1a1a1a;
  background: #fff;
  resize: vertical;
}
.app-rate .rate-note:focus { outline: none; border-color: #3a6fd8; }
.app-rate .rate-note-saved { white-space: pre-wrap; }

.app-rate .btn {
  width: 100%;
  margin-top: 12px;
}
.app-rate .btn[disabled] {
  color: #9a9aa1;
  cursor: default;
}

.app-rate .rate-done {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: #2f9e5e;
}
.app-rate .rate-done svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: currentColor;
}

.app-rate .rate-foot {
  font-size: 11.5px;
  line-height: 1.45;
  color: #8a8a90;
  margin: 14px 0 0;
}
