/* filename: public/css/pages/mobile-golden-path.css */
@media (max-width: 575.98px) {
  :root {
    --ns-mobile-bar-height: 76px;
    --ns-mobile-gap: 12px;
    --ns-mobile-page-pad: 14px;
    --ns-mobile-radius: 16px;
    --ns-mobile-touch: 44px;
    --ns-mobile-panel: var(--ea-bg-secondary, #2d2d2d);
    --ns-mobile-panel-2: var(--ea-bg-tertiary, #3d3d3d);
    --ns-mobile-text: var(--ea-text-primary, #ffffff);
    --ns-mobile-muted: var(--ea-text-secondary, #a3a3a3);
    --ns-mobile-border: var(--ea-border, rgba(255, 255, 255, 0.1));
    --ns-mobile-accent: #6366f1;
  }

  body.golden-path-mobile,
  .golden-path-mobile {
    -webkit-text-size-adjust: 100%;
    overscroll-behavior-y: contain;
  }

  .golden-path-mobile .container,
  .golden-path-mobile .container-fluid {
    padding-left: var(--ns-mobile-page-pad);
    padding-right: var(--ns-mobile-page-pad);
  }

  .golden-path-mobile.has-mobile-action-bar,
  .golden-path-mobile .has-mobile-action-bar,
  .golden-path-mobile.ns-mobile-bar-pad,
  .golden-path-mobile .ns-mobile-bar-pad {
    padding-bottom: calc(var(--ns-mobile-bar-height) + env(safe-area-inset-bottom, 0px) + 20px);
  }

  .ns-mobile-only {
    display: block !important;
  }

  .golden-path-mobile .ns-mobile-scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .golden-path-mobile .ns-mobile-scroll-x::-webkit-scrollbar {
    display: none;
  }

  .golden-path-mobile .btn,
  .golden-path-mobile button,
  .golden-path-mobile [role="button"],
  .golden-path-mobile .form-control,
  .golden-path-mobile .form-select,
  .golden-path-mobile input:not([type="checkbox"]):not([type="radio"]),
  .golden-path-mobile textarea {
    min-height: var(--ns-mobile-touch);
    border-radius: 14px;
  }

  .golden-path-mobile .btn,
  .golden-path-mobile button,
  .golden-path-mobile [role="button"] {
    font-size: 0.95rem;
    padding: 0.75rem 0.95rem;
  }

  .golden-path-mobile textarea {
    min-height: 96px;
  }

  .golden-path-mobile .row {
    --bs-gutter-x: 12px;
    --bs-gutter-y: 12px;
  }

  .golden-path-mobile .card,
  .golden-path-mobile .modal-content,
  .golden-path-mobile .dropdown-menu {
    border-radius: var(--ns-mobile-radius);
  }

  .golden-path-mobile .table-responsive,
  .golden-path-mobile pre,
  .golden-path-mobile code {
    -webkit-overflow-scrolling: touch;
  }

  .golden-path-mobile .modal-dialog {
    margin: 0;
    min-height: 100dvh;
  }

  .golden-path-mobile .modal-content {
    min-height: 100dvh;
    border-radius: 0;
  }

  /* Onboarding */
  .golden-path-mobile .gp-onboarding {
    padding-top: 8px;
  }

  .golden-path-mobile .gp-onboarding-header {
    margin-bottom: 12px;
    text-align: left;
  }

  .golden-path-mobile .gp-steps {
    display: grid;
    gap: 10px;
  }

  .golden-path-mobile .gp-step {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 10px;
    padding: 12px 14px;
    background: var(--ns-mobile-panel);
    border: 1px solid var(--ns-mobile-border);
    border-radius: var(--ns-mobile-radius);
  }

  .golden-path-mobile .gp-step-index {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.16);
    color: #c7d2fe;
    font-weight: 700;
  }

  .golden-path-mobile .gp-step-meta,
  .golden-path-mobile .gp-step .text-muted {
    display: none !important;
  }

  .golden-path-mobile .gp-step-title {
    font-size: 0.95rem;
    line-height: 1.3;
    color: var(--ns-mobile-text);
    margin: 0;
  }

  /* Create agent */
  .golden-path-mobile .gp-create-grid {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .golden-path-mobile .gp-create-card,
  .golden-path-mobile .gp-dashboard-card,
  .golden-path-mobile .gp-stat-card {
    border-radius: 18px;
    overflow: hidden;
  }

  .golden-path-mobile .gp-create-card .card-body,
  .golden-path-mobile .gp-dashboard-card .card-body,
  .golden-path-mobile .gp-stat-card .card-body {
    padding: 14px;
  }

  .golden-path-mobile .gp-create-card .card-title {
    font-size: 1rem;
    margin-bottom: 0.35rem;
  }

  .golden-path-mobile .gp-create-card .card-text {
    font-size: 0.88rem;
    color: var(--ns-mobile-muted);
  }

  .golden-path-mobile .gp-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Test drive chat */
  .golden-path-mobile .gp-testdrive {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .golden-path-mobile .gp-chat-shell {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-left: calc(var(--ns-mobile-page-pad) * -1);
    margin-right: calc(var(--ns-mobile-page-pad) * -1);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .golden-path-mobile .gp-chat-header {
    position: sticky;
    top: 0;
    z-index: 12;
    padding: 12px 14px;
    background: rgba(26, 26, 26, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--ns-mobile-border);
  }

  .golden-path-mobile .gp-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
    scroll-padding-bottom: 140px;
  }

  .golden-path-mobile .gp-chat-bubble {
    max-width: 92%;
    border-radius: 18px;
  }

  .golden-path-mobile .gp-chat-input-wrap {
    position: sticky;
    bottom: 0;
    z-index: 11;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.74), rgba(26, 26, 26, 0.96));
    border-top: 1px solid var(--ns-mobile-border);
    backdrop-filter: blur(14px);
  }

  .golden-path-mobile.has-mobile-action-bar .gp-chat-input-wrap,
  .golden-path-mobile .has-mobile-action-bar .gp-chat-input-wrap {
    bottom: calc(var(--ns-mobile-bar-height) + env(safe-area-inset-bottom, 0px));
  }

  .golden-path-mobile .gp-chat-composer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .golden-path-mobile .gp-chat-textarea {
    min-height: 44px;
    max-height: 124px;
    resize: none;
    line-height: 1.45;
    padding: 11px 14px;
  }

  /* Deploy */
  .golden-path-mobile .gp-deploy {
    display: grid;
    gap: 12px;
  }

  .golden-path-mobile .gp-code-toolbar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .golden-path-mobile .gp-code-toolbar::-webkit-scrollbar {
    display: none;
  }

  .golden-path-mobile .gp-code-block,
  .golden-path-mobile pre[class*="language-"],
  .golden-path-mobile pre.gp-code {
    max-height: 40dvh;
    overflow: auto;
    white-space: pre;
    font-size: 0.8rem;
    line-height: 1.45;
    padding: 14px;
    border-radius: 16px;
    background: #111827;
    border: 1px solid var(--ns-mobile-border);
  }

  .golden-path-mobile .gp-embed-frame,
  .golden-path-mobile .gp-deploy-preview {
    min-height: 220px;
    overflow: hidden;
    border-radius: 16px;
  }

  /* Dashboard */
  .golden-path-mobile .gp-dashboard-grid {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .golden-path-mobile .gp-dashboard-grid > * {
    min-width: 0;
  }

  .golden-path-mobile .gp-dashboard-card .gp-card-meta,
  .golden-path-mobile .gp-stat-card .gp-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Editor density */
  .golden-path-mobile.gp-mobile-editor,
  .golden-path-mobile .gp-mobile-editor {
    --bs-card-spacer-x: 12px;
    --bs-card-spacer-y: 12px;
  }

  .golden-path-mobile .gp-mobile-editor .agent-sub-card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    font-size: 1rem;
    line-height: 1.35;
  }

  .golden-path-mobile .gp-mobile-editor .ea-section-desc {
    display: block;
    font-size: 0.78rem;
    color: var(--ns-mobile-muted);
  }

  .golden-path-mobile .gp-mobile-editor .agent-sub-card-body {
    padding: 12px !important;
  }

  .golden-path-mobile .gp-mobile-editor .nav,
  .golden-path-mobile .gp-mobile-editor .nav-tabs,
  .golden-path-mobile .gp-mobile-editor .nav-pills {
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
  }

  .golden-path-mobile .gp-mobile-editor .nav-link {
    white-space: nowrap;
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
  }

  .golden-path-mobile .gp-mobile-editor .form-label {
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
  }

  .golden-path-mobile .gp-mobile-editor .input-group {
    flex-wrap: nowrap;
  }

  .golden-path-mobile .gp-mobile-editor .btn-group,
  .golden-path-mobile .gp-mobile-editor .gp-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .golden-path-mobile .gp-mobile-editor .CodeMirror,
  .golden-path-mobile .gp-mobile-editor .monaco-editor,
  .golden-path-mobile .gp-mobile-editor .ace_editor {
    min-height: 220px !important;
    font-size: 13px !important;
  }

  .golden-path-mobile .gp-mobile-editor .table-responsive {
    border-radius: 16px;
    overflow: auto;
  }

  .golden-path-mobile .ns-mobile-sticky-cta {
    position: sticky;
    bottom: calc(var(--ns-mobile-bar-height) + env(safe-area-inset-bottom, 0px) + 10px);
    z-index: 14;
  }
}

@media (min-width: 576px) {
  .ns-mobile-only {
    display: none !important;
  }
}
