/*
 * Additions to the Rails app's application.css (a verbatim copy next to this file).
 * Only what the Rails pages did with JavaScript, or what the new app needs to look
 * the same; the design itself comes from the WordPress theme and application.css.
 */

/* The user list highlighted the row under the mouse (Rails: highlightTable() adding tr.selected-tr) */
#users-list-body tr.data:hover td.column0,
#users-list-body tr.data:hover td.column1,
#users-list-body tr.data:hover td.column0-orderby,
#users-list-body tr.data:hover td.column1-orderby {
  background-color: #FFFFDD;
}

/* The user list's ✖ that clears the search (2026-11-07), inside the search box at its right end */
div.top div.actions #action-search span.search-box {
  position: relative;
  display: inline-block;
}
div.top div.actions #action-search span.with-clear input {
  padding-right: 1.4em;
}
div.top div.actions #action-search a.search-clear {
  position: absolute;
  right: 0.3em;
  top: 50%;
  transform: translateY(-50%);
  font-size: 75%;
  line-height: 1;
  color: #888;
  cursor: pointer;
}
div.top div.actions #action-search a.search-clear:hover {
  color: #333;
}

/* The admin tasks were GET links; they are POST forms now (CSRF), drawn like the links */
div.admin-tasks form.link-form {
  display: inline;
  margin: 0;
  padding: 0;
}
div.admin-tasks form.link-form button {
  border: none;
  background: none;
  padding: 0;
  margin: 0 0 10px 0;
  font: inherit;
  color: black;
  cursor: pointer;
}
div.admin-tasks form.link-form button:hover {
  text-decoration: underline;
}

div.admin-tasks button.link-button {
  border: none;
  background: none;
  padding: 0;
  margin: 0 0 10px 0;
  font: inherit;
  color: black;
  cursor: pointer;
}
div.admin-tasks button.link-button:hover {
  text-decoration: underline;
}

/* Rails' "削除" was a link with a confirmation (rails-ujs); here a form drawn like the link */
form.link-form-inline {
  display: inline;
  margin: 0;
  padding: 0;
}
form.link-form-inline button {
  border: none;
  background-color: transparent;
  font: normal 95% arial, sans-serif;
  color: black;
  cursor: pointer;
}

/* The actions of an application, at the table's top right like the user's 編集 and メール (2026-10-30) */
#action-create-user,
#action-resend,
#action-reject {
  margin: 0px;
  padding: 3px 8px 5px 20px;
}
#action-resend {
  /* the user's メール icon */
  background: url(24-image.png) 1px center / 16px 16px no-repeat;
}
#action-create-user {
  background: url(24-em-plus.png) 1px center / 16px 16px no-repeat;
}
#action-reject {
  background: url(24-em-cross.png) 1px center / 16px 16px no-repeat;
}

/* Widths of the wide inputs (2026-10-24): size=60 at the theme's larger font pushed the tables past the right
   edge, and stretching them to the full width made the tables needlessly wide. They now have a width for
   their content (30em holds a path such as /opt/church.ne.jp/mail/<address>/; the admin mail form's fields
   40em), never more than the cell, and the tables never more than the body (15px margins each side). */
div.body table.matrix {
  max-width: calc(100% - 30px);
}
div.body table.matrix td.value input[type="text"][size="60"],
div.body table.matrix td.value textarea {
  width: 30em;
  max-width: 100%;
  box-sizing: border-box;
}
div.body table.matrix td.value input[type="text"][size="100"] {
  width: 40em;
  max-width: 100%;
  box-sizing: border-box;
}

/* The status options had different line heights on the show page (16px icons with vertical-align -9px) and the
   edit form (radio buttons), so the two tables differed in height (2026-10-23): one 22px line per option on
   both, the icon or radio button centred. */
div.body table.matrix td.value span.status-option {
  display: block;
  height: 22px;
  line-height: 22px;
  white-space: nowrap;
}
div.body table.matrix td.value span.status-option img.icon-status,
div.body table.matrix td.value span.status-option input[type="radio"] {
  vertical-align: middle;
  margin-top: 0;
  margin-bottom: 0;
}

/* The tables of the show page and the edit form (classes t-*) all take the body's full width, with the same label
   column (2026-11-03, user: their widths differed from table to table): 12em, down to 9em in a narrow window, where a
   long label takes two lines; the values take the rest. A text value on the show page gets the height of the form's
   input (28px; with the 7px padding the rows are 43px on both). */
div.body table.matrix:is(.t-dates, .t-basic, .t-plus, .t-flags, .t-ftp, .t-goaccess, .t-mail, .t-uapp, .t-access, .t-history, .t-memo) {
  width: calc(100% - 30px);
}
/* The flags' columns have the same width, whatever their labels (2026-11-05, user); a long label breaks in a narrow window */
div.body table.matrix.t-flags { table-layout: fixed; overflow-wrap: anywhere; }
/* Their labels in the middle, over the values (2026-11-07, user) */
div.body table.matrix.t-flags td.column { text-align: center; }
/* less room at their sides (2026-11-14, user; 10px before), so that a label breaks less in its fixed-width column */
div.body table.matrix.t-flags td.column { padding-left: 3px; padding-right: 3px; }
/* The first table leaves room for the action links (表示, 削除 and so on) at the top right (2026-11-03, user) */
div.body table.matrix.t-dates { width: calc(100% - 30px - 8rem); }
div.body table.matrix:is(.t-dates, .t-basic, .t-plus, .t-ftp, .t-goaccess, .t-mail, .t-uapp, .t-access, .t-history, .t-memo) td.column:not(.table-header) {
  width: 12em;
  min-width: 9em;
}
div.body table.matrix td.value:has(> input.button) { white-space: nowrap; }
/* The labels stay on one line (2026-11-03, user); when the body is narrower than that, the button moves under the
   input rather than the table going past the body's right edge */
