/* =========================================================
   FoodNiti Smooth UI V2
   Accordion/menu transitions only. No backend or layout logic.
   ========================================================= */

:root{
  --fn-smooth-speed: 280ms;
  --fn-smooth-ease: cubic-bezier(.22,.61,.36,1);
}

/* Smooth left menu groups in Secretariat sidebar */
.fn-command-sidebar .fn-menu-block{
  transition: box-shadow var(--fn-smooth-speed) var(--fn-smooth-ease), transform var(--fn-smooth-speed) var(--fn-smooth-ease), background var(--fn-smooth-speed) var(--fn-smooth-ease) !important;
}
.fn-command-sidebar .fn-menu-head{
  transition: background var(--fn-smooth-speed) var(--fn-smooth-ease), color var(--fn-smooth-speed) var(--fn-smooth-ease) !important;
}
.fn-command-sidebar .fn-submenu{
  display:grid !important;
  overflow:hidden !important;
  max-height:520px;
  opacity:1;
  transform:translateY(0);
  transition:max-height var(--fn-smooth-speed) var(--fn-smooth-ease), opacity 220ms ease, padding var(--fn-smooth-speed) var(--fn-smooth-ease), transform var(--fn-smooth-speed) var(--fn-smooth-ease) !important;
  will-change:max-height, opacity, transform;
}
.fn-command-sidebar .fn-menu-block.closed .fn-submenu{
  max-height:0 !important;
  opacity:0 !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
  margin-top:0 !important;
  transform:translateY(-4px);
  pointer-events:none;
}
.fn-command-sidebar .fn-menu-block.closed .fn-menu-head:after{content:'▸' !important;}
.fn-command-sidebar .fn-menu-block:not(.closed) .fn-menu-head:after{content:'▾' !important;}

/* Smooth member sidebar groups */
.fn-sidebar .fn-side-group{
  overflow:hidden;
  transition:box-shadow var(--fn-smooth-speed) var(--fn-smooth-ease), transform var(--fn-smooth-speed) var(--fn-smooth-ease) !important;
}
.fn-sidebar .fn-side-group h3{
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  user-select:none;
  margin-bottom:0 !important;
}
.fn-sidebar .fn-side-group h3:after{
  content:'▾';
  color:#0b6d7c;
  font-size:12px;
  transition:transform var(--fn-smooth-speed) var(--fn-smooth-ease);
}
.fn-sidebar .fn-side-group.fn-smooth-closed h3:after{content:'▸';}
.fn-sidebar .fn-side-group button,
.fn-sidebar .fn-side-group a{
  transition:opacity 210ms ease, transform var(--fn-smooth-speed) var(--fn-smooth-ease), background 180ms ease !important;
}
.fn-sidebar .fn-side-group.fn-smooth-closed button,
.fn-sidebar .fn-side-group.fn-smooth-closed a{
  opacity:0;
  transform:translateY(-4px);
  pointer-events:none;
  height:0 !important;
  min-height:0 !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
  margin-top:0 !important;
  margin-bottom:0 !important;
  border-width:0 !important;
  overflow:hidden !important;
}

/* Native details accordions used in Member/detail pages */
details.fn-accordion{
  overflow:hidden !important;
  transition:box-shadow var(--fn-smooth-speed) var(--fn-smooth-ease), border-color var(--fn-smooth-speed) var(--fn-smooth-ease), transform var(--fn-smooth-speed) var(--fn-smooth-ease) !important;
}
details.fn-accordion summary{
  transition:background var(--fn-smooth-speed) var(--fn-smooth-ease), color var(--fn-smooth-speed) var(--fn-smooth-ease) !important;
}
details.fn-accordion .fn-acc-body{
  overflow:hidden;
  transition:max-height var(--fn-smooth-speed) var(--fn-smooth-ease), opacity 220ms ease, padding-top var(--fn-smooth-speed) var(--fn-smooth-ease), padding-bottom var(--fn-smooth-speed) var(--fn-smooth-ease) !important;
  will-change:max-height, opacity;
}
details.fn-accordion:not([open]) .fn-acc-body{
  max-height:0 !important;
  opacity:0 !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
}
details.fn-accordion[open] .fn-acc-body{
  opacity:1;
}

/* Bootstrap collapse accordions used in Agenda/Received Agenda/Minutes */
.accordion .accordion-button{
  transition:background var(--fn-smooth-speed) var(--fn-smooth-ease), color var(--fn-smooth-speed) var(--fn-smooth-ease), box-shadow var(--fn-smooth-speed) var(--fn-smooth-ease) !important;
}
.accordion .accordion-collapse{
  overflow:hidden !important;
}
.accordion .accordion-collapse.fn-smooth-collapsing{
  display:block !important;
  visibility:visible !important;
  overflow:hidden !important;
  transition:height var(--fn-smooth-speed) var(--fn-smooth-ease), opacity 220ms ease !important;
  will-change:height, opacity;
}
.accordion .accordion-collapse:not(.show):not(.fn-smooth-collapsing){
  display:none;
}
.accordion .accordion-collapse.show{
  display:block;
  visibility:visible;
  opacity:1;
}

/* Processing/action button feedback */
button,.btn,.add-minutes-btn,.fn-primary,.fn-secondary,.fn-success,.fn-danger,.fn-record-actions button,.fn-final-open{
  transition:transform 140ms ease, box-shadow 180ms ease, filter 180ms ease, background 180ms ease, color 180ms ease !important;
}
button:hover,.btn:hover,.add-minutes-btn:hover,.fn-primary:hover,.fn-secondary:hover,.fn-success:hover,.fn-danger:hover,.fn-record-actions button:hover,.fn-final-open:hover{
  transform:translateY(-1px);
  filter:brightness(.98);
}
button:active,.btn:active,.add-minutes-btn:active,.fn-primary:active,.fn-secondary:active,.fn-success:active,.fn-danger:active,.fn-record-actions button:active,.fn-final-open:active,
.fn-clicking{
  transform:scale(.985) !important;
}

@media (prefers-reduced-motion: reduce){
  .fn-command-sidebar .fn-submenu,
  .fn-sidebar .fn-side-group,
  details.fn-accordion .fn-acc-body,
  .accordion .accordion-collapse.fn-smooth-collapsing,
  button,.btn,.add-minutes-btn,.fn-primary,.fn-secondary,.fn-success,.fn-danger{
    transition:none !important;
  }
}
