/* CreatorHub PWA + mobile polish. Loaded after the theme CSS. */

/* Safe areas for notched phones and standalone mode */
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
@media (display-mode: standalone) {
  body { padding-bottom: env(safe-area-inset-bottom); }
}

/* General mobile friendliness */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, iframe { max-width: 100%; }
img { height: auto; }
a, button, .btn { touch-action: manipulation; -webkit-tap-highlight-color: rgba(75, 0, 214, .15); }

@media (max-width: 767.98px) {
  /* 16px inputs stop iOS zooming in when a field is focused */
  input, select, textarea, .form--control, .form-control { font-size: 16px !important; }
  /* comfortable tap targets */
  .btn, button[type="submit"] { min-height: 44px; }
  /* prevent sideways scrolling from wide content */
  body { overflow-x: hidden; }
  .table-responsive, .table-wrapper { -webkit-overflow-scrolling: touch; }
  .contact__info-box a, .footer-menu__link { display: inline-block; padding: 4px 0; }
}

/* Install banner */
#chInstall {
  position: fixed; z-index: 99999;
  left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 460px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px;
  background: #1E1456; color: #fff; font-size: 14px; line-height: 1.35;
  box-shadow: 0 10px 30px rgba(8, 5, 20, .35);
}
#chInstall .ch-install__text { flex: 1; }
#chInstall .ch-install__btn {
  border: 0; border-radius: 999px; padding: 9px 18px; min-height: 40px;
  font-weight: 600; color: #fff; cursor: pointer;
  background: linear-gradient(90deg, #FF9A0A, #FF0F7B);
}
#chInstall .ch-install__close {
  border: 0; background: transparent; color: #cfc8ff; font-size: 24px; line-height: 1;
  width: 32px; height: 32px; cursor: pointer;
}

/* Logo strip with few logos: centred row instead of a slider */
.client-logos--static { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px 64px; }
.client-logos--static img { height: 56px; width: auto; max-width: 220px; object-fit: contain; }
@media (max-width: 575.98px) {
  .client-logos--static { gap: 20px 36px; }
  .client-logos--static img { height: 44px; max-width: 42vw; }
}

/* ===== App-style mobile shell (phones and small tablets) ===== */
.mnav, .mnav-sheet, .mnav-backdrop { display: none; }

@media (max-width: 991.98px) {
  :root { --mnav-h: 62px; --mnav-accent: hsl(var(--base, 255 100% 42%)); }

  body { padding-bottom: calc(var(--mnav-h) + env(safe-area-inset-bottom) + 8px); overscroll-behavior-y: none; }
  body.mnav-lock { overflow: hidden; }

  /* Top bar: slim, sticky, translucent like a native app bar */
  .header { position: sticky; top: 0; z-index: 1030; background: rgba(255,255,255,.92);
            -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
            box-shadow: 0 1px 0 rgba(30,20,86,.08); padding-top: env(safe-area-inset-top); }
  .header .navbar { padding-top: 6px; padding-bottom: 6px; }
  .header .navbar-brand img { height: 34px; width: auto; }
  /* the bottom bar replaces the hamburger menu */
  .header .navbar-toggler, .header .header-button { display: none !important; }
  .header .navbar-collapse { display: none !important; }

  /* Bottom tab bar */
  .mnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
          height: calc(var(--mnav-h) + env(safe-area-inset-bottom)); padding: 6px 6px env(safe-area-inset-bottom);
          background: rgba(255,255,255,.96); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
          border-top: 1px solid rgba(30,20,86,.1); box-shadow: 0 -6px 24px rgba(30,20,86,.08); }
  .mnav__item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
                min-width: 0; border: 0; background: transparent; color: #6b6890; font-size: 11px; font-weight: 600;
                text-decoration: none; border-radius: 12px; transition: color .15s, transform .1s; cursor: pointer; padding: 0; }
  .mnav__item i { font-size: 24px; line-height: 1; }
  .mnav__item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mnav__item:active { transform: scale(.92); }
  .mnav__item.is-active { color: var(--mnav-accent); }
  .mnav__item.is-active i { transform: translateY(-1px); }
  .mnav__item.is-active::after { content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--mnav-accent); margin-top: 1px; }

  /* "More" bottom sheet */
  .mnav-backdrop { display: block; position: fixed; inset: 0; z-index: 1050; background: rgba(8,5,20,.5); opacity: 0; transition: opacity .2s; }
  .mnav-backdrop[hidden], .mnav-sheet[hidden] { display: none; }
  .mnav-backdrop.is-open { opacity: 1; }
  .mnav-sheet { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1060; background: #fff;
                border-radius: 20px 20px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
                transform: translateY(100%); transition: transform .22s ease-out; max-height: 80vh; overflow-y: auto; }
  .mnav-sheet.is-open { transform: translateY(0); }
  .mnav-sheet__grab { width: 40px; height: 4px; border-radius: 4px; background: #d9d6ea; margin: 4px auto 10px; }
  .mnav-sheet__list { list-style: none; margin: 0; padding: 0; }
  .mnav-sheet__list a, .mnav-sheet__list button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px;
                padding: 8px 6px; color: #1E1456; font-size: 16px; font-weight: 500; text-decoration: none;
                background: transparent; border: 0; border-bottom: 1px solid #f0eef8; text-align: left; }
  .mnav-sheet__list i { font-size: 22px; color: var(--mnav-accent); }

  .mnav-sheet__langs { display: flex; align-items: center; gap: 10px; padding: 12px 6px; border-bottom: 1px solid #f0eef8; }
  .mnav-sheet__langs i { font-size: 22px; color: var(--mnav-accent); }
  .mnav-sheet__langs a { display: inline-flex !important; width: auto !important; min-height: 38px !important; padding: 6px 14px !important;
        border: 1px solid #d9d6ea !important; border-radius: 999px; font-size: 14px !important; font-weight: 600; }
  .mnav-sheet__langs a.is-current { background: #1E1456; color: #fff; border-color: #1E1456 !important; }

  /* Lift floating elements above the tab bar */
  .scroll-top { bottom: calc(var(--mnav-h) + env(safe-area-inset-bottom) + 14px) !important; }
  #chInstall { bottom: calc(var(--mnav-h) + env(safe-area-inset-bottom) + 12px); }

  /* App-like feel */
  .py-120 { padding-top: 56px; padding-bottom: 56px; }
  .py-60 { padding-top: 32px; padding-bottom: 32px; }
  .preloader { display: none !important; }
  * { -webkit-tap-highlight-color: transparent; }
}

/* Footer is not needed as much when the tab bar is present */
@media (max-width: 575.98px) {
  .footer-area { padding-top: 40px; }
}
@media (min-width: 992px) { .mnav, .mnav-sheet, .mnav-backdrop { display: none !important; } }