div.body table.matrix.t-basic td.column { white-space: nowrap; }
div.body table.matrix.t-basic td.value:has(> input.button) { white-space: normal; }
/* inputs centred like the buttons next to them (they sat 2-3px apart, and the rows were 45px instead of 43px) */
div.body table.matrix td.value input[type="text"],
div.body table.matrix td.value input[type="password"],
div.body table.matrix td.value input[type="datetime-local"] {
  vertical-align: middle;
}
/* A row across the table, above its first label (the FTP table's URL, 2026-11-03, user); a long URL wraps */
div.body table.matrix td.column.table-header { text-align: left; }
/* Every title row the same height, a little lower than the other rows, on a slightly darker blue (2026-11-07, user) */
div.body table.matrix td.column.table-header {
  height: 26px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 26px;
  background: #C9DDF7;
}
div.body table.matrix tr.disabled td.column.table-header { background: #D4D4D4; }
/* A discontinued row whose username is taken again (lib/users.ts usernameReused, 2026-11-08, user): its FTP, Web,
   mail and WordPress tables are shown only, every cell as dark as a grey title row. "tbody tr" raises the
   specificity over the tr.disabled rules further down. */
div.body table.matrix.reused-locked tbody tr td.column,
div.body table.matrix.reused-locked tbody tr td.value,
div.body table.matrix.reused-locked tbody tr td.value.value-warn,
div.body table.matrix.reused-locked tbody tr td.column.table-header {
  background: #D4D4D4;
  color: #777;
}
div.body table.matrix.reused-locked tbody tr td a { color: #8A8A8A; }
/* "(ユーザ名再利用中)" after 廃止済み (components/status-name.tsx) */
span.status-reused { color: red; }
div.body table.matrix td.column.table-header a { word-break: break-all; color: inherit; }
/* The URL or address after a table's title (2026-11-04, user): a little apart from it, in a light grey */
div.body table.matrix td.column.table-header .table-title-detail { margin-left: 1em; color: #999; }
div.body table.matrix tr.disabled td.column.table-header .table-title-detail { color: #AAA; }
/* A mail feature that a church.ne.jp user should have on but has off (2026-11-06, user) */
div.body table.matrix td.value.value-warn { background: #FFE0E0; }
/* A button at the right end of a table's title row (the mail table's 無効化, 2026-11-06, user) */
div.body table.matrix td.column.table-header input.table-title-action { float: right; padding: 0 10px; }
/* Small enough for the title row's height (2026-11-07, user): smaller font and padding */
div.body table.matrix td.column.table-header input.table-title-action {
  height: 20px;
  margin: 3px 0 0 0;
  padding: 0 6px;
  font-size: 80%;
  line-height: 18px;
}
/* The existence mark of the show page in front of a wide input on the edit form (2026-11-04, user) */
div.body table.matrix td.value span.with-mark { display: flex; align-items: center; gap: 6px; } /* gap: 2026-11-07, user */
div.body table.matrix td.value span.with-mark img { flex: none; margin-bottom: 0; }
div.body table.matrix td.value span.with-mark input { min-width: 0; }
/* The history keeps its height when empty (2026-11-03, user) */
div.body table.matrix td.value.history-value,
div.body table.matrix.like-form td.value.history-value {
  height: 6em;
  vertical-align: top;
  font-size: 90%;
}
div.body table.matrix:is(.t-basic, .t-ftp, .t-mail) td.value input[type="text"][size="60"],
div.body table.matrix.t-memo td.value textarea {
  width: 100%;
}
/* The directory names of the WordPress table as wide as their cells (2026-11-03, user) */
div.body table.matrix.t-uapp td.value input[type="text"] {
  width: 100%;
  box-sizing: border-box;
}
div.body table.matrix td.value span.subtask {
  white-space: nowrap;
}
/* Both pages (2026-11-04, user): a value that cannot be edited looks the same on the edit form */
:is(#users-show-body, #users-edit-body) table.matrix.like-form td.value {
  height: 28px;
}
:is(#users-show-body, #users-edit-body) table.matrix.t-plus td.value {
  /* two lines on the edit form: the link and the "+spam" checkbox */
  height: 43px;
}
#users-show-body table.matrix.t-memo td.value {
  height: 177px;
  vertical-align: top;
}

/* Input text in the normal black everywhere in the app (the theme greys it, #888), also the search box of
   the user list in the header bar (found 2026-10-24) */
div.users input[type="text"],
div.users input[type="password"],
div.users input[type="datetime-local"],
div.users textarea,
div.users select {
  color: #000;
}

/* A read-only input (the FTP used size while its recount is chosen) looks disabled */
div.body table.matrix td.value input[readonly] {
  background-color: #EEE;
  color: #666;
}

/* The private key's box of the user page's password (decrypt-password.tsx): room between the box, the buttons and
   the note below (2026-11-13, user) */
div.body div.decrypt-password-buttons {
  margin-top: 10px;
}
/* the note is inline (small): as a block, so that the room above it counts */
div.body div.decrypt-password-buttons + small {
  display: block;
  margin-top: 10px;
}

/* A saved user's password field holding a new password (2026-11-13): the save will change it */
div.body span.password-changed {
  color: #D00;
  font-weight: bold;
}

/* Inputs named in a failed save (2026-10-24), besides the messages above the form */
div.body input.field-error,
div.body textarea.field-error {
  border: 2px solid #D00;
  outline: none;
}

/* Buttons next to inputs: the same height line */
div.body table.matrix td.value input.button {
  vertical-align: middle;
  /* 28px high, as the text inputs (measured 2026-10-24) */
  padding: 1px 10px;
}

/* Gaps between the tables as on the edit form (2026-10-24): there each table sits in a fieldset, so its 7px
   bottom and the next table's 15px top margin add up to 22px; on the show page they collapsed to 15px. */
#users-show-body div.matrix,
#requests-show-body div.matrix,
#requests-edit-body div.matrix {
  display: flow-root;
}

/* An application whose address the applicant has not verified (2026-10-30, user) */
span.request-unverified {
  color: #D00;
}

/* The state of an application with its icon on one line (2026-10-30, user): the icon centred on the text,
   not lowered as the user list's icons alone in their cells (application.css) */
span.request-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
div.body span.request-state img.icon-status,
div.body span.request-state img.icon-boolean {
  vertical-align: middle;
  margin: 0;
}
/* In place of the 12px check where the address is not verified, so that 未確認 starts where 検証済み does */
span.request-state span.icon-blank {
  display: inline-block;
  width: 12px;
  height: 12px;
  flex: none;
}

/* The correction of an application (2026-10-30, user): its table over the body's width, the inputs over the
   whole cell; the postal code keeps its width and the address takes the rest of the line */
#requests-edit-body table.matrix.t-content {
  width: calc(100% - 30px);
}
#requests-edit-body table.matrix.t-content td.column {
  width: 1%;
  white-space: nowrap;
}
#requests-edit-body table.matrix.t-content td.value input[type="text"],
#requests-edit-body table.matrix.t-content td.value textarea {
  width: 100%;
  box-sizing: border-box;
}
#requests-edit-body span.request-address {
  display: flex;
  align-items: center;
  gap: 0.5em;
}
#requests-edit-body span.request-address input#request_zip {
  flex: 0 0 8em;
}
#requests-edit-body span.request-address input#request_address {
  flex: 1 1 auto;
}

