/* jobspeaker-web mobile wrapper mode (JobspeakerApp) */
/* Hide the legacy web header; native shell provides header + drawer */

html.mobile-app .uiview[ui-view='main_nav'] {
  display: none !important;
}

/* Hide V1 "nav-v2" side navigation in mobile wrapper mode */
html.mobile-app .layout-fixed-sidebar .fixed-sidebar {
  display: none !important;
}

html.mobile-app .layout-fixed-sidebar .main-block {
  margin-left: 0 !important;
}

/* Hide narrow-view navigation dropdown(s) that drive `tabLocation` + `goTo()` */
html.mobile-app select[ng-model="tabLocation"] {
  display: none !important;
}

/* ---- Mobile normalization layer (typography + spacing) ---- */
html.mobile-app,
html.mobile-app body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Shared mobile wrapper tokens (align with events-web mobile-app.scss) */
html.mobile-app {
  --jsm-font-family: "Open Sans", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --jsm-font-size-base: 16px;
  --jsm-line-height-base: 1.35;
  --jsm-radius: 10px;
  --jsm-pad-x: 12px;
  --jsm-muted-bg: rgba(0, 0, 0, 0.04);
  --jsm-control-height: 44px;
}

html.mobile-app body {
  font-size: var(--jsm-font-size-base);
  line-height: var(--jsm-line-height-base);
  font-family: var(--jsm-font-family);
  background: #f4f4f4;
}

html.mobile-app .layout-fixed-sidebar .main-block {
  /* Avoid double-padding (main-block + inner panels). We'll pad the ui-view instead. */
  padding: 0 0 24px !important;
  box-sizing: border-box;
  background: #f4f4f4;
}

/* Accent strip (match V2 mobile_app pattern) */
html.mobile-app .layout-fixed-sidebar .main-block::before {
  content: "";
  display: block;
  height: 16px;
  margin: 0 0 12px;
  background: linear-gradient(
    90deg,
    var(--primary-dark, #4d4d4f),
    var(--primary-light, #98B93E)
  );
}

/* Default content padding for V1 pages */
html.mobile-app .layout-fixed-sidebar .main-block > div[ui-view] {
  padding: var(--jsm-pad-x) !important;
  box-sizing: border-box;
}

/* Ensure the accent strip is visible even when main-block has children with their own backgrounds */
html.mobile-app .layout-fixed-sidebar .main-block::before {
  border-radius: 0;
}

/* Reduce excessive heading/panel spacing */
html.mobile-app h1,
html.mobile-app h2,
html.mobile-app h3,
html.mobile-app h4 {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

html.mobile-app .panel-admin {
  margin-bottom: 12px;
  border-radius: var(--jsm-radius);
}

/* Make form controls friendlier on narrow widths */
html.mobile-app .form-control {
  font-size: 16px;
  height: auto;
  border-radius: var(--jsm-radius);
}

/* Headings: align scale closer to events-web in mobile wrapper mode */
html.mobile-app h1,
html.mobile-app h2 {
  font-family: var(--jsm-font-family);
  font-weight: 800;
  letter-spacing: -0.2px;
}

html.mobile-app h1 { font-size: 20px; line-height: 26px; }
html.mobile-app h2 { font-size: 18px; line-height: 24px; }

/* Buttons: unify look/feel in mobile_app mode */
html.mobile-app .btn {
  border-radius: var(--jsm-radius);
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: none;
  font-size: 16px;
  min-height: var(--jsm-control-height);
}

html.mobile-app .btn-primary {
  background-color: var(--primary-light, #98B93E) !important;
  border-color: var(--primary-light, #98B93E) !important;
}

/* ---- My Jobs (/#/js/jsdash) polish ---- */
/* Remove extra edge spacing so this matches V2 padding exactly */
html.mobile-app .my-jobs,
html.mobile-app .my-jobs > .col-sm-12 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Override inline `style="padding: 15px;"` on the panel wrapper (we'll use outer padding) */
html.mobile-app .my-jobs .panel-admin {
  padding: 0 !important;
}

html.mobile-app .my-jobs .admin-header h4 {
  margin: 0 !important;
  padding: 0 !important;
  /* Hide the redundant title text while keeping the help icon clickable */
  font-size: 0 !important;
  line-height: 0 !important;
}

html.mobile-app .my-jobs .admin-header h4 i.fa-question-circle-o {
  /* In mobile wrapper mode we show the legend inline, so hide this toggle. */
  display: none !important;
}

html.mobile-app .my-jobs .admin-header .action-bar {
  text-align: right;
}

html.mobile-app .my-jobs .admin-header .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  padding: 10px 12px;
}

html.mobile-app .my-jobs .admin-header .btn i.fa-plus-circle {
  display: none;
}

html.mobile-app .my-jobs .list-filter-row {
  margin-top: 8px;
}

/* Kill Bootstrap gutters inside My Jobs to match V2's tighter layout */
html.mobile-app .my-jobs .panel-admin .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

html.mobile-app .my-jobs .panel-admin [class^="col-"],
html.mobile-app .my-jobs .panel-admin [class*=" col-"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Add consistent panel padding inside (single source of truth) */
html.mobile-app .my-jobs .panel-admin {
  padding: 12px !important;
}

/* Hide Job Progress Legend entirely on mobile */
html.mobile-app .my-jobs .job-list-item.bg-info {
  display: none !important;
}

/* Sticky bottom action bar for Add Job (hide when a modal is open) */
html.mobile-app .my-jobs .admin-header {
  /* Keep it in DOM for Angular click handlers, but remove its layout impact */
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

html.mobile-app .my-jobs .admin-header > .col-xs-6:not(.action-bar) {
  display: none !important;
}

html.mobile-app .my-jobs .admin-header .action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  width: auto !important;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #f4f4f4;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: center;
}

html.mobile-app .my-jobs .admin-header .action-bar .btn.btn-primary {
  width: 100%;
  max-width: 520px; /* looks good on tablets too */
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  padding: 12px 14px;
}

html.mobile-app body.modal-open .my-jobs .admin-header .action-bar {
  display: none !important;
}

/* Leave room for the footer so we don't get an awkward gap/overlap */
html.mobile-app .layout-fixed-sidebar .main-block {
  padding-bottom: 0 !important;
}

html.mobile-app .layout-fixed-sidebar .main-block > div[ui-view] {
  padding-bottom: 12px !important;
}

/* Hide the V1 footer in mobile wrapper mode */
html.mobile-app .uiview[ui-view='main_footer'],
html.mobile-app .footer-v2-container {
  display: none !important;
}

/* Move HubSpot chat/beacon to bottom-left in mobile wrapper mode */
html.mobile-app #hubspot-messages-iframe-container,
html.mobile-app #hs-beacon-container {
  left: 16px !important;
  right: auto !important;
  /* Keep above the fixed Add Job bottom bar */
  bottom: calc(16px + 72px + env(safe-area-inset-bottom)) !important;
}

html.mobile-app #hubspot-conversations-iframe {
  left: 0 !important;
  right: auto !important;
}

/* Ensure fixed bottom action bar doesn't cover My Jobs content */
html.mobile-app .my-jobs {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}


