/* The optional sticker option of the wish, guestbook, map note and favourite spaces forms
   (hyd-sticker-reward.js): a toggle on a row of its own, and the box it opens: a scrolling grid of
   sticker covers, the email field, two notice lines and the age-and-permission tick. Text takes
   each form's own colour; lines use the forms' shared #89818f grey. Every rule starts with the four form ids inside :is(), which
   outweighs each form's own input, label and paragraph rules. Loaded after the forms' sheets. */
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) .sticker-reward {
  margin: 12px 0;
  padding: 0;
  border: 1px solid #89818f;
  border-radius: 4px;
  color: inherit;
  font: calc(13 * var(--px))/1.5 var(--desktop-font, 'Lucida Grande', Tahoma, sans-serif);
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) .sticker-reward [hidden] {
  display: none !important;
}

/* The toggle: a clear disclosure control on a row of its own, above the consent line and the
   action buttons. A bordered, full-width button in the form's own text colour (the border and
   tint come from currentColor, so it reads on every form's paper), with a triangle, a small
   cover from the desk's own sticker art and the whole sentence. */
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) .sticker-reward-row {
  display: block;
  margin: 12px 0 8px;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) button.sticker-reward-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 40px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: rgba(127, 127, 127, 0.14);
  box-shadow: none;
  color: inherit;
  font: 600 calc(13 * var(--px))/1.3 var(--desktop-font, 'Lucida Grande', Tahoma, sans-serif);
  text-align: left;
  text-decoration: none;
  text-shadow: none;
  cursor: pointer;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) button.sticker-reward-toggle::before {
  content: '\25b8';
  content: '\25b8' / '';
  order: -2;
  flex: none;
  width: 1em;
  text-align: center;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook)
  button.sticker-reward-toggle[aria-expanded='true']::before {
  content: '\25be';
  content: '\25be' / '';
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) button.sticker-reward-toggle .sticker-reward-glyph {
  order: -1;
  flex: none;
  width: 20px;
  height: 20px;
  object-fit: contain;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) button.sticker-reward-toggle .sticker-reward-glyph:not([src]) {
  display: none;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) button.sticker-reward-toggle:hover {
  background: rgba(127, 127, 127, 0.26);
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) button.sticker-reward-toggle:focus-visible {
  outline: 3px solid #85bbef;
  outline-offset: 2px;
}
/* The favourite spaces form's light paper takes that form's own ring colour (hyd-place-notebook.css). */
#hyd-place-notebook button.sticker-reward-toggle:focus-visible {
  outline-color: #387cb8;
}
/* The guestbook's cream paper takes the guestbook's own ring colour (hyd-guestbook.css). */
#desk-guestbook button.sticker-reward-toggle:focus-visible {
  outline-color: #466382;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) button.sticker-reward-toggle:disabled {
  opacity: 0.6;
  cursor: default;
}
@media (pointer: coarse), (max-width: 550px) {
  :is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) button.sticker-reward-toggle {
    min-height: 44px;
  }
}

/* The open box, right under the toggle. */
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) .sticker-reward .sticker-reward-body {
  padding: 8px 10px 10px;
}

/* The picker: a radio group of covers in a box that scrolls, so the form keeps its length. */
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) .sticker-reward .sticker-reward-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) .sticker-reward legend {
  margin: 0 0 6px;
  padding: 0;
  font-size: calc(12 * var(--px));
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) .sticker-reward .sticker-reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 4px;
  max-height: 232px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid #89818f;
  border-radius: 3px;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) .sticker-reward .sticker-reward-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-sizing: border-box;
  min-height: 92px;
  margin: 0;
  padding: 4px 2px;
  color: inherit;
  font: calc(11 * var(--px))/1.25 var(--desktop-font, 'Lucida Grande', Tahoma, sans-serif);
  text-align: center;
}
/* The radio covers its whole cell: the cell is the touch target and shows focus and the choice.
   !important beats the site-wide 24 px !important size for radios (hyd-classic-desktop.css). */
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook)
  .sticker-reward
  .sticker-reward-choice
  input[type='radio'] {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  background: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook)
  .sticker-reward
  .sticker-reward-choice
  input[type='radio']:checked {
  border-color: currentColor;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook)
  .sticker-reward
  .sticker-reward-choice
  input[type='radio']:checked
  ~ span {
  font-weight: 700;
  text-decoration: underline;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook)
  .sticker-reward
  .sticker-reward-choice
  input[type='radio']:focus-visible {
  outline: 2px solid #85bbef;
  outline-offset: 1px;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook)
  .sticker-reward
  .sticker-reward-choice
  input[type='radio']:disabled {
  cursor: default;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) .sticker-reward .sticker-reward-choice img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) .sticker-reward .sticker-reward-choice span {
  overflow-wrap: anywhere;
}

/* Email: 16 px text so a phone does not zoom on focus; the map note composer's paper colours. */
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) .sticker-reward .sticker-reward-email {
  display: block;
  margin: 10px 0 0;
  font-size: calc(13 * var(--px));
  font-weight: 600;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook)
  .sticker-reward
  .sticker-reward-email
  input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 4px 0 0;
  font-size: calc(16 * var(--px));
  font-weight: 400;
}
#hyd-map-note .sticker-reward .sticker-reward-email input {
  padding: 8px 9px;
  border: 1px solid var(--paper-edge,#89818f);
  border-radius: 3px;
  background: var(--paper-inset,#1c1a20);
  color: var(--paper-text,#f5f3f6);
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) .sticker-reward .sticker-reward-notice p {
  margin: 6px 0 0;
  color: inherit;
  font: calc(11 * var(--px))/1.45 var(--desktop-font, 'Lucida Grande', Tahoma, sans-serif);
}

/* The age-and-permission tick: the whole row is the touch target. */
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) .sticker-reward .sticker-reward-adult {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  box-sizing: border-box;
  min-height: 44px;
  margin: 8px 0 0;
  padding: 6px 0;
  font-size: calc(12 * var(--px));
  font-weight: 400;
  cursor: pointer;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook)
  .sticker-reward
  .sticker-reward-adult
  input {
  flex: none;
  display: inline-block;
  margin: 0;
  padding: 0;
}

/* Messages for a partly filled box, in each form's own error colour. */
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) .sticker-reward .sticker-reward-error {
  display: block;
  font-size: calc(12 * var(--px));
  font-weight: 400;
}
:is(#desk-wishes, #hyd-map-note) .sticker-reward .sticker-reward-error {
  color: #f3b9b6;
}
#desk-guestbook .sticker-reward .sticker-reward-error {
  color: #633b36;
}
#hyd-place-notebook .sticker-reward .sticker-reward-error {
  color: #8f2f22;
}
:is(#desk-wishes, #desk-guestbook, #hyd-map-note, #hyd-place-notebook) .sticker-reward :disabled {
  opacity: 0.6;
}
