.ai-chat-panel {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  max-width: 800px;
  margin: 24px auto;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
  display: flex;
  flex-direction: column;
}

.ai-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px;
  padding-top: 50px;
  padding-bottom: 170px;
}

.ai-message {
  padding: 10px 14px;
  border-radius: 10px;
  line-height: 1.45;
  font-size: 15px;
}

.ai-message.user {
  align-self: flex-end;
  background: #f1f5f9;
  color: #111;
}

.ai-message.bot {
  align-self: flex-start;
  background: #f8fafc;
  color: #111;
}

.ai-message.typing {
  font-style: italic;
  opacity: 0.6;
}

.ai-chat-inputbar {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.ai-chat-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px;
}

.ai-chat-submit {
  border: none;
  background: var( --e-global-color-primary )!important;
  border: none!important;
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.ai-chat-submit:hover { background:#1f2937; }

.ai-section-title {
  margin: 8px 0 2px;
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}

.ai-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  margin: 6px 0;
  background: #fff;
}

.ai-card a {
  font-weight: 600;
  text-decoration: none;
  color: #111827;
}

.ai-card-excerpt {
  font-size: 14px;
  margin-top: 4px;
  opacity: 0.85;
}

.ai-price {
  margin-top: 6px;
  font-weight: 600;
  color: #047857; /* verde */
}

.ai-actions {
  margin-top: 8px;
}

.ai-show-all {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  margin-right: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}
.ai-show-all:hover {
  background: #f3f4f6;
}

.ai-hint {
  margin: 6px 0 2px;
  font-size: 14px;
  opacity: 0.8;
}


.ai-chat-inputwrap{
	display: flex;
	position: absolute;
	width: 100%;
	bottom: 0;
	margin-bottom: 50px;
}
.ai-chat{
	position: relative;
	min-height: 50vh;
}
.ai-msg-bubble{
	background-color: #FFF;
	width: fit-content;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 5px 5px 15px #dedede;
}

.ai-msg.ai-msg-user{text-align: -webkit-right;}
.ai-msg.ai-msg-user .ai-msg-bubble{
	background-color: #dbffdb;
}


/**/
#ai-articles-section{
  opacity: 1;
  transform: translateY(0);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}
#ai-articles-section.leaving{
  opacity: 0;
  transform: translateY(-24px);
}
#ai-articles-section.hidden{
  display: none !important;
}



/**/
.ai-sources-list{
  display: flex;
  padding: 0;
  list-style: none;
  gap: 5px;
}

.ai-sources-title{
  font-style: italic;
  margin-top: 5px;
  margin-bottom: 10px;
}

.ai-sources-list a{
  border: 1px solid #e9e9e9;
  background-color: #FFF;
  color: var( --e-global-color-secondary );
  border-radius: 10px;
  list-style: none;
  padding: 20px;
  display: grid;
  text-align: center;
  margin: 0;
}
.ai-sources-list a:hover{
  background-color: var( --e-global-color-secondary );
  color: #FFF;
}

.ai-sources-tag{
  display: none;
}