/* Values centred in their rows on both pages (the theme sets baseline); the memo and history stay at the top
   (the more specific rule above) */
div.body table.matrix td.value {
  vertical-align: middle;
}

/* Links longer than their table's value column (the home page URL of a long user name) wrap */
div.body table.matrix td.value a {
  word-break: break-all;
}

/* The date-time inputs of the records of use (FTP last login, my-page last access) drawn like the theme's text
   inputs, which the theme styles only for type="text" (2026-10-24) */
div.body table.matrix td.value input[type="datetime-local"] {
  font: inherit;
  font-size: 100%;
  background-color: #FAFAFA;
  border: 1px solid #DDD;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
  padding: 2px 3px;
}

/* Rows whose feature flag is off (lib/user-rules.ts featureRowClasses, 2026-10-24): grey, on both pages; the
   inputs keep their look and stay editable */
div.body table.matrix tr.disabled td.column {
  background: #E4E4E4;
  color: #777;
}
div.body table.matrix tr.disabled td.value {
  background: #F2F2F2;
  color: #777;
}
div.body table.matrix tr.disabled td.value a {
  color: #8A8A8A;
}

/* Admin mail form (2026-10-24): the "ウェルカムメールを生成" button halfway between the title bar and the
   table (the body has a 1px top padding and the table a 15px top margin, so the button had 6px above it and
   20px below), and the Body textarea as wide as its cell */
form.users-mail-form > div.buttons:first-of-type {
  padding-top: 14px;
}

/* The send buttons of the forms at the bottom right (2026-10-30, user), in line with the tables' right margin
   (15px); the theme had them at the left (application.css: margin-left 20px). The mail form's first row
   (ウェルカムメールを生成) fills the form, it does not send it, and stays at the left. */
div.body div.buttons {
  text-align: right;
  margin: 0 15px 0 0;
}
div.body form.users-mail-form > div.buttons:first-of-type {
  text-align: left;
  margin: 0 0 0 20px;
}
form.users-mail-form table.matrix td.value textarea {
  width: 100%;
  box-sizing: border-box;
}
/* The table over the body's full width (2026-11-14, user), as the show page's tables; the labels (From, ..., Body)
   take what they need and the inputs the rest */
div.body form.users-mail-form table.matrix {
  width: calc(100% - 30px);
}
div.body form.users-mail-form table.matrix td.column {
  width: 1%;
  white-space: nowrap;
}
/* the header inputs (From, To, CC, BCC, Subject) as wide as their cells too (2026-10-30, user) */
div.body form.users-mail-form table.matrix td.value input[type="text"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* My page user information (2026-10-24): every row as high as the rows with an input (28px, as the
   show page), so the text-only rows (団体名, 名前) match the 担当者 and 住所 rows */
#matrix-userinfo td.value {
  height: 28px;
}
/* My page 変更 buttons under the bottom right of their table (2026-10-30, user): the tables are narrower than
   the body, so the right-aligned buttons ended far right of them. Each form is now as wide as its table, and
   the buttons (right-aligned above, 15px right margin like the table) end at the table's right edge. */
