/* Sanabil Al-Wahy usability and responsive navigation fixes. */
.brand img,
.brand-compact img {
  display: block !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: center !important;
}

.brand-compact {
  width: min(250px, 34vw) !important;
  min-width: 190px !important;
}

.brand-compact img {
  width: 100% !important;
  max-height: 82px !important;
}

.tabs {
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-color: #9bbdb3 #edf3f0;
  scrollbar-width: thin !important;
  overscroll-behavior-inline: contain;
}

.tabs::-webkit-scrollbar {
  display: block !important;
  height: 8px;
}

.tabs::-webkit-scrollbar-track {
  background: #edf3f0;
  border-radius: 999px;
}

.tabs::-webkit-scrollbar-thumb {
  background: #9bbdb3;
  border-radius: 999px;
}

.tabs button {
  min-height: 50px !important;
  padding: 11px 17px !important;
  font-size: 15px;
  line-height: 1.4;
  scroll-snap-align: center;
  white-space: nowrap;
}

.tabs button:focus-visible,
.top-actions button:focus-visible,
.settings-menu button:focus-visible {
  outline: 3px solid #d1a953 !important;
  outline-offset: 2px;
}

.icon-button,
.top-actions .button {
  min-width: 48px;
  min-height: 48px;
}

@media (min-width: 861px) and (max-width: 1180px) {
  .topbar-inner {
    align-items: center;
    gap: 14px;
  }

  .tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    overflow: visible;
    padding: 9px;
  }

  .tabs button {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .settings-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .settings-menu {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    position: static !important;
  }

  .settings-menu button {
    min-height: 54px;
  }
}

@media (max-width: 860px) {
  .topbar-inner {
    flex-wrap: wrap;
  }

  .brand-compact {
    width: min(210px, 58vw) !important;
    min-width: 150px !important;
  }

  .top-actions {
    margin-inline-start: auto;
  }

  .mobile-nav button {
    min-height: 58px;
  }
}

@media (max-width: 560px) {
  .topbar-inner {
    justify-content: center;
  }

  .brand-compact {
    width: min(250px, 88vw) !important;
  }

  .top-actions {
    width: 100%;
    justify-content: center;
    margin: 0;
  }

  .settings-menu {
    grid-template-columns: 1fr !important;
  }
}
/* Daily Quran assignment editing — compact on mobile and accessible. */
.sl-lesson-tools {display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.sl-lesson-tools .sl-edit-daily-amount {min-height:42px;white-space:normal}
.sl-daily-adjust-form {display:grid;gap:12px}
.sl-daily-adjust-form label {display:grid;gap:6px}
.sl-daily-adjust-form input,.sl-daily-adjust-form select {max-width:100%;min-height:44px}
@media (max-width:600px) {
  .sl-track-head {flex-wrap:wrap;row-gap:10px}
  .sl-track-head > div:first-child {min-width:0}
  .sl-track-head .sl-lesson-tools {width:100%;justify-content:flex-start}
  .sl-track-head .sl-lesson-tools button {flex:1 1 auto}
}
