/* =========================================================
   MPS MOBILE UI
   Header globale Tailz
   ========================================================= */


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

  /* ---------------------------------------------------------
     HEADER
     --------------------------------------------------------- */

  .mps-global-mobile-header {
    width: 100%;
    height: 54px;
    min-height: 54px;
    max-height: 54px;

    display: flex;
    align-items: center;

    margin: 0;
    padding: 1px 20px;

    box-sizing: border-box;

    background: #9C27B0; /* viola medio */

    position: relative;
    z-index: 9999;
  }


  /* ---------------------------------------------------------
     LOGO
     --------------------------------------------------------- */

  .mps-mobile-header-logo {
    display: flex;
    align-items: center;

    flex: 0 0 auto;

    margin: 0;
    padding: 0;

    text-decoration: none;
  }

  .mps-mobile-header-logo img {
    display: block;

    width: 100px;
    height: 52px;

    margin: 0;
    padding: 0;

    object-fit: contain;
  }


  /* ---------------------------------------------------------
     SPAZIO ELASTICO
     --------------------------------------------------------- */

  .mps-mobile-header-spacer {
    flex: 1 1 auto;
    min-width: 0;
  }


  /* ---------------------------------------------------------
     AZIONI DESTRA
     Info | Notifiche | [Ricerca futura] | Account
     --------------------------------------------------------- */

  .mps-mobile-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex: 0 0 auto;

    gap: 8px;

    margin: 0;
    padding: 0;
  }


  /* ---------------------------------------------------------
     INFO + NOTIFICHE
     --------------------------------------------------------- */

  .mps-mobile-header-action {
    width: 28px;
    height: 28px;
    min-width: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;
    box-shadow: none;

    appearance: none;
    -webkit-appearance: none;

    cursor: pointer;
  }

  .mps-mobile-header-action img {
    display: block;

    width: 26px;
    height: 26px;

    margin: 0;
    padding: 0;

    object-fit: contain;
  }


  /* ---------------------------------------------------------
     ACCOUNT — WRAPPER
     --------------------------------------------------------- */

  .mps-mobile-account-wrap {
    position: relative;

    width: 28px;
    height: 28px;
    min-width: 28px;

    flex: 0 0 28px;

    margin: 0;
    padding: 0;
  }


  /* ---------------------------------------------------------
     ACCOUNT — PULSANTE AVATAR
     --------------------------------------------------------- */

  .mps-mobile-account-toggle {
    width: 28px;
    height: 28px;
    min-width: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    box-shadow: none;

    appearance: none;
    -webkit-appearance: none;

    overflow: hidden;

    cursor: pointer;
  }


  /* ---------------------------------------------------------
     AVATAR UTENTE LOGGATO
     --------------------------------------------------------- */

  .mps-mobile-account-toggle img,
  .mps-mobile-account-toggle img.avatar,
  .mps-mobile-account-toggle .mps-mobile-header-avatar {
    display: block !important;

    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 50% !important;

    object-fit: cover !important;
  }


  /* ---------------------------------------------------------
     ACCOUNT NON LOGGATO
     --------------------------------------------------------- */

  .mps-mobile-header-account-link {
    width: 28px;
    height: 28px;
    min-width: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    text-decoration: none;
  }

  .mps-mobile-header-account-fallback {
    display: block;

    width: 26px;
    height: 26px;

    margin: 0;
    padding: 0;

    object-fit: contain;
  }


  /* ---------------------------------------------------------
     MENU ACCOUNT
     Per ora nascosto: verrà aperto via JS
     --------------------------------------------------------- */

  .mps-mobile-account-panel {
    display: none;

    position: absolute;

    top: 36px;
    right: 0;

    width: 210px;

    padding: 8px;

    box-sizing: border-box;

    background: #9C27B0; /* viola medio */

    border-radius: 16px;

    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);

    z-index: 10000;
  }


  /* Stato aperto */

  .mps-mobile-account-wrap.is-open .mps-mobile-account-panel {
    display: block;
  }


  /* ---------------------------------------------------------
     LISTA MENU ACCOUNT
     --------------------------------------------------------- */

  .mps-mobile-account-list,
  .mps-mobile-account-list li {
    list-style: none;

    margin: 0;
    padding: 0;
  }

  .mps-mobile-account-list li {
    margin: 2px 0;
  }

  .mps-mobile-account-list a {
    display: flex;
    align-items: center;

    width: 100%;

    padding: 8px 10px;

    box-sizing: border-box;

    border-radius: 12px;

    color: #FFFFFF; /* bianco */

    text-decoration: none;

    font-size: 14px;
    line-height: 1.2;
    font-weight: 500;

    transition: background-color .15s ease;
  }

  .mps-mobile-account-list a:hover,
  .mps-mobile-account-list a:focus {
    background: #A259FF; /* viola chiaro */
    color: #FFFFFF; /* bianco */
  }


  /* Separazione visiva Logout */

  .mps-mobile-account-logout {
    margin-top: 6px !important;
    padding-top: 6px !important;

    border-top: 1px solid rgba(255, 255, 255, .25);
  }

}

