/* The Presidential Hackathon Scoring Aid.
   Copyright 2026 imacat.  All rights reserved.
   Authors:
     imacat@mail.imacat.idv.tw (imacat), 2026/9/4
   AI assistance: Claude Code (Anthropic)

   @module css/app Site-wide styling: hides the number input spinners, joins
   the proposal list score inputs into a single visual input group, gives
   the proposal list score inputs a fixed width, keeps the proposal list
   textareas wide enough to edit, keeps the line breaks of the proposal list
   comments and notes, and lays out the discussion record of the proposal
   detail page. */

/* Hide the up/down spinner arrows on every number input, site-wide. */
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Join the five proposal list score cells into one visual input group: their
   inputs sit edge to edge sharing a single border, with rounded corners only
   on the outer sides of the leftmost and rightmost inputs. */
td.score-group-cell {
  padding-left: 0;
  padding-right: 0;
}

td.score-group-cell .score-input {
  position: relative;
  width: 100%;
  border-radius: 0;
  margin-left: -1px;
}

td.score-group-first .score-input {
  margin-left: 0;
  border-top-left-radius: var(--bs-border-radius-sm);
  border-bottom-left-radius: var(--bs-border-radius-sm);
}

td.score-group-last .score-input {
  border-top-right-radius: var(--bs-border-radius-sm);
  border-bottom-right-radius: var(--bs-border-radius-sm);
}

td.score-group-cell .score-input:focus {
  z-index: 3;
}

td.score-group-cell .score-input.is-invalid {
  z-index: 2;
  padding-right: 0.5rem;
  background-image: none;
}

/* Keep every textarea of the proposal list table wide enough to be usable
   whichever column it sits in. */
#proposal-table textarea {
  min-width: 5rem;
}

/* Give every score input of the proposal list table a fixed width that
   shows a two-digit score in full, neither stretched to fill its column nor
   squeezed narrower. */
#proposal-table .score-input {
  width: 2rem;
}

/* Keep the final review comment textarea of the proposal list table wide
   enough to write a comment in, however narrow its column is squeezed. */
#proposal-table .final-comment-input {
  min-width: 10rem;
}

/* Keep the line breaks of every comment and note column of the proposal list
   table, wrapping long lines. */
#proposal-table .preliminary-meeting-note-cell,
#proposal-table .final-comment-cell,
#proposal-table .final-note-cell,
#proposal-table .comment-cell,
#proposal-table .note-cell {
  white-space: pre-wrap;
}

/* Keep the line breaks and the paragraph gaps of the discussion record on the
   proposal detail page, wrapping long lines. */
.discussion {
  white-space: pre-wrap;
}
