/**
 * Kuetu responsive shell — mobile-first complements for admin + public pages.
 * Brand accent: #444DDB. Safe at ≤768 / ≤992; desktop unchanged above 992.
 */

/* ── Shared touch targets ── */
@media (max-width: 991.98px) {
  .landing-page .navbar-toggler,
  .landing-page .lp-header .lp-yt-menu-toggle,
  .pc-header .pc-head-link,
  #mobile-collapse,
  #sidebar-hide {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ── Admin sidebar / header (pc-sidebar) ── */
@media (max-width: 1024px) {
  .pc-sidebar {
    z-index: 1040;
  }

  /* Keep Able Pro split: #mobile-collapse on mobile, #sidebar-hide on desktop (style.css). */

  .pc-container {
    padding-inline: 0.75rem;
  }

  .pc-content {
    padding-inline: 0.75rem;
  }

  .page-header .row {
    row-gap: 0.5rem;
  }

  .page-header .breadcrumb {
    flex-wrap: wrap;
  }
}

@media (max-width: 767.98px) {
  .pc-header .m-header,
  .pc-sidebar .m-header .logo-lg {
    max-width: 140px;
  }

  .pc-container,
  .pc-content {
    padding-inline: 0.5rem;
  }

  .card .card-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .btn,
  .form-control,
  .form-select {
    max-width: 100%;
  }

  /* Tables: allow horizontal scroll without breaking layout */
  .table-responsive {
    margin-inline: -0.25rem;
  }
}

/* Overlay when mobile sidebar is open (Able Pro uses .mob-sidebar-active) */
@media (max-width: 1024px) {
  body.mob-sidebar-active .pc-sidebar::before,
  .pc-sidebar.mob-sidebar-active ~ .pc-container::before {
    content: none;
  }

  body.mob-sidebar-active::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(26, 35, 50, 0.45);
    z-index: 1035;
    pointer-events: auto;
  }
}

/* ── Landing YouTube topbar (mobile) ── */
@media (max-width: 767.98px) {
  .landing-page .lp-header.lp-header--youtube .lp-yt-menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .landing-page .lp-header.lp-header--youtube .lp-yt-mobile {
    background: #ffffff;
    border-radius: 0;
    margin-top: 0;
    max-height: calc(100dvh - 56px);
    overflow-y: auto;
  }

  /* Prevent duplicate / leftover Able Pro toggler chrome on landing */
  .landing-page .lp-header .navbar-toggler {
    display: none !important;
  }
}

/* ── Auth cards ── */
@media (max-width: 575.98px) {
  .auth-page {
    padding: 1.25rem 0.85rem 2rem;
    align-items: flex-start;
  }

  .auth-page__lang {
    top: 0.75rem;
    right: 0.75rem;
  }

  [dir='rtl'] .auth-page__lang {
    right: auto;
    left: 0.75rem;
  }

  .auth-card {
    max-width: 100%;
    padding: 1.35rem 1.1rem 1.25rem;
    border-radius: 14px;
  }

  .auth-brand__name {
    font-size: 1.25rem;
  }

  .auth-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-submit,
  .auth-card .btn.auth-submit,
  .auth-card .btn-primary {
    min-height: 48px;
  }
}

/* ── Landing hero ── */
@media (max-width: 991.98px) {
  .lp-hero {
    min-height: auto;
    padding-block: 4.5rem 3rem;
  }

  .lp-hero__title {
    font-size: clamp(1.75rem, 6vw, 2.35rem);
    line-height: 1.15;
  }

  .lp-hero__lede {
    font-size: 1rem;
    max-width: 100%;
  }

  .lp-hero__cta {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 360px;
  }

  .lp-hero__cta .lp-btn-primary,
  .lp-hero__cta .lp-btn-ghost,
  .lp-btn-primary,
  .lp-btn-ghost {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .lp-hero {
    padding-block: 3.75rem 2.25rem;
  }

  .lp-hero__brand-name {
    font-size: 1.1rem;
  }

  .lp-hero__brand img {
    height: 36px;
  }
}

/* ── Pricing stack ── */
@media (max-width: 991.98px) {
  .lp-pricing {
    padding-block: 2.5rem;
  }

  .lp-pricing__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .lp-pricing-card {
    padding: 1.35rem 1.15rem;
  }

  .lp-pricing-card__cta {
    min-height: 48px;
  }
}

@media (max-width: 575.98px) {
  .lp-pricing__header h2 {
    font-size: 1.5rem;
  }

  .lp-pricing-card__price-amount {
    font-size: 2rem;
  }
}

/* ── Public help layout ── */
@media (max-width: 767.98px) {
  .navbar .container {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .navbar .d-flex.align-items-center.gap-2 {
    width: 100%;
    justify-content: flex-end;
  }
}