#users-my-body form.users-my-form {
  width: fit-content;
  max-width: 100%;
}

/* User list (2026-10-24): the table stayed wider than the title bar above it, because long words (user names,
   forwarding addresses) cannot wrap and set the columns' minimum widths. The page now puts a wrap point (<wbr>)
   after each "@" and "." of an address, so the table keeps to the width of the bar; a piece that is still too
   long for its cell breaks where it overflows (break-word, which unlike anywhere does not add break points to
   the minimum width, so the <wbr> points are used first). */
#users-list-body table {
  max-width: 100%;
}
#users-list-body td {
  overflow-wrap: break-word;
}
/* The user list one line per user (2026-11-14, user; until then the addresses wrapped after "@" and "."): nothing
   wraps, the table takes the bar's width with fixed shares per column (set on the headers), and the text columns
   are cut with "…" where they do not fit (the whole text on hover, users/page.tsx). */
#users-list-body table.users-list {
  width: 100%;
  table-layout: fixed;
}
#users-list-body table.users-list :is(th, td) {
  white-space: nowrap;
}
#users-list-body table.users-list td.text {
  overflow: hidden;
  text-overflow: ellipsis;
}
#users-list-body table.users-list th#users-list-body-th-status { width: 5em; }
#users-list-body table.users-list th#users-list-body-th-username { width: 22%; }
#users-list-body table.users-list th#users-list-body-th-organization { width: 18%; }
#users-list-body table.users-list th#users-list-body-th-name { width: 16%; }
#users-list-body table.users-list th#users-list-body-th-contact { width: 11%; }
#users-list-body table.users-list th#users-list-body-th-mail_alias { width: 22%; }
#users-list-body table.users-list th#users-list-body-th-public { width: 4em; }
#users-list-body table.users-list th#users-list-body-th-use_password_reset { width: 8em; }
#users-list-body table.users-list th#users-list-body-th-created_at { width: 6.5em; }

/* My page on narrow screens (2026-10-24): on a phone the page was wider than the screen. The list of password
   characters is one word and could not wrap, and the tables kept their inputs' widths (30em), so the label
   column shrank to one character and the tables ran past the right edge. The text may now wrap anywhere, and
   when the body is narrower than the tables need (a container query, so a narrow window on a computer is
   covered too) the tables take the body's width with a fixed label column and inputs as wide as their cells. */
#users-my-body {
  container-type: inline-size;
}
#users-my-body div.task-body {
  overflow-wrap: anywhere;
}
/* The page a task leads to (the access statistics, the held mail; 2026-11-08, user): on a line of its own, a little
   below the text, bold as the tables' labels and as large */
#users-my-body div.task-body a.task-link {
  display: block;
  width: fit-content;
  margin-top: 10px;
  font-size: 100%;
  font-weight: bold;
}
@container (max-width: 42em) {
  #users-my-body table.matrix {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  #users-my-body table.matrix td.column {
    width: 6.5em;
  }
  #users-my-body table.matrix td.value {
    overflow-wrap: anywhere;
  }
  #users-my-body table.matrix td.value input[type="text"],
  #users-my-body table.matrix td.value input[type="password"],
  #users-my-body table.matrix td.value textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  /* the tables take the body's width here, so the forms do too, and the buttons end at its right edge */
  #users-my-body form.users-my-form {
    width: auto;
  }
  #users-my-body div.buttons {
    margin-left: 0;
    margin-right: 0;
  }
}
@media (max-width: 650px) {
  /* less side padding on phones (the theme's own small-screen width), so the tables have room */
  #users-my-body {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Buttons on iPhone (2026-10-24): Safari on iOS 15 and later fills buttons without own colours with the system
   blue. Draw them as the grey buttons of the desktop browsers on every device. :where() keeps the specificity at
   zero, so the rules above (the link-like buttons, the paddings) still win. */
:where(input[type="submit"], input[type="button"], input[type="reset"], button) {
  -webkit-appearance: none;
  appearance: none;
  background-color: #efefef;
  border: 1px solid #767676;
  border-radius: 3px;
  color: black;
}
:where(input[type="submit"], input[type="button"], input[type="reset"], button):hover:not(:disabled) {
  background-color: #e5e5e5;
}
:where(input[type="submit"], input[type="button"], input[type="reset"], button):disabled {
  color: #888;
  border-color: #aaa;
}

/* The password policy on the my page while a password is typed: a mark per rule instead of the bullet (2026-10-24) */
/* The mark sits where the bullet was, so the text does not move when typing starts. */
ul.password-policy {
  list-style: none;
}
ul.password-policy .rule-mark {
  display: inline-block;
  width: 1.4em;
  margin-left: -1.4em;
  font-weight: bold;
}
ul.password-policy .rule-met {
  color: #080;
}
ul.password-policy .rule-unmet {
  color: #D00;
}

/* The user list's headers in Japanese (2026-10-29): the status column (its icon only) with less space on the
   sides, and "公開" wider; neither header breaks into two lines. The same for the status of the applications. */
#users-list-body th#users-list-body-th-status,
#users-list-body th#requests-list-body-th-status {
  padding-left: 4px;
  padding-right: 4px;
  white-space: nowrap;
}
#users-list-body th#users-list-body-th-public,
#users-list-body th#users-list-body-th-use_password_reset {
  min-width: 4em;
  white-space: nowrap;
}

