/* EllGab Modern 1.0.29: collapsible mobile SMF rich-editor controls.
   Applies only when JS builds .eg-editor-panels, phones <=700px.
   No controls removed or substituted; all original SMF event handlers retained. */
@media screen and (max-width: 700px) {
  .eg-editor-panels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 12px 0;
  }
  .eg-editor-panels details {
    min-width: 0;
    border: 1px solid #52687d;
    border-radius: 9px;
    background: #1b2a38;
    color: #f3f5f8;
    overflow: hidden;
  }
  .eg-editor-panels details[open] {
    grid-column: 1 / -1;
    background: #1b2937;
  }
  .eg-editor-panels summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 44px;
    padding: 9px 6px;
    cursor: pointer;
    list-style: none;
    font-size: clamp(11px, 3.1vw, 13px);
    font-weight: 700;
    color: #efd09b;
    -webkit-tap-highlight-color: transparent;
  }
  .eg-editor-panels summary::-webkit-details-marker { display: none; }
  .eg-editor-panels summary::after {
    content: '▾';
    flex: 0 0 auto;
    font-size: 16px;
    color: #b7c3cf;
  }
  .eg-editor-panels details[open] summary::after { content: '▴'; }
  .eg-editor-panels summary:focus-visible {
    outline: 2px solid #efd09b;
    outline-offset: -3px;
    border-radius: 8px;
  }
  .eg-editor-panels .eg-editor-panel-body {
    min-width: 0;
    padding: 10px;
    border-top: 1px solid #384c60;
  }
  .eg-editor-panels select {
    box-sizing: border-box;
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 44px;
    margin: 0 !important;
    padding: 7px 10px !important;
    font-size: 16px !important;
    color: #f1f4f7 !important;
    background: #101923 !important;
    border: 1px solid #53687c;
    border-radius: 7px;
  }
  .eg-editor-panels #bbcBox_message,
  .eg-editor-panels #smileyBox_message {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  .eg-editor-panels #bbcBox_message > div,
  .eg-editor-panels #smileyBox_message > div {
    box-sizing: border-box;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    white-space: normal !important;
    margin: 0 0 6px !important;
    line-height: 2.1;
  }
  .eg-editor-panels #bbcBox_message img,
  .eg-editor-panels #smileyBox_message img {
    display: inline-block;
    vertical-align: middle;
    margin: 3px 4px 3px 0 !important;
    max-height: 30px !important;
    width: auto !important;
    cursor: pointer;
  }
  .eg-editor-panels #smileyBox_message img {
    max-width: 30px !important;
  }
  .eg-editor-panels .eg-editor-panel-body:empty { display: none; }
}
