/*
 * RETROFIT.MX — navegación móvil de una mano
 * Se inyecta desde mobile-command-nav-v3.js para cubrir todas las páginas.
 */
.mobile-command-dock,
.mobile-app-launcher,
.mobile-command-backdrop,
.mobile-command-sheet {
  display: none;
}

@media (max-width: 860px) {
  :root {
    --mobile-command-safe: env(safe-area-inset-bottom, 0px);
    --mobile-command-panel: rgba(5, 16, 35, 0.97);
    --mobile-command-dock-bottom: calc(10px + var(--mobile-command-safe));
    --mobile-command-dock-height: 70px;
    --mobile-command-float-visible: calc(103px + var(--mobile-command-safe));
    --mobile-command-float-hidden: calc(18px + var(--mobile-command-safe));
  }

  body.has-mobile-command-nav {
    padding-bottom: calc(102px + var(--mobile-command-safe));
  }

  body.has-mobile-command-nav #navbar,
  body.has-mobile-command-nav .navbar {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    min-height: 70px;
    height: 70px;
    padding: 0 12px;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.has-mobile-command-nav #navbar .nav-container,
  body.has-mobile-command-nav .navbar .nav-container {
    position: relative;
    display: flex;
    justify-content: flex-start;
    width: 100%;
    height: 70px !important;
    min-height: 70px !important;
    padding-inline: 38px !important;
    align-items: center;
  }

  body.has-mobile-command-nav #navbar .logo,
  body.has-mobile-command-nav .navbar .logo,
  body.has-mobile-command-nav #navbar .nav-logo,
  body.has-mobile-command-nav .navbar .nav-logo {
    margin-inline: 0;
    min-height: 60px;
    justify-content: flex-start;
  }

  body.has-mobile-command-nav #navbar .nav-logo .brand-logo,
  body.has-mobile-command-nav .navbar .nav-logo .brand-logo {
    width: 218px !important;
    max-height: 45px !important;
  }

  body.has-mobile-command-nav #navLinks,
  body.has-mobile-command-nav #hamburger {
    display: none !important;
  }

  body.has-mobile-command-nav > nav:first-of-type {
    justify-content: flex-start;
  }

  body.has-mobile-command-nav > nav:first-of-type .nav-container {
    width: 100%;
    justify-content: flex-start;
    height: 70px !important;
    min-height: 70px !important;
    padding-inline: 38px !important;
    align-items: center;
  }

  body.has-mobile-command-nav > nav:first-of-type .nav-logo {
    margin-inline: 0;
    min-height: 60px;
    justify-content: flex-start;
  }

  body.has-mobile-command-nav > nav:first-of-type .nav-logo .brand-logo {
    width: 218px !important;
    max-height: 45px !important;
  }

  body.has-mobile-command-nav > nav:first-of-type .nav-back {
    display: none;
  }

  body.has-mobile-command-nav .whatsapp-btn {
    right: 15px !important;
    bottom: var(--mobile-command-float-visible) !important;
    width: 54px;
    height: 54px;
    z-index: 1880;
  }

  body.application-detail-page.has-mobile-command-nav .application-detail-sidebar.review-nav {
    display: none !important;
  }

  body.blog-page.article-page.has-mobile-command-nav .article-sidebar.review-nav {
    display: none !important;
  }

  .mobile-command-dock {
    position: fixed;
    top: auto;
    z-index: 1900;
    left: 12px;
    right: 12px;
    bottom: var(--mobile-command-dock-bottom);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    min-height: 70px;
    padding: 7px 7px 6px;
    border: 1px solid rgba(93, 169, 255, 0.28);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(9, 28, 57, 0.94), rgba(3, 12, 28, 0.97));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 34px rgba(14, 102, 255, 0.13);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease;
    will-change: transform;
  }

  .mobile-command-dock.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 26px));
  }

  .mobile-command-item {
    position: relative;
    appearance: none;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: #aabbd3;
    min-width: 0;
    min-height: 56px;
    padding: 7px 2px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font: 700 10px/1.05 "Inter", system-ui, sans-serif;
    letter-spacing: -0.01em;
    text-decoration: none;
    text-align: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-command-item svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-command-session-toast {
    position: fixed;
    z-index: 1950;
    left: 50%;
    bottom: calc(var(--mobile-command-float-visible) + 12px);
    width: min(calc(100vw - 32px), 380px);
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid rgba(255, 133, 82, 0.48);
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, rgba(214, 69, 35, 0.98), rgba(255, 105, 58, 0.98));
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
    font: 700 12px/1.3 "Inter", system-ui, sans-serif;
    transform: translateX(-50%);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .mobile-command-session-toast svg {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-command-session-toast.is-leaving {
    opacity: 0;
    transform: translate(-50%, 8px);
  }

  .mobile-command-item.has-session::after {
    content: "";
    position: absolute;
    top: 8px;
    right: calc(50% - 15px);
    width: 8px;
    height: 8px;
    border: 2px solid #07172d;
    border-radius: 50%;
    background: #ff693a;
    box-shadow: 0 0 0 2px rgba(255, 105, 58, 0.2);
  }

  .mobile-command-item:active,
  .mobile-command-item.is-active {
    color: #f5f9ff;
    background: rgba(31, 121, 255, 0.16);
  }

  .mobile-command-item:focus-visible,
  .mobile-app-launcher:focus-visible,
  .mobile-command-close:focus-visible,
  .mobile-command-app-link:focus-visible,
  .mobile-command-site-link:focus-visible,
  .mobile-command-site-action:focus-visible {
    outline: 2px solid #55b6ff;
    outline-offset: 2px;
  }

  .mobile-command-account-action:focus-visible {
    outline: 2px solid #55b6ff;
    outline-offset: 2px;
  }

  .mobile-app-launcher {
    position: fixed;
    z-index: 1881;
    right: 77px;
    bottom: var(--mobile-command-float-visible);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: calc(100vw - 104px);
    box-sizing: border-box;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid rgba(91, 173, 255, 0.34);
    border-radius: 27px;
    color: #eef7ff;
    background: linear-gradient(135deg, rgba(7, 28, 59, 0.95), rgba(6, 17, 38, 0.97));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 24px rgba(13, 105, 255, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: bottom 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  body.mobile-command-dock-hidden .whatsapp-btn,
  body.mobile-command-dock-hidden .mobile-app-launcher {
    bottom: var(--mobile-command-float-hidden) !important;
  }

  .mobile-app-launcher-copy {
    display: block;
    white-space: nowrap;
    font: 800 12px/1 "Inter", system-ui, sans-serif;
  }

  .mobile-blog-launcher {
    min-width: 154px;
  }

  .mobile-command-backdrop {
    position: fixed;
    z-index: 2050;
    inset: 0;
    display: block;
    visibility: hidden;
    opacity: 0;
    border: 0;
    background: rgba(0, 5, 15, 0.72);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    transition: opacity 220ms ease, visibility 220ms ease;
  }

  .mobile-command-backdrop.is-open {
    visibility: visible;
    opacity: 1;
  }

  .mobile-command-sheet {
    position: fixed;
    z-index: 2100;
    left: 10px;
    right: 10px;
    bottom: calc(92px + var(--mobile-command-safe));
    display: block;
    visibility: hidden;
    opacity: 0;
    transform: translateY(28px) scale(0.985);
    transform-origin: bottom center;
    max-height: min(calc(100dvh - 112px), 760px);
    overflow: hidden;
    border: 1px solid rgba(68, 155, 255, 0.42);
    border-radius: 26px;
    background:
      radial-gradient(circle at 82% 0%, rgba(21, 102, 226, 0.23), transparent 38%),
      var(--mobile-command-panel);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.68), 0 0 55px rgba(13, 111, 255, 0.14);
    transition: opacity 220ms ease, transform 260ms cubic-bezier(0.2, 0.9, 0.2, 1), visibility 220ms ease;
  }

  .mobile-command-sheet.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  .mobile-command-sheet-head {
    min-height: 72px;
    padding: 17px 18px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid rgba(116, 164, 222, 0.14);
  }

  .mobile-command-sheet-title {
    display: flex;
    align-items: center;
    gap: 11px;
  }

  .mobile-command-sheet-title img {
    width: 28px;
    height: 28px;
  }

  .mobile-command-sheet-title strong {
    display: block;
    color: #f7fbff;
    font: 900 17px/1.1 "Inter", system-ui, sans-serif;
  }

  .mobile-command-sheet-title small {
    display: block;
    margin-top: 3px;
    color: #89a9cf;
    font: 600 10px/1.2 "Inter", system-ui, sans-serif;
  }

  .mobile-command-close {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border: 1px solid rgba(130, 174, 225, 0.2);
    border-radius: 14px;
    color: #d7e6f8;
    background: rgba(255, 255, 255, 0.04);
    font-size: 24px;
    line-height: 1;
  }

  .mobile-command-sheet-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-command-header-back {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    appearance: none;
    border: 1px solid rgba(130, 174, 225, 0.2);
    border-radius: 14px;
    color: #cfe7ff;
    background: rgba(255, 255, 255, 0.04);
    font: 800 21px/1 "Inter", system-ui, sans-serif;
  }

  .mobile-command-header-back[hidden] {
    display: none !important;
  }

  .mobile-command-sheet-content {
    max-height: calc(min(calc(100dvh - 112px), 760px) - 72px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px;
    scrollbar-width: thin;
    scrollbar-color: #2775d8 transparent;
  }

  .mobile-command-app-grid,
  .mobile-command-site-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .mobile-command-sheet [hidden] {
    display: none !important;
  }

  .mobile-command-app-link,
  .mobile-command-site-link,
  .mobile-command-site-action {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(86, 151, 231, 0.14);
    border-radius: 15px;
    color: #dfeafa;
    background: rgba(15, 43, 78, 0.44);
    font: 750 12px/1.25 "Inter", system-ui, sans-serif;
    text-decoration: none;
    text-align: left;
    touch-action: manipulation;
  }

  .mobile-command-app-link::before {
    content: attr(data-number);
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    flex: 0 0 27px;
    border-radius: 9px;
    color: #7bc9ff;
    background: rgba(23, 116, 235, 0.18);
    font: 800 9px/1 "Inter", system-ui, sans-serif;
  }

  .mobile-command-app-link.is-current {
    border-color: rgba(48, 145, 255, 0.58);
    color: #fff;
    background: linear-gradient(135deg, rgba(23, 96, 202, 0.34), rgba(11, 54, 114, 0.52));
  }

  .mobile-command-app-grid {
    gap: 5px;
  }

  .mobile-command-app-link {
    min-height: 46px;
    padding-block: 7px;
  }

  .mobile-command-site-link svg,
  .mobile-command-site-action svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    fill: none;
    stroke: #65b9ff;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-command-site-action {
    width: 100%;
    appearance: none;
  }

  .mobile-command-account {
    overflow: hidden;
    border: 1px solid rgba(88, 151, 232, 0.34);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(15, 55, 105, 0.76), rgba(5, 23, 48, 0.92));
  }

  .mobile-command-account-head {
    padding: 14px;
  }

  .mobile-command-account-head small,
  .mobile-command-account-head strong,
  .mobile-command-account-head span {
    display: block;
  }

  .mobile-command-account-head small {
    color: #75c6ff;
    font: 750 10px/1.2 "Inter", system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .mobile-command-account-head strong {
    margin-top: 4px;
    overflow-wrap: anywhere;
    color: #fff;
    font: 850 15px/1.2 "Inter", system-ui, sans-serif;
  }

  .mobile-command-account-head span {
    margin-top: 3px;
    overflow-wrap: anywhere;
    color: #aec6e3;
    font: 600 11px/1.25 "Inter", system-ui, sans-serif;
  }

  .mobile-command-account-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .mobile-command-account-action {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px;
    border: 1px solid rgba(101, 185, 255, 0.56);
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #146ee8, #09a9d4);
    box-shadow: 0 8px 18px rgba(11, 100, 210, 0.2);
    font: 750 11px/1.2 "Inter", system-ui, sans-serif;
    text-align: center;
    text-decoration: none;
    touch-action: manipulation;
  }

  .mobile-command-account-action svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-command-account-action:active {
    background: linear-gradient(135deg, #0f5ec9, #078daf);
  }

  .mobile-command-site-action--contact {
    border-color: rgba(255, 109, 55, 0.48);
    color: #fff;
    background: linear-gradient(135deg, #ff693a, #f04f2c);
  }

  .mobile-command-site-action--contact svg {
    stroke: #fff;
  }

  @media (max-width: 390px) {
    .mobile-command-dock {
      left: 7px;
      right: 7px;
    }

    .mobile-command-item {
      font-size: 9px;
    }

    .mobile-app-launcher-copy {
      font-size: 10px;
    }
  }
}

@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .mobile-command-sheet,
  .mobile-command-backdrop,
  .mobile-command-dock,
  .mobile-command-session-toast,
  .mobile-app-launcher,
  body.has-mobile-command-nav .whatsapp-btn {
    transition-duration: 1ms;
  }
}

/* 2026-07-17 final mobile nav polish */
@media (max-width: 860px) {
  body.mobile-command-lock {
    overflow: hidden;
    touch-action: none;
  }

  .nav-container {
    min-height: 50px;
  }

  .nav-logo img,
  .brand-logo {
    width: 166px;
    max-height: 34px;
  }

  .mobile-command-dock {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .mobile-command-item {
    min-width: 0;
    font: 780 11.5px/1.05 "Inter", system-ui, sans-serif;
    letter-spacing: -0.01em;
  }

  .mobile-command-item svg {
    width: 21px;
    height: 21px;
  }

  .mobile-command-item.is-active {
    color: #fff;
  }

  .mobile-command-item.is-active svg {
    stroke: #ffffff;
  }

  .mobile-app-launcher {
    right: 77px;
    bottom: var(--mobile-command-float-visible);
    min-width: 126px;
    min-height: 48px;
    padding: 0 16px;
    justify-content: center;
  }

  .mobile-blog-launcher {
    min-width: 154px;
  }

  .mobile-app-launcher-orb,
  .mobile-app-launcher-copy small {
    display: none !important;
  }

  .mobile-app-launcher-copy {
    font: 850 13px/1 "Inter", system-ui, sans-serif;
    letter-spacing: -0.01em;
  }

  .mobile-command-site-action--whatsapp {
    border-color: rgba(37, 211, 102, 0.5);
    color: #fff;
    background: linear-gradient(135deg, #25d366, #128c7e);
  }

  .mobile-command-site-action--whatsapp svg {
    stroke: #fff;
  }

  .mobile-command-portal-panel h3 {
    margin: 0 0 8px;
    color: #f4f8ff;
    font: 900 18px/1.1 "Inter", system-ui, sans-serif;
  }

  .mobile-portal-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
  }

  .mobile-portal-form input {
    width: 100%;
    border: 1px solid rgba(88, 151, 232, 0.28);
    border-radius: 13px;
    background: rgba(3, 14, 30, 0.82);
    color: #fff;
    padding: 12px 13px;
    font: 700 13px/1.2 "Inter", system-ui, sans-serif;
  }

  .mobile-portal-form button {
    border: 0;
    border-radius: 14px;
    padding: 12px 14px;
    color: #fff;
    background: linear-gradient(135deg, #1f65ff, #00a8ff);
    font: 900 13px/1 "Inter", system-ui, sans-serif;
  }

  @media (max-width: 390px) {
    .mobile-command-item {
      font-size: 10px;
    }

    .mobile-app-launcher-copy {
      font-size: 12px;
    }
  }
}