/* The link to the account applications (/private/requests, 2026-10-29), drawn like the other action links of
   application.css (#action-add etc.): the icon of the sweetie2 set on the left */
#action-requests {
  margin: 0px;
  padding: 3px 8px 5px 20px;
  background: url(24-tag-hot.png) 1px center / 16px 16px no-repeat;
}
/* "申し込みはありません。" under an empty list (2026-11-08, user): #users-list-body has no padding (application.css),
   so the paragraph's margin went through it and left a gap without the body's colour above the footer */
#users-list-body p.list-empty {
  margin: 0;
  padding: 12px 15px;
}
/* The admin's own my page, from the admin's pages (2026-11-08, user), drawn the same way */
#action-my {
  margin: 0px;
  padding: 3px 8px 5px 20px;
  /* the 24px icon drawn at 16px, sharper on high-density screens (2026-11-08, user) */
  background: url(24-member.png) 1px center / 16px 16px no-repeat;
}

/* The account application form (/public/requests/new, 2026-10-29): space between the items, a red frame and
   the message below an item with an error, the buttons at the bottom right */
form.request-form {
  margin: 10px 0 15px 0;
}
div.request-row {
  margin: 0 0 20px 0;
}
div.request-label {
  font-weight: bold;
  margin-bottom: 5px;
}
span.request-note {
  font-weight: normal;
  font-size: 90%;
  color: #555;
}
/* The inputs were sized in characters (size="70") and ran over the sidebar on the right: none is wider than
   the content column, and the long ones take its width */
form.request-form {
  max-width: 100%;
}
form.request-form input[type="text"],
form.request-form textarea {
  margin: 2px 0;
  max-width: 100%;
  box-sizing: border-box;
}
form.request-form input[name="organization"],
form.request-form input[name="address"],
form.request-form input[name="url"],
form.request-form textarea {
  width: 100%;
}
div.request-confirm table {
  width: 100%;
  table-layout: fixed;
  overflow-wrap: anywhere;
}
div.request-confirm table td:first-child {
  width: 8em;
  vertical-align: top;
}
form.request-form input.field-error,
form.request-form textarea.field-error {
  border: 2px solid #D00;
  outline: none;
}
span.request-choices label {
  margin-right: 1.5em;
}
span.request-choices.field-error {
  outline: 2px solid #D00;
  padding: 2px 4px;
}
div.request-error {
  color: #D00;
  font-size: 90%;
  margin-top: 4px;
}
div.request-confirm {
  margin-bottom: 15px;
}
div.request-buttons {
  text-align: right;
  margin: 10px 20px 0 0;
}
input.request-button {
  margin: 5px 0 5px 10px;
  padding: 8px 12px;
  font-weight: bold;
}
/* The submit buttons of the forms (the application, the password reset's two): the space on the sides by padding,
   not by spaces in their labels (2026-11-13, user) */
form.request-form input.request-button,
form.reset-password-form input.request-button {
  padding: 8px 18px;
}

/* The password reset (/public/reset-password, 2026-11-13, user): the text with more space between the lines, and
   the form as wide as an address, its button at the right end of the input */
div.reset-password-text p {
  line-height: 1.9;
  margin: 0 0 10px 0;
}
form.reset-request-form {
  display: inline-block;
}
form.reset-request-form input[name="address"] {
  width: 24em;
  color: #000; /* what is typed in black; the example (placeholder) keeps the browser's grey */
}
/* The new password's form (the reset mail's link): as wide as its table, the button at the table's bottom right
   (2026-11-13, user; it was at the right end of the column) */
form.reset-password-form {
  display: inline-block;
  margin-bottom: 25px; /* room between the button and the footer (2026-11-13, user) */
}
form.reset-password-form div.request-buttons {
  margin-right: 0;
}
/* as wide as the input, so that the button stays at its right end when the label above is wider */
form.reset-request-form div.request-buttons {
  width: 24em;
  max-width: 100%;
  margin-right: 0;
}

/* Cloudflare Turnstile's widget on the public forms (2026-11-13), above their buttons, at the right like them */
div.turnstile-box {
  margin: 10px 0 0 0;
  display: flex;
  justify-content: flex-end;
}

/* The dialog of a job on ec2f (2026-11-02): a spinner while it runs, then the result */
dialog.job-dialog {
  width: 26em;
  max-width: calc(100vw - 2em);
  padding: 20px;
  border: 1px solid #888;
  border-radius: 6px;
  background: white;
  color: black;
}
dialog.job-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}
dialog.job-dialog h4 {
  margin: 0 0 12px 0;
  font-weight: bold;
}
dialog.job-dialog p {
  margin: 0 0 8px 0;
}
div.job-dialog-spinner {
  width: 28px;
  height: 28px;
  margin: 8px auto 14px auto;
  border: 3px solid #ccc;
  border-top-color: #555;
  border-radius: 50%;
  animation: job-dialog-spin 1s linear infinite;
}
@keyframes job-dialog-spin {
  to {
    transform: rotate(360deg);
  }
}
p.job-dialog-note {
  color: #666;
  font-size: 90%;
}
p.job-dialog-warning {
  color: #D00;
}
pre.job-dialog-lines {
  white-space: pre-wrap;
  max-height: 40vh;
  overflow: auto;
  margin: 0 0 8px 0;
  padding: 6px;
  background: #f4f4f4;
}
div.job-dialog-buttons {
  margin-top: 12px;
  text-align: right;
}
div.job-dialog-buttons button {
  padding: 4px 14px;
  cursor: pointer;
}

