/* DeCA mobile navigation. Loaded after the existing app styles. */
.mobile-nav-actions { display: none; }

@media (max-width: 740px) {
  .sidebar[data-mobile-nav] {
    position: static;
    inset: auto;
    width: 100%;
    height: auto;
    max-height: none;
    padding: 16px;
    overflow: visible;
  }

  .sidebar[data-mobile-nav] .brand { margin-bottom: 14px; }

  .sidebar[data-mobile-nav] .mobile-nav-actions:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr);
    gap: 10px;
  }

  .mobile-new-deca,
  .mobile-menu-toggle {
    min-width: 0;
    min-height: 60px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: 650 15px/1.3 system-ui, -apple-system, sans-serif;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .mobile-new-deca {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background: #087f8c;
  }

  .mobile-new-deca:hover { color: #fff; background: #066d78; text-decoration: none; }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    text-align: left;
    color: #16343e;
    background: #fff;
    border-color: #dce5e9;
  }

  .mobile-menu-toggle[aria-expanded="true"] { background: #dff4ef; }
  .mobile-menu-toggle strong { display: block; font-size: 15px; }
  .mobile-menu-toggle small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.3; font-weight: 500; }
  .mobile-menu-toggle svg { flex: 0 0 18px; width: 18px; height: 18px; }
  .mobile-menu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

  .sidebar[data-mobile-nav] > nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    padding: 14px 0 0;
    overflow: visible;
  }

  .sidebar[data-mobile-nav] > nav > a {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    width: 100%;
    min-height: 52px;
    padding: 13px 15px;
    margin: 0;
    border: 1px solid #355360;
    border-radius: 9px;
    font-size: 16px;
    line-height: 1.4;
    color: #f3f8fa;
    background: #213e49;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .sidebar[data-mobile-nav] > nav > a:hover,
  .sidebar[data-mobile-nav] > nav > a.active {
    color: #fff;
    background: #08717d;
    border-color: #78cfc8;
    text-decoration: none;
  }

  .sidebar[data-mobile-nav] > nav > .nav-label {
    display: block;
    margin: 12px 4px 0;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 1px;
    color: #b8d1db;
  }

  .sidebar[data-mobile-nav] .sidebar-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 16px 0 0;
    margin: 0;
    font-size: 13px;
  }

  .sidebar[data-mobile-nav] .sidebar-bottom > span { min-width: 0; overflow-wrap: anywhere; }
  .sidebar[data-mobile-nav] .sidebar-bottom .linkbutton { min-height: 44px; padding: 8px 12px; font-size: 16px; }

  /* The large shortcut above replaces this duplicate only when JS is ready. */
  .sidebar[data-mobile-nav].mobile-nav-ready > nav > .nav-new { display: none; }
  .sidebar[data-mobile-nav].mobile-nav-collapsed > nav,
  .sidebar[data-mobile-nav].mobile-nav-collapsed > .sidebar-bottom { display: none; }

  .sidebar[data-mobile-nav] a:focus-visible,
  .sidebar[data-mobile-nav] button:focus-visible { outline: 3px solid #a0eee7; outline-offset: 3px; }
}
