/*
 * Discussions: discussion.php (the list), discussion_thread.php (one
 * discussion and its replies) and discussion_new.php (start one).
 *
 * Loaded after main.css and home.css, and built from home.css's parts: the
 * .pvh tokens and panels, .pvh-btn, .pvh-chip, .pvh-avatar. Same palette as
 * the rest of the redesigned site: translucent black panels with #303030
 * hairlines, gold buttons (#ccad6c with a #947113 edge), #d3b06b links and
 * the #ffcc2f hover. Scoped under .pvd / #pv-discuss so nothing leaks.
 */

/* ---- Shared ------------------------------------------------------------- */
.pvd h1 { margin: 0 0 4px; font-size: 22px; line-height: 1.25; color: #fff; overflow-wrap: anywhere; }
.pvd h2 { overflow-wrap: anywhere; }
.pvd .pvh-avatar { width: 40px; height: 40px; font-size: 16px; border-width: 1px; }
.pvd button { font-family: inherit; cursor: pointer; }
.pvd .pvh-btn { border-top: 0; border-right: 0; border-bottom: 0; color: #000; }
.pvd .pvh-btn:hover { background: var(--pvh-gold-bright); color: #000; }
.pvd .pvh-btn--ghost { border: 1px solid var(--pvh-gold-deep); background: transparent; color: #fff; }
.pvd .pvh-btn--ghost:hover { background: #222; color: #fff; }
.pvd button:focus-visible, .pvd input:focus-visible, .pvd textarea:focus-visible {
  outline: 2px solid var(--pvh-gold-bright);
  outline-offset: 1px;
}
.pvd-crumbs { font-size: 12px; color: var(--pvh-muted); }
.pvd-crumbs a { text-decoration: none; }

/* Messages after an action ("Your reply has been posted."). */
.pvd-notice {
  padding: 12px 16px;
  border: 1px solid var(--pvh-line);
  border-left: 6px solid var(--pvh-gold-deep);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.82);
  font-size: 13px;
}
.pvd-notice--bad { border-left-color: #b33; color: #ffb3b3; }
.pvd-notice:empty { display: none; }

/* ---- Intro panel -------------------------------------------------------- */
.pvd-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.pvd-intro__text { flex: 1 1 320px; min-width: 0; }
.pvd-intro p { font-size: 13px; color: #cfcfcf; }
.pvd-intro__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- Sort tabs ---------------------------------------------------------- */
.pvd-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.pvd-tabs a, .pvd-tabs span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #3a3a3a;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
}
.pvh .pvd-tabs a { color: #fff; }
.pvh .pvd-tabs a:hover { border-color: var(--pvh-gold-deep); color: var(--pvh-gold-bright); }
.pvd-tabs [aria-current] { border-color: var(--pvh-gold-button); background: var(--pvh-gold-button); color: #000; }

/* ---- Upvote ------------------------------------------------------------- */
.pvd-vote { display: flex; flex-direction: column; align-items: center; flex: none; width: 52px; gap: 2px; }
.pvd-vote__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  background: #111;
  color: var(--pvh-muted);
  font-size: 18px;
  line-height: 1;
}
.pvd-vote__btn:hover:not([disabled]) { border-color: var(--pvh-gold-deep); color: var(--pvh-gold-bright); }
.pvd-vote__btn[aria-pressed="true"] { border-color: var(--pvh-gold-button); background: var(--pvh-gold-button); color: #000; }
.pvd-vote__btn[disabled] { cursor: default; opacity: 0.55; }
.pvd-vote__n { font-size: 15px; font-weight: 700; color: #fff; }
.pvd-vote__label { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--pvh-muted); }
.pvd-vote form { margin: 0; }

/* ---- The list ----------------------------------------------------------- */
.pvd-list > li { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--pvh-line); }
.pvd-list > li:first-child { border-top: 0; padding-top: 0; }
.pvd-item__body { flex: 1; min-width: 0; }
.pvd-item__title { margin: 0 0 4px; font-size: 17px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.pvh .pvd-item__title a { color: #fff; text-decoration: none; }
.pvh .pvd-item__title a:hover { color: var(--pvh-gold-bright); }
.pvd-item__poem { font-size: 12px; margin: 0 0 6px; }
.pvd-item__excerpt { margin: 0 0 8px !important; font-size: 13px; color: #cfcfcf; overflow-wrap: anywhere; }
.pvd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--pvh-muted); }
.pvd-meta strong { color: #fff; }
.pvd-empty { padding: 24px 0; text-align: center; color: #cfcfcf; }
.pvd-empty .pvh-btn { margin-top: 14px; }

/* ---- One discussion ----------------------------------------------------- */
.pvd-op { display: flex; gap: 16px; }
.pvd-op__body { flex: 1; min-width: 0; }
.pvd-op__about { margin: 0 0 10px !important; font-size: 12px; color: var(--pvh-muted); }
.pvd-who { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 12px 0; }
.pvd-who__name { font-weight: 700; overflow-wrap: anywhere; }
.pvd-who__name a { text-decoration: none; }
.pvd-text { font-size: 15px; line-height: 1.6; color: #e6e6e6; overflow-wrap: anywhere; }
.pvd-op .pvd-text { font-size: 16px; }

.pvd-replies > li { display: flex; gap: 12px; padding: 16px 0; border-top: 1px solid var(--pvh-line); }
.pvd-replies > li:first-child { border-top: 0; padding-top: 0; }
.pvd-reply__body { flex: 1; min-width: 0; }
.pvd-reply__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 6px; font-size: 12px; color: var(--pvh-muted); }
.pvd-reply__head .pvd-who__name { font-size: 14px; }

/* Hidden by the poet: only they see it, dimmed, with a way back. */
.pvd-is-hidden { opacity: 0.6; }
.pvd-is-hidden .pvd-text { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.35); }

/* ---- Moderation (the poet only) ----------------------------------------- */
.pvd-mod { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pvd-mod form { margin: 0; }
.pvd-mod__btn {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #3a3a3a;
  border-radius: 5px;
  background: transparent;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.pvd-mod__btn:hover { border-color: var(--pvh-gold-deep); color: var(--pvh-gold-bright); }
.pvd-mod__btn--warn:hover { border-color: #b33; color: #ff8a8a; }
.pvd-modbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.pvd-modbar p { font-size: 12px; color: var(--pvh-muted); }

/* ---- Forms -------------------------------------------------------------- */
.pvd-form { display: flex; flex-direction: column; gap: 14px; }
.pvd-field { display: flex; flex-direction: column; gap: 6px; }
.pvd-field label { font-size: 12px; font-weight: 700; text-transform: uppercase; }
#pv-discuss .pvd-field input,
#pv-discuss .pvd-field textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #474747;
  border-radius: 5px;
  background: #fff;
  color: #000;
  font: 15px Helvetica, Verdana, Arial, sans-serif;
}
#pv-discuss .pvd-field textarea { min-height: 140px; resize: vertical; }
#pv-discuss .pvd-field [aria-invalid="true"] { border-color: #d44; box-shadow: 0 0 0 1px #d44; }
.pvd-field__hint { font-size: 11px; color: var(--pvh-muted); }
.pvd-field__problem { font-size: 12px; font-weight: 700; color: #ff8a8a; }
.pvd-field__problem:empty { display: none; }
.pvd-form__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pvd-locked { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #cfcfcf; }

/* ---- Pages -------------------------------------------------------------- */
.pvd-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 16px 0 0; }
.pvd-pager a, .pvd-pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  box-sizing: border-box;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.pvh .pvd-pager a { border: 1px solid #3a3a3a; color: #fff; }
.pvh .pvd-pager a:hover { border-color: var(--pvh-gold-deep); color: var(--pvh-gold-bright); }
.pvd-pager .pvl-pager__now { background: var(--pvh-gold-button); color: #000; }
.pvd-pager .pvl-pager__off { border: 1px solid #262626; color: #6b6b6b; }
.pvd-pager .pvl-pager__gap { min-width: 0; padding: 0 2px; color: var(--pvh-muted); }

/* ---- Phones ------------------------------------------------------------- */
@media (max-width: 760px) {
  #pv-discuss #site-wrapper,
  #pv-discuss #top-wrapper,
  #pv-discuss #middle-wrapper,
  #pv-discuss #left-col,
  #pv-discuss #right-col,
  #pv-discuss #bottom-wrapper,
  #pv-discuss #bottom-menu {
    width: auto;
    float: none;
  }
  #pv-discuss #site-wrapper { padding: 0 12px; }
  #pv-discuss #top-wrapper { height: auto; overflow: hidden; }
  #pv-discuss #top-wrapper #logo { float: none; }
  #pv-discuss #logo img { max-width: 70%; height: auto; }
  #pv-discuss #top-wrapper #top-menu { float: none; }
  #pv-discuss #bottom-wrapper { height: auto; }
  #pv-discuss #right-col { padding: 0; margin-top: 14px; }

  .pvd .pvh-panel { padding: 18px 16px; }
  .pvd h1 { font-size: 20px; }
  .pvd-intro__actions, .pvd-intro__actions .pvh-btn { flex: 1 1 auto; }
  .pvd-list > li, .pvd-op { gap: 10px; }
  .pvd-vote { width: 44px; }
  .pvd-form__row .pvh-btn { flex: 1 1 100%; }
}