/* The WordPress backups (2026-11-07, user): a table inside the value cell, so the time, size, name and button line up;
   a little more space between the lines, the total under a line, and the backup button set off from the list */
div.body table.matrix td.value table.wp-backups {
  border-collapse: collapse;
}
div.body table.matrix td.value table.wp-backups td {
  border: none;
  background: none;
  line-height: 1.3;
  padding: 3px 14px 3px 0;
  vertical-align: middle;
  white-space: nowrap;
}
div.body table.matrix td.value table.wp-backups td.wp-backup-size {
  text-align: right;
}
div.body table.matrix td.value table.wp-backups td.wp-backup-name {
  white-space: normal;
}
/* The place of the WordPress in the backup, red when it is not the one set now (2026-11-07, user) */
div.body table.matrix td.value table.wp-backups td.wp-backup-layout-differs {
  color: #C0392B;
}
div.body table.matrix td.value table.wp-backups td.wp-backup-action {
  padding-right: 0;
}
/* The names of the columns, with a rule under them (2026-11-08, user) */
div.body table.matrix td.value table.wp-backups thead th {
  padding: 0 14px 4px 0;
  border: none;
  border-bottom: 1px solid #999;
  background: none;
  color: black;
  font-weight: bold;
  text-align: left;
  white-space: nowrap;
}
div.body table.matrix td.value table.wp-backups thead th.wp-backup-size {
  text-align: right;
}
div.body table.matrix td.value table.wp-backups tbody tr:first-child td {
  padding-top: 5px;
}
div.body table.matrix td.value table.wp-backups tfoot td {
  border-top: 1px solid #999;
  padding-top: 5px;
}
div.body table.matrix td.value div.wp-backup-new {
  margin-top: 10px;
}
/* The dialogs of the jobs in the page's colours (2026-11-07, user): a title bar in the purple of the page's header,
   the body in its lavender, the main button purple. Each dialog may sit inside a table cell, whose nowrap and line
   height it must not take (the backup's name dialog overflowed and scrolled). */
dialog.job-dialog {
  padding: 0;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  background: #EFEEFF;
  box-shadow: 0 10px 32px rgba(40, 20, 80, 0.35);
  white-space: normal;
  line-height: 1.5;
  text-align: left;
  font-weight: normal;
}
dialog.job-dialog::backdrop {
  background: rgba(30, 15, 60, 0.45);
}
/* While a dialog is open, the page behind it does not scroll (2026-11-07, user); the scroll bar keeps its room, so
   the page does not move sideways */
html:has(dialog:modal) {
  overflow: hidden;
  scrollbar-gutter: stable;
}
dialog.job-dialog h4 {
  margin: 0;
  padding: 12px 22px;
  background: #815BBB;
  color: white;
  font-size: 110%;
  letter-spacing: 0.05em;
}
dialog.job-dialog > :not(h4) {
  margin-left: 22px;
  margin-right: 22px;
}
dialog.job-dialog > h4 + * {
  margin-top: 18px;
}
/* No rule above the buttons in any of the dialogs (2026-11-07, user) */
dialog.job-dialog div.job-dialog-buttons {
  margin-top: 14px;
  margin-bottom: 0;
  padding: 0 0 16px 0;
}
/* A job's log in its frame, with the copy icon over the top right corner (2026-11-07, user) */
div.job-dialog-log {
  position: relative;
}
div.job-dialog-log pre.job-dialog-lines {
  padding-right: 34px;
  /* long lines (the rules, the log's path) wrap: no scrolling sideways */
  overflow-wrap: anywhere;
}
div.job-dialog-log button.job-dialog-copy {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #CBBFE3;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  color: #4B3A73;
  cursor: pointer;
}
div.job-dialog-log button.job-dialog-copy:hover {
  background: #F5F1FD;
  border-color: #815BBB;
}
div.job-dialog-log button.job-dialog-copy:active {
  background: #E4DBF5;
}
/* キャンセル and the button that does it a little apart (2026-11-07, user) */
dialog.job-dialog div.job-dialog-buttons button + button {
  margin-left: 8px;
}
dialog.job-dialog div.job-dialog-buttons button {
  min-width: 6.5em;
  padding: 5px 14px;
  border: 1px solid #A99BCB;
  border-radius: 4px;
  background: white;
  color: #333;
}
dialog.job-dialog div.job-dialog-buttons button:hover:not(:disabled) {
  background: #F5F1FD;
}
/* The button that does what the dialog is for */
dialog.job-dialog div.job-dialog-buttons button.job-dialog-primary {
  border-color: #6C4AA3;
  background: #815BBB;
  color: white;
  font-weight: bold;
}
dialog.job-dialog div.job-dialog-buttons button.job-dialog-primary:hover:not(:disabled) {
  background: #6C4AA3;
}
dialog.job-dialog div.job-dialog-buttons button.job-dialog-primary:disabled {
  border-color: #CBBFE3;
  background: #CBBFE3;
  cursor: default;
}

