
/* ==================================== */
/* MISSATGE DE CÀRREGA DE DADES          */
/* ==================================== */
.contenidorPreviewModal{
    position: fixed; 
	top:0px;
	left:0px;
	z-index:100;
	width:100%;
	height:100%;
	z-index:1000;
	/* background-color: rgba(0, 0, 0, 0.1); */
}

.loadingMsgDivModal{
	/* Centrat a la pantalla*/
	position: fixed;
	bottom: 0;
	right: 0;
	
	color: #FFF;
	font-size:1rem;
	font-weight:700;
	opacity:0.6;
	text-align:center;
	padding: 0 1rem; 	
	background:#FF5252;
	overflow: hidden;
	z-index:1000; /*Para este encima de cualquier otro objeto que pueda estar en la web*/
}



/* ========================================
 *                 FORMULARIS
 * ======================================== */
.midaContenidorInputPetit{width:calc(50% - 0.6rem);}



/* ========================================
 *                 MODAL
 * ======================================== */
.modalTitol{font-size:1.2rem;font-weight:700;width:100%;color:var(--main-color);}
.modalSubTitol{font-size:1rem;font-weight:300;width:100%;margin-top:1rem;color:var(--text-color);}


.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;

    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

/* Contenedor principal */
.modal {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1500px;
    max-height: 90vh;       /* límite de altura */
    overflow: hidden;       
    background: #fff;
    border-radius: 10px;
    margin: 0 2rem;
    padding: 3rem;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;

    min-height: 0;           /* necesario para Firefox */
}
.modal400PX{max-width:400px;}
.modal600PX{max-width:600px;}

.modal-header {
    display: flex;
    justify-content: space-between; /* Título a la izquierda, botón a la derecha */
    align-items: center;
    width: 100%;
}



/* Botón cerrar */
.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Bloque Scroll pagina principal */
.block-scroll {
    overflow: hidden !important;  /* bloquea scroll */
    height: 100%;                 /* asegura que el body no pueda desplazarse */
}


/* Scroll interno */
.modal-scroll {
    flex: 1 1 auto;          /* crece y permite scroll */
    overflow-y: auto;
    max-height: 100%;
    min-height: 0;           /* necesario para Firefox */
    padding: 1rem;
}

/* Scroll bonito */
.modal-scroll::-webkit-scrollbar {
    width: 8px;
}
.modal-scroll::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
}
.modal-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.3) transparent;
}

.modal-overlay.show .modal {
    transform: scale(1);
}

/* A partir de 700px → modal pegado abajo */
@media (max-width: 700px) {
    .modal {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0; 
        max-width: none;
        max-height: 90vh;
        min-width:300px;
        overflow-y: auto;      /* scroll en contenido largo */
        padding: 2rem 2rem;
        border-radius: 20px 20px 0 0;
        box-sizing: border-box;
        transform: translateY(100%);
    }
    .modal-overlay.show .modal {
        transform: translateY(0);
    }
    
    .modal400PX{max-width:100%;}
    .modal600PX{max-width:100%;min-height:60vh;}
    
     /* ========================================
     *                 FORMULARIS
     * ======================================== */
    .midaContenidorInputPetit{width:100%;}
}

  
 