  <style>
    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background: #f0f2f5;
      margin: 0;
      padding: 0;
    }
    #chatbot-container {
      width: 360px;
      height: 500px;
      position: fixed;
      bottom: 90px;
      right: 20px;
      background: #ffffff;
      border-radius: 20px;
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      font-size: 14px;
      cursor: default;
      opacity: 0; /* Start invisible */
      transform: scale(0); /* Start scaled down */
      transition: all 0.5s ease; /* Smooth transition for all properties */
    }
    #chatbot-header {
      background: #003366;
      color: white;
      padding: 10px 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: relative;
    }
    #header-controls {
      display: flex;
      align-items: center;
      gap: 2px; /* Space between buttons */
    }
   .header-btn {
      background: transparent;
      border: none;
      font-size: 20px;
      cursor: pointer;
      position: relative;
      padding: 0px;
      margin: 0;
    }
    .header-btn:first-child {
      margin-right: 2px;
    }
    .header-btn:hover {
      background-color: rgba(255, 255, 255, 0.2); /* Light hover effect */
    }
    #chatbot-header img {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      margin: 0 4px;
      object-fit: contain;	/* Evita que la imagen se corte y se adapta sin deformarse */
    }
    #chatbot-header span {
      font-size: 1.1em;
      font-weight: 600;
      flex-grow: 1;
    }
    #menu-btn {
      background: transparent;
      border: none;
      color: white;
      font-size: 20px;
      cursor: pointer;
    }
    #menu-dropdown {
      position: absolute;
      top: 50px;
      right: 10px;
      background: white;
      border-radius: 10px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      display: none;
      flex-direction: column;
      z-index: 10;
      min-width: 200px;
    }
    #menu-dropdown button {
      padding: 10px;
      background: none;
      border: none;
      text-align: left;
      width: 100%;
      cursor: pointer;
      font-size: 14px;
    }
    #menu-dropdown button:hover {
      background: #f0f0f0;
    }
    #chatbot-messages {
      flex-grow: 1;
      overflow-y: auto;
      padding: 12px;
      background: #f4f4f8;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .message {
      padding: 10px 12px;
      border-radius: 16px;
      max-width: 80%;
      word-wrap: break-word;
      line-height: 1.4;
    }
    .user {
      background: #003366;
      color: white;
      align-self: flex-end;
      border-bottom-right-radius: 4px;
    }
    .bot {
      background: #e5e5ea;
      color: black;
      align-self: flex-start;
      border-bottom-left-radius: 4px;
    }
    .timestamp {
      font-size: 10px;
      color: gray;
      text-align: right;
    }
    #chatbot-footer {
      display: flex;
      padding: 10px;
      background: white;
      border-top: 1px solid #ddd;
    }
    #chatInput {
      flex: 1;
      padding: 8px;
      border: 1px solid #ccc;
      border-radius: 12px;
      outline: none;
    }
    #sendBtn {
      margin-left: 8px;
      background: #003366;
      color: white;
      border: none;
      padding: 8px 12px;
      border-radius: 12px;
      cursor: pointer;
    }

    #chat-toggle-btn {
      position: fixed;
      bottom: 20px;
      right: 20px;
      width: 80px;
      height: 80px;
      background: white;
      border: none;
      border-radius: 50%;
      box-shadow: 0 2px 5px rgba(0,0,0,0.2);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      overflow: hidden;
      padding: 0;
    }    
    #chat-toggle-btn img#chat-avatar {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
    }    
    #chat-close-icon {
      display: none;
      font-size: 24px;
    }    
    #chat-toggle-btn.open #chat-avatar {
      display: none;
    }    
    #chat-toggle-btn.open #chat-close-icon {
      display: block;
    }    
    #chat-notification {
      position: absolute;
      top: -5px;
      right: -5px;
      background: red;
      color: white;
      border-radius: 50%;
      padding: 2px 6px;
      font-size: 12px;
      display: inline;
    }

    .dark-mode {
      background: #121212 !important;
      color: #e0e0e0 !important;
    }
    .dark-mode #chatbot-messages {
      background: #1e1e1e;
    }
    .dark-mode .bot {
      background: #333;
    }
    /* Resize handle */
    #resize-handle {
      width: 12px;
      height: 12px;
      background: #003366;
      position: absolute;
      top: 0;
      left: 0;
      cursor: nw-resize;
    }

    /* Tooltip styling */
    .tooltip {
      visibility: hidden;
      background-color: #333;
      color: #fff;
      text-align: center;
      border-radius: 4px;
      padding: 5px;
      position: absolute;
      z-index: 1;
      bottom: 125%; /* Position above the button */
      left: 50%;
      margin-left: -60px;
      opacity: 0;
      transition: opacity 0.3s;
    }
    .header-btn:hover .tooltip {
      visibility: visible;
      opacity: 1;
    }	

    /* Estilo para el fondo del modal */
    #modalPolitica {
      position: fixed; /* El modal debe estar en una capa superior */
      top: 50%;  /* Centrado verticalmente */
      left: 50%; /* Centrado horizontalmente */
      transform: translate(-50%, -50%); /* Ajuste para centrado exacto */
      background-color: rgba(0, 0, 0, 0.7); /* Fondo semitransparente */
      width: 80%;  /* Ancho del modal */
      max-width: 800px; /* Ancho máximo del modal */
      height: 60%; /* Altura del modal */
      max-height: 80%; /* Altura máxima del modal */
      display: none; /* Inicialmente oculto */
      justify-content: center;
      align-items: center;
      z-index: 9999; /* Asegura que el modal esté por encima de todo */
      overflow-y: auto; /* Habilitar desplazamiento si el contenido es muy largo */
      padding: 20px;
    }
    /* Estilo para el contenido del modal */
    #modalContent {
      background-color: white; /* Fondo blanco */
      padding: 20px;
      border-radius: 8px;
      width: 100%;
      height: 100%;
      position: relative;
      overflow-y: auto; /* Permitir desplazamiento en el contenido si es necesario */
      box-sizing: border-box; /* Asegurarse de que el padding no cambie las dimensiones */
    }
    /* Estilo para el botón de cerrar */
    #closeModal {
      background-color: red;
      color: white;
      border: none;
      padding: 5px 10px;
      cursor: pointer;
      position: absolute;
      top: 10px;
      right: 10px;
      border-radius: 50%;
      font-size: 18px;
    }
    /* Estilo para el texto dentro del modal */
    #politicaTexto {
      font-size: 16px;
      line-height: 1.6;
      margin-top: 20px;
    }

    /* Estilo para la encuesta */
    .feedback-container {
    	margin-top: 10px;
    	text-align: center;
    }
    .feedback-button {
    	margin: 0 5px;
    	font-size: 24px;
    	padding: 5px 10px;
    	cursor: pointer;
    	background: transparent;
    	border: none;
    }
    .feedback-button:hover {
	transform: scale(1.2);
    }

  </style>