/* The backup's name: a white panel with the field and the rule under it */
dialog.backup-dialog {
  width: 30em;
}
dialog.backup-dialog div.backup-dialog-panel {
  padding: 14px 16px;
  border: 1px solid #D6CCEE;
  border-radius: 6px;
  background: white;
}
dialog.backup-dialog label.backup-dialog-field {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* The labels in the dialogs black (2026-11-07, user; purple until then) */
dialog.backup-dialog label.backup-dialog-field span {
  flex: none;
  font-weight: bold;
  color: black;
}
dialog.backup-dialog label.backup-dialog-field input {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #A99BCB;
  border-radius: 4px;
  background: white;
}
dialog.backup-dialog label.backup-dialog-field input:focus {
  outline: 2px solid #B9A5E0;
  outline-offset: 0;
  border-color: #815BBB;
}
dialog.backup-dialog div.backup-dialog-panel p {
  margin: 10px 0 0 0;
  font-size: 90%;
}
/* The WordPress of the user's own site on the my page (2026-11-07, user) */
div.body table.matrix.my-wordpress {
  width: 100%;
}
div.body table.matrix.my-wordpress td.column {
  width: 9em;
  white-space: nowrap;
}
div.body table.matrix.my-wordpress td.value {
  line-height: 1.6;
}
div.body table.matrix.my-wordpress td.my-wordpress-deploy label {
  display: block;
  margin-bottom: 10px;
}
div.body table.matrix.my-wordpress td.my-wordpress-deploy input[type="text"] {
  margin: 0 3px;
}
/* A choice of the place: its name, and under it, indented to the name's text, what it does (2026-11-08, user) */
div.body table.matrix.my-wordpress td.my-wordpress-deploy span.my-wordpress-place-name {
  display: block;
  font-weight: bold;
}
div.body table.matrix.my-wordpress td.my-wordpress-deploy span.my-wordpress-place-detail {
  display: block;
  margin: 2px 0 0 1.7em;
  color: #444;
}
/* 配置 at the bottom right of the cell (2026-11-08, user) */
div.body table.matrix.my-wordpress td.my-wordpress-deploy div.my-wordpress-deploy-button {
  margin: 12px 3em 0 0; /* a few characters from the cell's right edge (2026-11-08, user) */
  text-align: right;
}
/* As the page's other buttons (バックアップ実行): their size and font (2026-11-08, user; larger and bold until then) */
div.body table.matrix.my-wordpress td.my-wordpress-deploy div.my-wordpress-deploy-button button.button {
  padding: 6px 14px;
}
div.body table.matrix.my-wordpress p.my-wordpress-note {
  margin: 6px 0 0 0;
  color: #555;
  font-size: 90%;
}
/* The note above the list of backups (2026-11-08, user), and the list a little smaller than the text */
div.body table.matrix.my-wordpress p.my-wordpress-note.my-wordpress-lead {
  margin: 0 0 8px 0;
}
div.body table.matrix.my-wordpress td.value table.wp-backups {
  font-size: 90%;
}
/* The バックアップ実行 button roomier (2026-11-08, user) */
div.body table.matrix.my-wordpress td.value div.wp-backup-new {
  margin-top: 14px;
}
/* The note under the WordPress heading at the table's left edge (its margin); 削除 under the table, outside it, at its
   right end, in red on a light red (2026-11-08, user) */
/* A short link that must not break inside (the page's text may wrap anywhere: "c" / "hurch.ne.jp", 2026-11-08) */
#users-my-body a.nowrap {
  white-space: nowrap;
  overflow-wrap: normal;
}
div.body p.my-wordpress-intro {
  margin: 6px 15px 0 15px;
}
/* The table's margins (15px each side), so that the button's right end is the table's (measured 2026-11-08) */
div.body div.my-wordpress-remove {
  margin: 12px 15px 0 15px;
  text-align: right;
}
div.body div.my-wordpress-remove button.button-danger {
  padding: 6px 14px;
  border: 1px solid #F2867A;
  border-radius: 3px;
  background: #FFE1DC;
  color: #E0241A;
  font-weight: normal;
  cursor: pointer;
}
/* The my page's 変更 buttons (the forms' submit inputs, bold 15px with 8px 12px until then) as バックアップ実行 is: the
   browser's button font, 6px 14px (2026-11-08, user); where they are and their colours stay */
