/**
 * Estilos para el área pública
 */

.corus-twilio-contact-form-container {
  max-width: 800px; /* Ajusta según sea necesario */
  margin: 0 auto;
  padding: 20px;
  background-color: #f9f9f9; /* Color de fondo claro */
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Sombra suave */
}

.corus-twilio-contact-form-container h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
}

.corus-twilio-form-field {
  margin-bottom: 15px;
}

.corus-twilio-form-field label {
  display: block !important; /* block */
  font-size: 0.875rem !important; /* text-sm (14px) */
  line-height: 1.5rem !important; /* text-sm/6 */
  font-weight: 500 !important; /* font-medium */
  color: #111827 !important; /* text-gray-900 */
}

.corus-twilio-form-field input,
.corus-twilio-form-field textarea,
.corus-twilio-form-field select {
  display: block !important;
  width: 100% !important; /* w-full */
  border-radius: 0.375rem !important; /* rounded-md */
  background-color: #ffffff !important; /* bg-white */
  padding: 0.375rem 0.75rem !important; /* px-3 py-1.5 */
  font-size: 1rem !important; /* text-base (16px) */
  color: #111827 !important; /* text-gray-900 */
  outline: 1px solid #d1d5db !important; /* outline-1 outline-gray-300 */
  outline-offset: -1px !important; /* -outline-offset-1 */
  transition: outline 0.2s ease-in-out, outline-offset 0.2s ease-in-out !important;
}


.corus-twilio-form-field input::placeholder {
  color: #9ca3af !important; /* placeholder:text-gray-400 */
}


.corus-twilio-form-field input:focus,
.corus-twilio-form-field textarea:focus {
  outline: 2px solid #4f46e5 !important; /* focus:outline-2 focus:outline-indigo-600 */
  outline-offset: -2px !important; /* focus:-outline-offset-2 */
}




.corus-twilio-form-field .required {
  color: #dc3232;
}

.corus-twilio-submit-button {
  border-radius: 0.375rem !important; /* md */
  background-color: #4f46e5 !important; /* indigo-600 */
  padding: 0.5rem 0.75rem !important; /* px-3 py-2 */
  font-size: 0.875rem !important; /* text-sm (14px) */
  font-weight: 600 !important; /* font-semibold */
  color: #ffffff !important; /* text-white */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important; /* shadow-xs */
  transition: background-color 0.2s ease-in-out !important;
  /* sin borde */
  border: none !important;
}

.corus-twilio-submit-button:hover {
  background-color: #4338ca !important;
}

.corus-twilio-submit-button:disabled {
  background-color: #ccc !important;
  cursor: not-allowed !important;
}

.corus-twilio-submit-button:focus-visible {
  outline: 2px solid #4f46e5 !important; /* outline-indigo-600 */
  outline-offset: 2px !important;
}

.corus-twilio-contact-form-message {
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 3px;
}

.corus-twilio-contact-form-message.success {
  background-color: #ecf7ed;
  border: 1px solid #bce5c9;
  color: #46b450;
}

.corus-twilio-contact-form-message.error {
  background-color: #fbeaea;
  border: 1px solid #f1c0c0;
  color: #dc3232;
}

.corus-twilio-whatsapp-button {
  display: inline-block;
  background-color: #25d366;
  color: #fff;
  text-decoration: none;
  padding: 10px 15px;
  border-radius: 3px;
  font-weight: bold;
  position: relative;
  padding-left: 35px;
}

