/* Progressive enhancement: only JS-initialized panels on mobile are affected. */
button.csmcf-toggle { display: none !important; }
@media (max-width: 767px) {
  .csmcf-root { scroll-margin-top: 100px; }
  .csmcf-panel { position: relative; overflow: hidden; overflow: clip; }
  .csmcf-panel.csmcf-collapsed {
    max-height: 320px;
  }
  .csmcf-panel.csmcf-collapsed::after {
    content: "";
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;
    height: 62px;
    background: linear-gradient(to bottom, transparent, var(--csmcf-background, #f7f7f7) 90%);
    pointer-events: none;
  }
  button.csmcf-toggle:not([hidden]) {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    margin: 10px 0 18px;
    padding: 12px 16px;
    border: 1px solid #2b6343;
    border-radius: 8px;
    background: #2d6b47;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    cursor: pointer;
    overflow-anchor: none;
  }
  button.csmcf-toggle:hover { background: #24583a; }
  button.csmcf-toggle:focus-visible { outline: 3px solid #e9a64a; outline-offset: 3px; }
  .csmcf-chevron {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 180ms ease;
  }
  .csmcf-toggle[aria-expanded="true"] .csmcf-chevron { transform: rotate(225deg) translateY(-2px); }
  .csmcf-toggle.csmcf-attention { animation: csmcf-pulse 2.2s ease-out 3; }
  @keyframes csmcf-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(45, 107, 71, 0); }
    40% { box-shadow: 0 0 0 5px rgba(45, 107, 71, .14); }
    75% { box-shadow: 0 0 0 9px rgba(45, 107, 71, 0); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .csmcf-toggle.csmcf-attention { animation: none !important; }
  .csmcf-chevron { transition: none !important; }
}
