/* The "post a simcha" pages, the office's New simcha page and the draft cards.
   Everything here is prefixed sm- so it cannot touch another screen. Colours are the
   tokens in styles.css, so light and dark follow the rest of the site. */

.sm-page { padding-bottom: 40px; }
.sm-seg { margin-bottom: 4px; }
.sm-lead { color: var(--dim); font-size: 13.5px; line-height: 1.5; margin-top: 14px; }
.sm-small { color: var(--dim); font-size: 12px; line-height: 1.4; margin: 2px 0 4px; }
.sm-halls { margin: -4px 0 8px; }

.sm-note {
  display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 12px;
  background: var(--card); border: 1px solid var(--goldSoft); border-radius: var(--radius);
  color: var(--text); font-size: 13.5px; line-height: 1.4;
}
.sm-note > span:last-child { flex: 1; }

.sm-picked {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px;
}
.sm-picked.on { border-color: var(--gold); }
.sm-picked-name { color: var(--text); font-size: 16px; font-weight: 700; flex: 1; min-width: 0; }
.sm-link { background: none; border: none; color: var(--gold); font-weight: 700; font-size: 14px; padding: 0 4px; }

.sm-match {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%;
  padding: 11px 13px; margin-bottom: 6px; text-align: start;
  background: var(--card2); border: none; border-radius: var(--radius);
  color: var(--text); font-size: 15px;
}
.sm-match .dim { color: var(--dim); }

.sm-switchrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.sm-switchtext { flex: 1; color: var(--text); font-size: 15px; }
.sm-switchsub { color: var(--dim); font-size: 12.5px; margin-top: 2px; }

.sm-preview {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
}
.sm-preview.dim { opacity: .6; }
.sm-preview-text { color: var(--text); font-size: 15px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.sm-preview-meta { color: var(--dim); font-size: 12px; margin-top: 8px; }
.sm-preview-meta:empty { display: none; }

.sm-go { margin-top: 24px; }
.sm-second { margin-top: 12px; }
.sm-danger {
  display: block; margin: 10px auto 0; padding: 14px 18px; background: none; border: none;
  color: var(--wine); font-weight: 700; font-size: 14px;
}
.sm-danger[disabled] { opacity: .6; }

.sm-result { margin-top: 14px; font-size: 14.5px; line-height: 1.5; text-align: center; white-space: pre-line; color: var(--text); }
.sm-result.ok { color: var(--green); }
.sm-result.bad { color: var(--wine); }

/* address suggestions (the shared .ac-list styles do the rest) */
.sm-ac { position: relative; z-index: 5; }
.sm-ac-spin { position: absolute; right: 12px; top: 14px; }
html[dir="rtl"] .sm-ac-spin { right: auto; left: 12px; }
.sm-ac-foot { color: var(--dim); font-size: 11.5px; padding: 10px; text-align: center; }
.sm-ac .ac-item { cursor: pointer; }
.sm-ac .ac-item:hover { background: var(--card2); }

/* a waiting (pre-emptive) simcha — the card at the top of Simches and on his own profile */
.sm-draft {
  background: var(--card); border: 1.5px solid var(--gold); border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px;
}
.sm-draft-body { display: block; width: 100%; padding: 0; background: none; border: none; text-align: start; color: inherit; }
.sm-draft-head { display: flex; align-items: center; gap: 6px; }
.sm-lock { font-size: 11px; }
.sm-kicker { color: var(--goldSoft); font-size: 10.5px; font-weight: 800; letter-spacing: .8px; }
.sm-draft-kind { color: var(--text); font-size: 18px; font-weight: 800; margin-top: 6px; }
.sm-draft-msg {
  color: var(--dim); font-size: 13px; line-height: 1.4; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sm-draft-row { display: flex; gap: 8px; margin-top: 12px; }
.sm-draft-go {
  flex: 1; padding: 12px; background: var(--gold); color: var(--onGold); border: none;
  border-radius: calc(var(--radius) - 4px); font-weight: 800; font-size: 14.5px;
}
.sm-draft-side {
  padding: 12px 13px; background: none; color: var(--gold); border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px); font-weight: 700; font-size: 14px;
}
.sm-draft-side.del { color: var(--wine); }

/* Latin text typed into a Yiddish (RTL) page keeps its own direction: "1 Main St" must not read "Main St 1" */
.sm-page input.input, .sm-page textarea.input { unicode-bidi: plaintext; }
