/* Patch 0.1.15.0.0 - targeted rollback-safe contrast and menu sizing hotfix.
   Built from 0.1.13.0.0, not 0.1.14.0.0, to undo the broad button override.
   Scope:
   1) Make the floating mobile menu non-scrollable and keep all items visible.
   2) Fix ONLY the exact light-surface buttons marked .light-readable.
   3) Keep Use Family controls and design-lab dark candidate buttons readable when their backgrounds are dark. */

@media(max-width:920px){
  .mobile-menu-panel,
  aside.mobile-menu-panel[data-mobile-menu-panel]{
    width:min(390px,calc(100vw - 28px)) !important;
    max-width:min(390px,calc(100vw - 28px)) !important;
    max-height:none !important;
    overflow:visible !important;
    padding:13px !important;
  }

  .mobile-menu-links{
    max-height:none !important;
    overflow:visible !important;
    overscroll-behavior:auto !important;
    gap:7px !important;
    padding:10px !important;
  }

  .mobile-menu-link,
  .mobile-menu-links a.mobile-menu-link{
    min-height:40px !important;
    padding:10px 13px !important;
    font-size:.78rem !important;
    line-height:1.05 !important;
  }
}

@media(max-width:420px){
  .mobile-menu-panel,
  aside.mobile-menu-panel[data-mobile-menu-panel]{
    width:calc(100vw - 20px) !important;
    max-width:calc(100vw - 20px) !important;
  }
}

/* Exact buttons the user identified as pale in light mode. No other site buttons are changed. */
html[data-theme="light"] .light-readable{
  color:#07111f !important;
  -webkit-text-fill-color:#07111f !important;
  text-shadow:0 1px 0 rgba(255,255,255,.70) !important;
}

html[data-theme="light"] .light-readable:hover,
html[data-theme="light"] .light-readable:focus-visible{
  color:#020617 !important;
  -webkit-text-fill-color:#020617 !important;
}

/* The Use Family controls sit on a dark machined button surface even in light mode. Keep them white. */
.theme-select-btn,
button.theme-select-btn,
html[data-theme="light"] .theme-select-btn,
html[data-theme="light"] button.theme-select-btn{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  text-shadow:0 1px 2px rgba(0,0,0,.72) !important;
}

/* Design-lab candidate preview buttons that intentionally have dark backgrounds must keep light text. */
.button-card .btn-candidate,
.button-card .neural-glow-btn,
.button-card .glass-neural-btn,
.button-card .black-chrome-btn,
.button-card .executive-steel-btn,
.button-card .neural-chrome-btn,
.button-card .glass-chrome-btn,
.button-card .violet-forge-btn,
.button-card .deep-field-btn,
.button-card .liquid-titanium-btn,
.button-card .command-blue-btn,
html[data-theme="light"] .button-card .btn-candidate,
html[data-theme="light"] .button-card .neural-glow-btn,
html[data-theme="light"] .button-card .glass-neural-btn,
html[data-theme="light"] .button-card .black-chrome-btn,
html[data-theme="light"] .button-card .executive-steel-btn,
html[data-theme="light"] .button-card .neural-chrome-btn,
html[data-theme="light"] .button-card .glass-chrome-btn,
html[data-theme="light"] .button-card .violet-forge-btn,
html[data-theme="light"] .button-card .deep-field-btn,
html[data-theme="light"] .button-card .liquid-titanium-btn,
html[data-theme="light"] .button-card .command-blue-btn{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  text-shadow:0 1px 2px rgba(0,0,0,.72) !important;
}

/* Disabled dark-preview candidates should stay readable but visibly disabled. */
html[data-theme="light"] .button-card .btn-candidate:disabled,
html[data-theme="light"] .button-card .btn-candidate.is-disabled,
html[data-theme="light"] .button-card button[disabled]{
  color:rgba(255,255,255,.72) !important;
  -webkit-text-fill-color:rgba(255,255,255,.72) !important;
}
