/* 基本页面布局和样式 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');


:root {
    --background-color: #D5DEEF;  /* Fondo general */
    --background-color-secondary: #B1C9EF;  /* Fondo general */
    --text-color: #3B3B3B;           /* Color del texto */
    --button-color: #395886;		/* Color de los botones */
    --button-color-secondary: #628ECB;
  }
  

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.container {
    background-color: white;
    width: 90%;
    padding: 0 20px 20px 20px;
    border-radius: 33px;
    /*box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);*/
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color) !important;
}

.profile-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
	gap: 20px;
}


.usuario-title {
    font-size: 2rem;
    color: var(--button-color);
    margin: 1rem;
    text-align: left;
}

h2 {
    font-size: 2em;
    color: var(--button-color);
}


.info-personal {
    width: 50%;
    background-color: white;
    padding: 20px;
    border-radius: 33px;
    margin-right: 20px;
    min-width: 30%;
    text-align: left;
    border: 1px solid lightgray;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.info-personal .headerPerfil {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10px;
}



.info-personal, .sensors {
    background-color: white;
    padding: 20px;
    border-radius: 33px;
    width: 48%;
    text-align: left;
    border: 1px solid var lightgray;
}

.info-personal h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    padding: 5px 10px;
    align-self: center;
    text-align: center;
}

button {
    background-color: var(--button-color);
    border: 2px solid var(--button-color);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    /*margin-left: 0;*/
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
    cursor: pointer;
    border-radius: 33px;
    align-self: flex-end;
    font-family: 'Montserrat', sans-serif;
}

button:hover {
    background-color: white;
    border: 2px solid var(--button-color);
    color: var(--text-color);
}
button:disabled {
    background-color: #cccccc; /* Color gris claro */
    color: #666666; /* Color de texto gris oscuro */
    cursor: not-allowed; /* Cambiar el cursor a no permitido */
    opacity: 0.6; /* Reducir opacidad */
}


.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.info-item {
    margin-bottom: 30px;
}

.info-item p {
    margin-bottom: 5px;
}

.info-item  a{
    color: var(--button-color);
    font-size: .8rem;
    text-decoration: underline;
    margin-top: 1rem;
	    line-height: 1.2; /* Ajusta la altura de línea */
    text-align:right;
	/*padding-bottom: 4px;*/
	
}

.sensors {
    min-width: 30%;
    background-color: white;
    padding: 20px;
    border-radius: 33px;
    text-align: center;
    border: 1px solid lightgray;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sensors h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 10px;
    text-align: center;

    padding: 5px 10px;
    align-self: center;
}

.sensor-info p {
    /*background-color: #eeeeee;*/
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 33px;
    text-align: left;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.pagination button {
    background-color: var(--button-color);
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 33px;
}

.pagination span {
    font-size: 16px;
}

/* 弹出框样式 */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}



.popup-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 550px; /* Limita el ancho máximo */
}

.popup-content p {
	margin: 10px;
}

/*.popup-content button {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 10px;
    cursor: pointer;
    border-radius: 5px;
}*/

/* 固定header和footer */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: white;
}


footer {
    color: #fff;
    padding: 15px 20px;
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.1);
}
#contenedorEditBtn{
    display: flex;
    width: 100%;
}
#editBtn{
    align-self: flex-end;
    margin-left: auto;
    margin-right: 5px;
    width: 100%;
}

/* 用户头像样式 */

/* Media query para pantallas menores a 900px */
@media (max-width: 900px) {
    .container{
		/*margin-top: 400px;*/
        margin-top: 55rem; /* Quitar el margen superior */
        padding-bottom: 7rem;
	}
    .profile-section {
        flex-direction: column;
        align-items: center;
    }
  
    .info-personal,
    .sensors {
        width: 100%;
        margin: 10px 0;
    }
  
    .info-grid {
        grid-template-columns: 1fr;
    }
  
	 /* Posicionar el botón debajo del campo de correo electrónico */
    .headerPerfil {
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
    }

    
    .editBtn{
        align-self: flex-end;
        width: 100%;
        margin-top: 10px;
        margin-right: 5px;
    }
	
    

   /* .sensors{
       padding-bottom: 10rem;
    }*/
}



input {
    width: 100%;
    padding: 10px;
    border-radius: 33px;
    border: 1px solid lightgray;
    background-color: #eee;
    outline: none;
    font-size: 1em;
    font-family: 'Montserrat', sans-serif;
}

input:disabled {
    background-color: #f5f5f5;
    color: gray;
    cursor: not-allowed;
    
}


/*-------- POPUP ------*/
/* Popup */
.popup2 {
    display: none; /* Inicialmente está oculto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo semitransparente */
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Asegura que el popup esté por encima de otros elementos */
}

.popup-content2 {
    background-color: white;
    padding: 1rem;
    border-radius: 20px; /* Ajusta el borde redondeado */
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2); /* Sombra más pronunciada */
    opacity: 1;
    visibility: visible; /* Inicialmente visible */
    transition: opacity 0.4s ease, visibility 0.4s ease; /* Desvanecimiento y visibilidad suave */
    width: 100%;
    max-width: 550px; /* Limita el ancho máximo */
}

.popup-content2 h3 {
	margin: .5rem, auto;
	padding-top: 1rem;
}

.popup-content2 p {
	margin: 1rem auto;
}

/* Estilos de los botones */
.popup-content2 button {
    background-color: var(--button-color, #395886); /* Usa color de botón predeterminado */
    color: white;
    padding: 10px 20px;
    margin: 10px;
    cursor: pointer;
    border-radius: 20px; /* Ajuste de borde redondeado */
    border: 2px solid var(--button-color, #395886);    
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Cambio al pasar el cursor sobre los botones */
.popup-content2 button:hover {
    background-color: white;
    color: var(--button-color, #395886);
}

/* Campo de teléfono que se muestra de forma suave */
#phone-container {
    display: none; /* Inicialmente oculto */
    opacity: 0;
    visibility: hidden; /* Oculto inicialmente */
    text-align: center;
    margin-top: 20px;
    transition: opacity 0.4s ease, visibility 0.4s ease; /* Transición suave */
}

#phone-container.show {
    display: block; /* Hace que el campo de teléfono sea visible */
    opacity: 1; /* Haciendo el campo de teléfono visible gradualmente */
    visibility: visible; /* Haciendo visible el campo de teléfono */
}

/* Estilo para los párrafos dentro del contenedor */
#phone-container p {
    padding: 0 10px 10px 10px;
}

/* Estilos para el campo de entrada */
.input {
    background-color: #eee;
    border: none;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 20px; /* Ajuste de borde redondeado */
    max-width: 65%; /* Mejora la adaptabilidad */
    outline: none;
    width: 100%;
    box-sizing: border-box;
	margin-bottom: .5rem;
}