#users-my-body div.buttons input.button {
  padding: 6px 14px;
  font: normal 13.3333px Arial, sans-serif;
  line-height: normal;
}
/* On narrow screens the tables lose their margins (the @container rule of the my page above) */
@container (max-width: 42em) {
  #users-my-body div.my-wordpress-remove {
    margin-left: 0;
    margin-right: 0;
  }
}
div.body div.my-wordpress-remove button.button-danger:hover {
  background: #FFCBC3;
}
/* The list and the button in a box as wide as the list: the button at its right end (2026-11-08, user) */
div.body table.matrix.my-wordpress td.value div.wp-backup-block {
  display: inline-block;
  max-width: 100%;
}
div.body table.matrix.my-wordpress td.value div.wp-backup-block div.wp-backup-new {
  text-align: right;
}
div.body table.matrix.my-wordpress td.value div.wp-backup-new button.button {
  padding: 6px 14px;
}
/* The kind of a backup, as radio buttons above the name (2026-11-07, user) */
/* The label on the left, the choices in a box of their own that wraps, never under the label (2026-11-07, user) */
dialog.backup-dialog div.backup-dialog-kinds {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px 0;
}
dialog.backup-dialog div.backup-dialog-kinds span.backup-dialog-kinds-label {
  flex: none;
  font-weight: bold;
  color: black;
}
dialog.backup-dialog div.backup-dialog-kinds div.backup-dialog-kinds-options {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
}
dialog.backup-dialog div.backup-dialog-kinds label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  cursor: pointer;
}
dialog.backup-dialog div.backup-dialog-kinds span.backup-dialog-keep {
  color: #777;
  font-size: 90%;
}
/* The backup being renamed or deleted (2026-11-07, user) */
dialog.backup-dialog table.backup-dialog-facts {
  margin: 0 0 12px 0;
  border-collapse: collapse;
}
dialog.backup-dialog table.backup-dialog-facts th,
dialog.backup-dialog table.backup-dialog-facts td {
  padding: 2px 16px 2px 0;
  border: none;
  background: none;
  text-align: left;
  vertical-align: top;
}
dialog.backup-dialog table.backup-dialog-facts th {
  font-weight: bold;
  color: black;
  white-space: nowrap;
}
/* What a restore to another place does not change (2026-11-08, user) */
dialog.backup-dialog ul.backup-dialog-list {
  margin: 4px 0 0 0;
  padding-left: 1.4em;
  font-size: 90%;
}
dialog.backup-dialog ul.backup-dialog-list li {
  margin: 2px 0;
}
/* A button that cannot be undone: red instead of the purple */
dialog.job-dialog div.job-dialog-buttons button.job-dialog-primary.job-dialog-danger {
  border-color: #A33A3A;
  background: #C0392B;
}
dialog.job-dialog div.job-dialog-buttons button.job-dialog-primary.job-dialog-danger:hover:not(:disabled) {
  background: #A33A3A;
}
/* リストア, 名前の変更 and 削除 of one backup, a little apart */
div.body table.matrix td.value table.wp-backups span.wp-backup-buttons {
  display: inline-flex;
  gap: 6px;
}

/* The バックアップ button under the total, in the column of the リストア buttons (2026-11-07, user) */
div.body table.matrix td.value table.wp-backups tfoot tr.wp-backup-new td {
  border-top: none;
  padding-top: 10px;
}

/* The icons of application.css drawn from the 24px images of the set at their own sizes, sharper on high-density
   screens (2026-11-08, user; the others have no 24px image). components/icons.tsx does the same for the <img> ones. */
#action-add {
  background: url(24-em-plus.png) 1px center / 16px 16px no-repeat;
}
#action-admin,
#action-maintenance {
  background: url(24-tool-b.png) 1px center / 16px 16px no-repeat;
}
#action-destroy {
  background: url(24-em-cross.png) 1px center / 16px 16px no-repeat;
}
#action-show {
  background: url(24-em-check.png) 1px center / 16px 16px no-repeat;
}
#action-mail {
  background: url(24-image.png) 1px center / 16px 16px no-repeat;
}
/* The 8px check before each item of a task's list: list-style-image cannot be scaled, so drawn before the item */
div.task-body ul {
  list-style: none;
}
div.task-body ul li {
  position: relative;
}
div.task-body ul li::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 0.45em;
  width: 8px;
  height: 8px;
  background: url(24-em-check.png) center / 8px 8px no-repeat;
}
/* the password rules draw their own marks */
ul.password-policy li::before {
  content: none;
}

/* The copy button after a value on the user's show page (2026-11-09, user): an icon only, grey until pointed at */
button.copy-button {
  margin: 0 0 0 4px;
  padding: 1px 2px;
  border: none;
  background: transparent;
  color: #999;
  line-height: 0;
  vertical-align: middle;
  cursor: pointer;
}
button.copy-button:hover { color: #333; }
button.copy-button.copy-button-done { color: #2E8B57; }
button.copy-button.copy-button-failed { color: #E0241A; }

/* The my page's notice that the mail is off (no mailbox, no forwarding; 2026-11-13, user): an orange warning above
   the user's information, as wide as its text, a speech bubble with its tail on the top edge */
div.my-mail-off {
  position: relative;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  margin: 22px 0 18px;
  padding: 8px 14px 8px 40px;
  border: 2px solid #E0A020;
  border-radius: 8px;
  background: #FFF8E1 url(24-message-warn.png) 10px 50% / 22px 22px no-repeat;
  color: #7A4B00;
  font-size: 110%;
  font-weight: normal;
  line-height: 1.6;
}
div.my-mail-off::before,
div.my-mail-off::after {
  content: "";
  position: absolute;
  border-style: solid;
  border-color: transparent;
}
div.my-mail-off::before {
  top: -12px;
  left: 20px;
  border-width: 0 10px 12px;
  border-bottom-color: #E0A020;
}
div.my-mail-off::after {
  top: -8px;
  left: 22px;
  border-width: 0 8px 10px;
  border-bottom-color: #FFF8E1;
}
/* What wraps each form of the my page, disabled while the mail is off (2026-11-13, user): no frame of its own */
fieldset.my-lock {
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}
fieldset.my-lock:disabled input,
fieldset.my-lock:disabled textarea {
  background: #EEE;
  color: #888;
}