/* =========================================================
   BOTTOM BAR GLOBALE
   ========================================================= */

.mps-global-mobile-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  height: 54px;
  min-height: 54px;

  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;

  margin: 0;
  padding: 0;

  background: #9C27B0; /* viola medio */

  z-index: 9999;

  box-sizing: border-box;
}

.mps-mobile-bottom-item {
  height: 54px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0;
  padding: 0;

  border: 0;
  background: transparent;

  text-decoration: none;

  cursor: pointer;
}

.mps-mobile-bottom-item img {
  display: block;

  width: 26px;
  height: 26px;

  margin: 0;
  padding: 0;

  object-fit: contain;
}

.mps-mobile-bottom-photo {
  appearance: none;
  -webkit-appearance: none;
}

/* Spazio per non coprire il contenuto della pagina */
body {
  padding-bottom: 54px;
}

.mps-mobile-photo-wrap {
  position: relative;

  width: 100%;
  height: 54px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.mps-mobile-photo-toggle {
  width: 100%;
}

/* =========================================================
   PET SELECTOR — BOTTOM BAR
   ========================================================= */

.mps-mobile-pets-wrap {
  position: relative;

  width: 100%;
  height: 54px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.mps-mobile-pets-toggle {
  width: 100%;
}

.mps-mobile-pets-panel {
  display: none;

  position: absolute;
  right: 0;
  bottom: 62px;

  width: 260px;
  max-width: 85vw;

  padding: 10px;

  background: #9C27B0; /* viola medio */

  border-radius: 16px;

  box-shadow: 0 12px 28px rgba(0,0,0,.18);

  z-index: 10001;
}

.mps-mobile-pets-wrap.is-open .mps-mobile-pets-panel {
  display: block;
}

.mps-mobile-pets-list {
  display: flex;
  gap: 10px;

  overflow-x: auto;

  padding: 2px 0 10px;
}

.mps-mobile-pets-item {
  min-width: 58px;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 4px;

  color: #FFFFFF; /* bianco */
  text-decoration: none;

  font-size: 11px;
  font-weight: 600;
}

.mps-mobile-pets-item img,
.mps-mobile-pets-fallback {
  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  object-fit: cover;

  background: #FFFFFF; /* bianco */
}

.mps-mobile-pets-manage {
  display: block;

  padding: 8px 10px;

  border-radius: 10px;

  background: #A259FF; /* viola chiaro */

  color: #FFFFFF; /* bianco */
  text-align: center;
  text-decoration: none;

  font-size: 12px;
  font-weight: 700;
}

/* PET PICKER — UPLOAD FOTO */

.mps-mobile-photo-pet-list {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    width: 100%;
    max-width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    padding: 6px 2px 10px;

    -webkit-overflow-scrolling: touch;
}

.mps-mobile-photo-pet {
    flex: 0 0 auto;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    min-width: 58px;

    margin: 0;
    padding: 0;

    border: 0;
    background: transparent;

    cursor: pointer;
}

.mps-mobile-photo-pet img,
.mps-mobile-photo-pet-fallback {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    border-radius: 50%;
    object-fit: cover;
}

.mps-mobile-photo-pet > span:last-child {
    margin-top: 4px;

    font-size: 11px;
    line-height: 1.2;

    white-space: nowrap;
}

/* =========================================================
   FOTO RAPIDA — PANNELLO
   ========================================================= */

.mps-mobile-photo-panel {
    position: absolute;

    bottom: 64px;
    left: 50%;

    width: 290px;
    max-width: calc(100vw - 24px);

    padding: 14px;

    background: #FFFFFF; /* bianco */
    border: 1px solid rgba(156, 39, 176, .20);
    border-radius: 18px;

    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);

    transform: translateX(-50%);

    z-index: 10001;
}

/* TITOLO E PET */

.mps-mobile-photo-title {
    display: block;

    margin: 0 0 12px;

    padding: 7px 10px;

    background: #EAFBF4; /* verde menta molto chiaro */
    border-radius: 10px;

    color: #333333;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;

    text-align: center;
}

.mps-mobile-photo-pet {
    color: #333333;
}

.mps-mobile-photo-pet img,
.mps-mobile-photo-pet-fallback {
    border: 2px solid #EAFBF4; /* verde menta molto chiaro */
}

.mps-mobile-photo-back {
    margin-top: 10px;
    padding: 6px 8px;

    border: 0;
    background: transparent;

    color: #9C27B0; /* viola medio */
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

/* PICCOLO EFFETTO DI TRANSIZIONE */

.mps-mobile-photo-pets,
.mps-mobile-photo-uploaders {
    animation: mpsPhotoStepIn .18s ease-out;
}

@keyframes mpsPhotoStepIn {

    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* =========================================================
   AVATAR
   ========================================================= */
   
.mps-mobile-header-initial {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #A259FF; /* viola chiaro */
    color: #FFFFFF;      /* bianco */

    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

/* =========================================================
   TABLET / DESKTOP
   Mobile UI nascosta
   ========================================================= */

@media (min-width: 768px) {

  .mps-global-mobile-header,
  .mps-global-mobile-bottom-bar {
    display: none !important;
  }

}

