.media-selector{
    border: none;
    border-bottom: solid 1px rgba(221, 224, 227, 1);
    background: none;
    color: rgba(221, 224, 227, 1);
    font-family: Montserrat;
    font-size: 15px;
}
.media-selector.active{
    color: rgba(127, 119, 186, 1)!important;
    border-color: rgba(127, 119, 186, 1)!important;
}
.media-image{
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
#media-container > .row:first-of-type > .col:nth-of-type(1) > .image-wrapper,
#media-container > .row:first-of-type > .col:nth-of-type(1) > .image-wrapper img {
    border-radius: 10px 0 0 0;
}
#media-container > .row:first-of-type > .col:nth-of-type(3) > .image-wrapper,
#media-container > .row:first-of-type > .col:nth-of-type(3) > .image-wrapper img {
    border-radius: 0 10px 0 0;
}
.media-preview{
    background-color: black;
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99;
    align-items: center;
    display: flex;
}
.media-preview img{
    width: 100%;
    touch-action: none;  /* necessario per gestire pinch su mobile */
    transition: transform 0.1s ease;
    cursor: grab;
}
@media (min-width: 1024px) {
    .media-preview img{
        width: 100%;
        height: 100%;
        object-fit: contain;
        touch-action: none;  /* necessario per gestire pinch su mobile */
        transition: transform 0.1s ease;
        cursor: grab;
    }
}
.media-preview .close-preview{
    position: absolute;  /* Fisso rispetto alla finestra */
    top: 10px;
    left: 10px;     /* distanza dal bordo sinistro */
    z-index: 9999;    /* sempre sopra gli altri elementi */
    border: none;
    background: none;
    color: white;
    font-size: 20px;
}
.chat-name{
    font-family: Montserrat;
    font-weight: 600;
    font-style: SemiBold;
    font-size: 16px;
    leading-trim: NONE;
    line-height: 30px;
    letter-spacing: 0px;
    color: rgba(74, 67, 129, 1);
}


/*  */
.image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;       /* mantiene la larghezza della colonna */
    height: 100%;
    padding-bottom: 100%; /* mantiene proporzioni quadrate, puoi regolare */
    background: #f5f5f5;  /* colore di sfondo mentre carica */
  }
  
  /* L'immagine dentro il wrapper */
  .media-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;  /* o 'contain' se vuoi mostrare tutta l'immagine */
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  /* Spinner centrato */
  .image-wrapper::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border: 3px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%); /* perfetto centraggio verticale e orizzontale */
    z-index: 2;
  }
  
  /* Quando l'immagine è caricata, nasconde il loader */
  .image-loaded::before {
    display: none;
  }
  
  @keyframes spin {
    to {
      transform: translate(-50%, -50%) rotate(360deg);
    }
  }
  