/* P1N Community Engine v0.3.0 Alpha.6 — accessible post footer and moderation controls.
 * Only targets new ce306 classes. Database and existing action endpoints unchanged.
 */
.post-card .post-bottom.ce306-post-footer{
  display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;
  gap:0;min-width:0;flex-wrap:nowrap;margin-top:19px;padding-top:12px;
}
.ce306-main-row{
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:10px 14px;width:100%;min-width:0;
}
.post-card .ce306-main-row>.ce306-reaction-group{
  display:flex;align-items:center;justify-content:flex-start;gap:6px;
  flex:0 0 auto;min-width:0;max-width:100%;white-space:nowrap;
}
.post-card .ce306-main-row>.ce306-member-actions{
  display:flex;align-items:center;justify-content:flex-end;
  gap:7px;flex:1 1 325px;min-width:0;flex-wrap:wrap;margin-left:auto;
}
.post-card .ce306-main-row .ce305-action,
.post-card .ce306-staff-row .ce305-action,
.post-card .ce306-mod-option,
.ce306-thread-tools .btn{
  display:inline-flex;align-items:center;justify-content:center;
  gap:6px;min-height:34px;padding:7px 11px;
  border:1px solid #31577d;border-radius:10px;
  background:#162d4a;color:#dceefa;
  font-size:.76rem;font-weight:680;line-height:1.2;white-space:nowrap;
  box-shadow:none;max-width:100%;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .16s ease;
}
.post-card .ce306-main-row .ce305-action .ui-icon,
.post-card .ce306-staff-row .ce305-action .ui-icon,
.post-card .ce306-mod-option .ui-icon,
.ce306-thread-tools .btn .ui-icon{
  display:block;width:15px;height:15px;flex:0 0 15px;
}
.post-card .ce306-main-row .ce305-action:hover,
.post-card .ce306-staff-row .ce305-action:hover,
.post-card .ce306-mod-option:hover,
.ce306-thread-tools .btn:hover{
  background:#1d4163;color:#fff;border-color:#4c99c1;transform:translateY(-1px);
}
.post-card .ce306-main-row .ce305-report{background:transparent;color:#b8cfe5}
.post-card .ce306-main-row .ce304-multiquote.is-selected{color:#80ecfd!important;background:#164b62!important;border-color:#2ac8e4!important}
.post-card .ce306-post-footer .btn:focus-visible,
.post-card .ce306-post-footer summary:focus-visible,
.ce306-thread-tools summary:focus-visible{
  outline:2px solid var(--brand-accent,#39d1ee);outline-offset:3px;
}
/* Staff actions always have their own distinct, bounded row. */
.post-card .ce306-staff-row{
  display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;
  width:100%;min-width:0;margin-top:12px;padding:10px 11px;
  border:1px solid #294b6d;border-radius:12px;
  background:linear-gradient(105deg,rgba(29,64,101,.52),rgba(17,39,69,.58));
}
.ce306-staff-caption{
  display:inline-flex;align-items:center;gap:8px;white-space:nowrap;
  color:#a5c6e3;font-size:.76rem;font-weight:720;
}
.ce306-staff-caption>.ui-icon{height:16px;width:16px;color:#83bedc}
.post-card .ce306-staff-row form{display:inline-flex;margin:0}
.post-card .ce306-staff-row .ce306-delete{
  margin-left:auto;background:rgba(133,35,64,.16);border-color:#b94e6a;
  color:#ffc4cf;padding:7px 12px;
}
.post-card .ce306-staff-row .ce306-delete:hover{background:#76314d;border-color:#ee718e;color:#fff}
.ce306-mod-tools{
  flex:0 1 auto;min-width:0;max-width:100%;
}
.ce306-mod-tools>summary{
  display:flex;align-items:center;justify-content:center;gap:7px;
  padding:7px 11px;min-height:34px;max-width:100%;
  border:1px solid #355d85;border-radius:10px;
  background:#173454;color:#e7f4ff;
  font-size:.77rem;font-weight:730;cursor:pointer;
  list-style:none;user-select:none;transition:.16s ease;
}
.ce306-mod-tools>summary::-webkit-details-marker,
.ce306-thread-tools>summary::-webkit-details-marker{display:none}
.ce306-mod-tools>summary:hover,
.ce306-mod-tools[open]>summary{background:#204971;border-color:#50a6d2}
.ce306-mod-tools>summary>.ui-icon{flex-shrink:0;width:15px;height:15px}
.ce306-mod-tools>summary>.ui-icon:last-child{
  width:13px;height:13px;transition:transform .18s ease;
}
.ce306-mod-tools[open]>summary>.ui-icon:last-child{transform:rotate(180deg)}
/* In-flow expansion prevents overflow/clipping and never changes card stacking. */
.ce306-mod-tools[open]{flex:1 1 100%;order:5}
.ce306-mod-tools[open]>summary{width:max-content}
.ce306-mod-panel{
  display:flex;align-items:center;flex-wrap:wrap;gap:8px;
  margin-top:10px;padding-top:11px;border-top:1px solid #294e70;
  animation:ce306-menu-in .16s ease-out both;
}
.ce306-mod-panel form{display:inline-flex}
.post-card .ce306-mod-option{
  min-height:32px;padding:7px 10px;
  font-size:.74rem;background:rgba(18,51,82,.8);
}
/* Topic-level staff actions remain usable on every pagination page. */
.thread-actions{align-items:center;flex-wrap:wrap}
.ce306-thread-tools{position:relative;max-width:100%;min-width:0;flex:0 1 auto}
.ce306-thread-tools>summary{
  display:flex;align-items:center;gap:7px;list-style:none;cursor:pointer;
  min-height:34px;font-size:.77rem;font-weight:720;
}
.ce306-thread-tools>summary>.ui-icon{height:15px;width:15px}
.ce306-thread-tools>summary>.ui-icon:last-child{height:12px;width:12px;transition:transform .18s ease}
.ce306-thread-tools[open]>summary>.ui-icon:last-child{transform:rotate(180deg)}
.ce306-thread-tools[open]{flex:1 1 100%;order:10}
.ce306-thread-tools[open]>summary{width:max-content}
.ce306-thread-tools-panel{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  margin-top:9px;padding:11px 12px;
  border:1px solid #345778;border-radius:11px;background:#142c49;
  animation:ce306-menu-in .16s ease-out both;
}
.ce306-thread-tools-panel form{display:inline-flex}
.ce306-thread-tools-panel .danger{color:#ffb5c3;border-color:#91405b;background:#44243a}
@keyframes ce306-menu-in{from{opacity:.1;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
/* Reply composition/quick-edit areas still render below the footer as before. */
@container (max-width: 600px){
  .post-card .ce306-main-row>.ce306-member-actions{
    flex:1 1 100%;justify-content:flex-start;margin-left:0;
  }
}
@container (max-width: 420px){
  .post-card .ce306-main-row>.ce306-member-actions{gap:6px}
  .post-card .ce306-main-row .ce305-action{padding:6px 8px;font-size:.73rem}
  .post-card .ce306-staff-row{padding:9px;gap:8px}
  .ce306-staff-caption{font-size:.7rem}
  .ce306-mod-tools>summary{font-size:.72rem;padding:7px 9px}
}
@media (max-width: 480px){
  .post-card .ce306-post-footer .ce306-main-row{gap:9px}
  .post-card .ce306-staff-row .ce306-delete{margin-left:auto}
}
@media (prefers-reduced-motion:reduce){
 .ce306-mod-panel,.ce306-thread-tools-panel{animation:none}
 .post-card .ce306-post-footer .btn,.ce306-mod-tools summary,.ce306-thread-tools summary{transition:none!important;transform:none!important}
}
