/* overlays.css — slice of the former style.css (see also: sibling css/ files) */
/* --- Confirm modal --- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.12s ease-out;
}
.modal-overlay.open { opacity: 1; }
.modal-dialog {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px 18px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(-6px);
  transition: transform 0.12s ease-out;
}
.modal-overlay.open .modal-dialog { transform: translateY(0); }
.modal-message {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.4;
}
.modal-actions {
  display: flex; justify-content: flex-end; gap: 8px;
}
.modal-actions .btn,
.modal-actions button {
  min-width: 88px;
}
.temp-pw-label { display: block; font-size: 0.9rem; }
.temp-pw-field {
  display: flex; gap: 6px; align-items: stretch; margin-top: 4px;
}
.temp-pw-field input {
  flex: 1; min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.5px;
}
.temp-pw-field .btn { min-width: 0; white-space: nowrap; flex: 0 0 auto; }

/* --- Flash toast: visible by default; JS adds .dismissing to fade out --- */
.flash-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  z-index: 9998;
  font-size: 0.9rem;
  opacity: 1;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  pointer-events: none;
}
.flash-toast.dismissing {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
}
.flash-toast.flash-success {
  border-color: rgba(86, 211, 100, 0.45);
  background: linear-gradient(135deg, rgba(86, 211, 100, 0.10), var(--panel-2));
}
.flash-toast.flash-error {
  border-color: rgba(248, 81, 73, 0.45);
  background: linear-gradient(135deg, rgba(248, 81, 73, 0.10), var(--panel-2));
}

/* --- Form busy state --- */
button.is-busy,
.primary.is-busy {
  opacity: 0.7;
  cursor: progress;
  position: relative;
}
button.is-busy::after,
.primary.is-busy::after {
  content: "";
  display: inline-block;
  width: 0.8em; height: 0.8em;
  margin-left: 0.5em;
  vertical-align: -0.1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Inline images in post/comment bodies. */
.post-image-link { display: inline-block; margin: 6px 0; }
.post-image {
  display: block;
  max-width: 100%;
  max-height: 420px;
  border-radius: 8px;
  border: 1px solid var(--border, #2a2a2a);
}
.paste-upload-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}
.paste-upload-hint.is-error { color: var(--neg, #e25b5b); }

/* Board page "+ New post" dropdown (used when no single club is selected). */
.post-picker { position: relative; display: inline-block; }
.post-picker > summary {
  list-style: none;
  cursor: pointer;
}
.post-picker > summary::-webkit-details-marker { display: none; }
.post-picker .caret {
  font-size: 0.7rem;
  margin-left: 2px;
  transition: transform 0.15s;
  display: inline-block;
}
.post-picker[open] .caret { transform: rotate(180deg); }
.post-picker-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  padding: 6px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.post-picker-panel a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}
.post-picker-panel a:hover { background: var(--panel-2); }
