/* ============================================================
   PATYTA PRO · MOBILE NAV PREMIUM R2
   ============================================================ */

.pro-mobile-premium-r2,
.pro-mobile-top-r2{
  display:none;
}

@media(max-width:600px){

  :root{
    --pmr2-navy:#052F5E;
    --pmr2-sky:#ACDCF2;
    --pmr2-bg:#F7F9FB;
    --pmr2-line:rgba(5,47,94,.08);
  }

  /*
   * Ocultamos visualmente el nav anterior,
   * PERO permanece en DOM porque su botón Más
   * sigue controlando el drawer existente.
   */
  [data-pro-mobile-nav]{
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transform:translateY(120%)!important;
  }

  /*
   * Más espacio arriba y abajo sólo en app autenticada móvil.
   */
  body:has(.x-app) .x-main{
    padding-top:76px!important;
    padding-bottom:calc(100px + env(safe-area-inset-bottom))!important;
  }

  /* =========================================================
     TOP BAR — ligera tipo app social
     ========================================================= */

  .pro-mobile-top-r2{
    position:fixed;
    z-index:86;

    top:0;
    left:0;
    right:0;

    height:64px;

    padding:
      calc(8px + env(safe-area-inset-top))
      18px
      8px;

    display:flex;
    align-items:center;
    justify-content:space-between;

    background:rgba(247,249,251,.90);

    border-bottom:1px solid var(--pmr2-line);

    backdrop-filter:blur(18px) saturate(145%);
    -webkit-backdrop-filter:blur(18px) saturate(145%);
  }

  .pro-mobile-top-r2__brand{
    width:38px;
    height:38px;

    display:block;

    border-radius:50%;
    overflow:hidden;

    text-decoration:none;
  }

  .pro-mobile-top-r2__brand img{
    width:100%;
    height:100%;
    display:block;
    object-fit:contain;
  }

  .pro-mobile-top-r2__actions{
    display:flex;
    align-items:center;
    gap:19px;
  }

  .pro-mobile-top-r2__action{
    position:relative;

    width:32px;
    height:38px;

    padding:0;

    display:grid;
    place-items:center;

    border:0;
    background:transparent;
    color:var(--pmr2-navy);

    text-decoration:none;
    cursor:pointer;

    -webkit-tap-highlight-color:transparent;
  }

  .pro-mobile-top-r2__action svg{
    width:25px;
    height:25px;

    display:block;

    fill:none;
    stroke:currentColor;
    stroke-width:1.75;
    stroke-linecap:round;
    stroke-linejoin:round;
  }

  .pro-mobile-top-r2__action:active{
    transform:scale(.92);
  }

  .pro-mobile-top-r2__badge{
    position:absolute;

    top:1px;
    right:-2px;

    min-width:16px;
    height:16px;

    padding:0 4px;

    display:none;
    align-items:center;
    justify-content:center;

    border:2px solid var(--pmr2-bg);
    border-radius:999px;

    background:#BA2D63;
    color:#FFFFFF;

    font-family:"Poppins",sans-serif;
    font-size:8px;
    line-height:1;
    font-weight:600;
  }

  .pro-mobile-top-r2__badge.is-visible{
    display:flex;
  }

  /* =========================================================
     BOTTOM NAV
     Pegada al bottom, sin tarjeta flotante.
     ========================================================= */

  .pro-mobile-premium-r2{
    position:fixed;
    z-index:90;

    left:0;
    right:0;
    bottom:0;

    min-height:76px;

    padding:
      8px
      12px
      calc(8px + env(safe-area-inset-bottom));

    display:grid;
    grid-template-columns:
      minmax(0,1fr)
      minmax(0,1fr)
      72px
      minmax(0,1fr)
      minmax(0,1fr);

    align-items:end;

    background:rgba(255,255,255,.97);

    border-top:1px solid var(--pmr2-line);

    box-shadow:
      0 -8px 30px rgba(5,47,94,.045);

    backdrop-filter:blur(22px) saturate(150%);
    -webkit-backdrop-filter:blur(22px) saturate(150%);
  }

  .pro-mobile-premium-r2__item{
    position:relative;

    min-width:0;
    height:58px;

    padding:5px 1px 2px;

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;

    border:0;
    background:transparent;

    color:#6E7E8D;

    text-decoration:none;

    font-family:"Poppins",sans-serif;

    cursor:pointer;

    -webkit-tap-highlight-color:transparent;
  }

  .pro-mobile-premium-r2__item svg{
    width:23px;
    height:23px;

    display:block;

    fill:none;
    stroke:currentColor;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
  }

  .pro-mobile-premium-r2__item span{
    max-width:100%;

    display:block;

    font-size:9.5px;
    line-height:1.1;
    font-weight:500;

    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .pro-mobile-premium-r2__item.is-active{
    color:var(--pmr2-navy);
  }

  .pro-mobile-premium-r2__item.is-active::before{
    content:"";

    position:absolute;
    top:1px;

    width:4px;
    height:4px;

    border-radius:50%;

    background:var(--pmr2-sky);
  }

  .pro-mobile-premium-r2__item:active{
    transform:scale(.94);
  }

  /* =========================================================
     CTA CENTRAL — Nueva cita
     ========================================================= */

  .pro-mobile-premium-r2__create{
    position:relative;

    width:64px;
    height:64px;

    align-self:start;

    margin-top:-23px;

    display:grid;
    place-items:center;

    border:5px solid #FFFFFF;
    border-radius:50%;

    background:var(--pmr2-navy);
    color:var(--pmr2-sky);

    box-shadow:
      0 10px 24px rgba(5,47,94,.22);

    cursor:pointer;

    -webkit-tap-highlight-color:transparent;

    transition:
      transform .16s ease,
      box-shadow .16s ease;
  }

  .pro-mobile-premium-r2__create svg{
    width:29px;
    height:29px;

    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
  }

  .pro-mobile-premium-r2__create::after{
    content:"Nueva cita";

    position:absolute;

    top:calc(100% + 4px);
    left:50%;

    transform:translateX(-50%);

    min-width:max-content;

    color:var(--pmr2-navy);

    font-family:"Poppins",sans-serif;
    font-size:9px;
    line-height:1;
    font-weight:600;
  }

  .pro-mobile-premium-r2__create:active{
    transform:scale(.93);
    box-shadow:
      0 6px 16px rgba(5,47,94,.18);
  }

  /* Drawer existente por encima del nuevo nav */
  [data-pro-mobile-drawer]{
    z-index:110!important;
  }

  /* Evitar que botones flotantes de páginas queden tapados */
  .x-main{
    min-height:100svh;
  }
}

@media(max-width:370px){
  .pro-mobile-premium-r2{
    grid-template-columns:
      minmax(0,1fr)
      minmax(0,1fr)
      66px
      minmax(0,1fr)
      minmax(0,1fr);
  }

  .pro-mobile-premium-r2__create{
    width:58px;
    height:58px;
  }

  .pro-mobile-premium-r2__item span{
    font-size:8.7px;
  }
}

@media(prefers-reduced-motion:reduce){
  .pro-mobile-premium-r2__item,
  .pro-mobile-premium-r2__create,
  .pro-mobile-top-r2__action{
    transition:none!important;
  }
}