.corus-twilio-whatsapp-button:before {
  content: "";
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="white" d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"></path></svg>');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  width: 25px;
  height: 25px;
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.corus-twilio-whatsapp-button:hover {
  background-color: #128c7e;
  color: #fff;
}

.corus-twilio-error {
  color: #dc3232;
  padding: 10px;
  background-color: #fbeaea;
  border: 1px solid #f1c0c0;
  border-radius: 3px;
}

button.loading {
  position: relative;
  color: transparent !important;
}

button.loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Estilos para el widget de chat */
.corus-twilio-chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

.corus-twilio-chat-button {
  width: 60px;
  height: 60px;
  border-radius: 30px;
  background-color: #25d366;
  color: white;
  border: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
  outline: none;
}

.corus-twilio-chat-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.corus-twilio-chat-container {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 320px;
  max-height: 500px;
  border-radius: 10px;
  overflow: hidden;
  background-color: white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.corus-twilio-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  font-size: 1.25rem !important; /* Tamaño de fuente (equivalente a text-lg en Tailwind) */
  font-weight: 700 !important; /* Negrita (bold) */
  color: #111827 !important; /* Color oscuro (text-gray-900) */
  padding: 16px 20px !important; /* Espaciado interno */
  border-bottom: 1px solid #e5e7eb !important; /* Línea divisoria (border-gray-200) */
  background-color: #ffffff !important; /
}

.corus-twilio-chat-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.corus-twilio-chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 1;
}

.corus-twilio-chat-form-container{
  padding: 20px;
  border-radius: 8px;
  flex-grow: 1;
  max-height: 450px;
  overflow-y: auto;

}

.corus-twilio-chat-interface {
  padding: 0 20px 20px 20px;
  border-radius: 8px;
  flex-grow: 1;
  max-height: 450px;
  overflow-y: auto;
}

.corus-twilio-chat-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.corus-twilio-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 350px;
  overflow-y: auto;
  padding: 10px 0;
}

.corus-twilio-chat-message {
  max-width: 80%;
  margin-bottom: 10px;
}

.corus-twilio-chat-message-other {
  align-self: flex-start;
}

.corus-twilio-chat-message-self {
  align-self: flex-end;
}

.corus-twilio-chat-message-content {
  padding: 10px 15px;
  border-radius: 15px;
  position: relative;
}

.corus-twilio-chat-message-other .corus-twilio-chat-message-content {
  background-color: #f1f1f1;
  color: #333;
  border-top-left-radius: 5px;
}

.corus-twilio-chat-message-self .corus-twilio-chat-message-content {
  background-color: #edeaf5;
  color: #333;
  border-top-right-radius: 5px;
}

.corus-twilio-chat-message p {
  margin: 0 0 5px 0;
  word-wrap: break-word;
}

.corus-twilio-chat-message-time {
  font-size: 11px;
  color: #999;
  display: block;
  text-align: right;
}

.corus-twilio-chat-message-form {
  display: flex;
  gap: 10px;
  background-color: white;
}

.corus-twilio-chat-input {
  display: block !important;
  width: 100% !important; /* w-full */
  border-radius: 0.375rem !important; /* rounded-md */
  background-color: #ffffff !important; /* bg-white */
  padding: 0.375rem 0.75rem !important; /* px-3 py-1.5 */
  font-size: 1rem !important; /* text-base (16px) */
  color: #111827 !important; /* text-gray-900 */
  outline: 1px solid #d1d5db !important; /* outline-1 outline-gray-300 */
  outline-offset: -1px !important; /* -outline-offset-1 */
  transition: outline 0.2s ease-in-out, outline-offset 0.2s ease-in-out !important;
}


.corus-twilio-chat-input::placeholder {
  color: #9ca3af !important;
}

.corus-twilio-chat-input:focus {
  outline: 2px solid #4f46e5 !important; 
  outline-offset: -2px !important;
}

.corus-twilio-chat-send {
  border-radius: 0.375rem !important; /* md */
  background-color: #4f46e5 !important; /* indigo-600 */
  padding: 0.5rem 0.75rem !important; /* px-3 py-2 */
  font-size: 0.875rem !important; /* text-sm (14px) */
  font-weight: 600 !important; /* font-semibold */
  color: #ffffff !important; /* text-white */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important; /* shadow-xs */
  transition: background-color 0.2s ease-in-out !important;
  /* sin borde */
  border: none !important;
}

.corus-twilio-chat-send:hover {
  background-color: #4338ca !important;
}

.corus-twilio-chat-send svg {
  width: 20px;
  height: 20px;
}

/* Responsive styles */
@media (max-width: 480px) {
  .corus-twilio-chat-container {
    width: 300px;
    right: 0;
    bottom: 70px;
  }

  .corus-twilio-chat-messages {
    height: 300px;
  }
}
