/* Phoenix alignment tweaks for fonts and icons */

/* Ensure Nunito Sans is used and rendered crisply */
body {
  font-family: 'Nunito Sans', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a,
a *,
button,
button *,
[role='button'],
[role='button'] *,
[type='button'],
[type='submit'],
[type='reset'],
[type='image'],
input[type='checkbox'],
input[type='radio'],
select,
summary,
label[for],
.btn,
.btn *,
.nav-link,
.nav-link *,
.dropdown-item,
.dropdown-item *,
.form-check-input,
.form-check-label,
.cursor-pointer,
.clickable,
.workspace-tabs__item,
.workspace-tabs__item *,
.fbs-batch-card,
.fbs-batch-card *,
[data-bs-toggle],
[data-bs-toggle] *,
[data-action],
[data-action] * {
  cursor: pointer !important;
}

button:disabled,
.btn:disabled,
[role='button'][aria-disabled='true'],
input:disabled,
select:disabled {
  cursor: not-allowed !important;
}

html,
body {
  height: 100%;
}

.tg-safe-area-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  pointer-events: none;
  height: calc(env(safe-area-inset-top, 0px) + 40px);
  background: linear-gradient(180deg, #d1d5db 0%, rgba(209, 213, 219, 0.85) 60%, rgba(209, 213, 219, 0) 100%);
}

/* Normalize feather icon size where inline style is missing */
[data-feather] {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

/* Font Awesome baseline to match Phoenix preview */
.fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands {
  font-size: 1rem;
  line-height: 1;
}

/* Compact topbar icon buttons to match spacing */
.navbar-top .nav-link [data-feather],
.navbar-top .nav-link .fa,
.navbar-top .nav-link .fas {
  width: 20px;
  height: 20px;
}

/* Bottom navigation on mobile: move top navbar to bottom for thumb reachability */
@media (max-width: 768px) {
  body {
    overflow: hidden;
  }

  main#top {
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  }

  .navbar-top.fixed-top {
    top: auto !important;
    bottom: 0 !important;
    border-top: 1px solid var(--phoenix-secondary-bg);
    border-bottom: 0;
    z-index: 1050; /* выше сайдбара (1040) и оверлея (1029) */
    padding-bottom: max(env(safe-area-inset-bottom), 0px);
  }

  /* ensure content is not overlapped by bottom bar */
  .content {
    padding-bottom: calc(var(--phoenix-navbar-top-height) + env(safe-area-inset-bottom));
  }
}

@media (min-width: 769px) {
  .tg-safe-area-top {
    display: none;
  }

  main#top {
    padding-top: 0;
  }
}
