/* Eurodeal AI Chatbot — frontend */
.edaic { --edaic-primary:#0d1b3e; --edaic-secondary:#007bff; font-family: inherit; }

/* Bula flotanta */
.edaic--floating { position: fixed; bottom: 22px; z-index: 99990; }
.edaic--right { right: 22px; }
.edaic--left { left: 22px; }
.edaic__bubble {
	width: 60px; height: 60px; border: 0; border-radius: 50%; cursor: pointer;
	background: var(--edaic-secondary); color: #fff;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 10px 28px rgba(0,0,0,.28);
	transition: transform .18s ease, box-shadow .18s ease;
}
.edaic__bubble:hover { transform: scale(1.06); box-shadow: 0 14px 34px rgba(0,0,0,.32); }
.edaic__bubble img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }

/* Fereastra */
.edaic__window {
	position: absolute; bottom: 74px; width: 370px; max-width: calc(100vw - 32px);
	background: #fff; border-radius: 16px; overflow: hidden;
	box-shadow: 0 22px 64px rgba(0,0,0,.3);
	display: flex; flex-direction: column;
}
.edaic--right .edaic__window { right: 0; }
.edaic--left .edaic__window { left: 0; }
.edaic--small  .edaic__window { width: 320px; }
.edaic--medium .edaic__window { width: 370px; }
.edaic--large  .edaic__window { width: 430px; }
.edaic--inline .edaic__window { position: static; width: 100%; max-width: 560px; margin: 0 auto; box-shadow: 0 12px 36px rgba(0,0,0,.14); border: 1px solid #e3e7f0; }

/* Header */
.edaic__header {
	display: flex; align-items: center; gap: 10px;
	background: var(--edaic-primary); color: #fff; padding: 13px 14px;
}
.edaic__header-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.4); }
.edaic__header-text { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
.edaic__title { font-size: 15px; }
.edaic__status { font-size: 12px; opacity: .85; display: flex; align-items: center; gap: 5px; }
.edaic__status-dot { width: 8px; height: 8px; border-radius: 50%; background: #38d97c; display: inline-block; }
.edaic__close { background: transparent; border: 0; color: #fff; font-size: 16px; cursor: pointer; opacity: .85; padding: 4px 6px; }
.edaic__close:hover { opacity: 1; }

/* Mesaje */
.edaic__messages {
	height: 320px; overflow-y: auto; padding: 14px;
	display: flex; flex-direction: column; gap: 9px; background: #f6f8fc;
}
.edaic--large .edaic__messages { height: 380px; }
.edaic--small .edaic__messages { height: 270px; }
.edaic__msg { max-width: 86%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; word-wrap: break-word; }
.edaic__msg--bot { background: #fff; color: #1b2540; border: 1px solid #e5e9f2; border-bottom-left-radius: 4px; align-self: flex-start; }
.edaic__msg--user { background: var(--edaic-secondary); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
/* UNIFORMIZARE TIPOGRAFICA: tema nu are voie sa schimbe fonturile in chat.
   Toate elementele din mesaje (p, li, strong, a etc.) primesc ACEEASI
   dimensiune si inaltime de rand — fara !important tema castiga uneori. */
.edaic__msg, .edaic__msg * {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
	font-size: 13.5px !important;
	line-height: 1.55 !important;
}
.edaic__msg strong, .edaic__msg b { font-weight: 700 !important; }
.edaic__msg p { margin: 0 0 6px; }
.edaic__msg p:last-child { margin: 0; }
.edaic__msg ul, .edaic__msg ol { margin: 4px 0 6px 16px; padding: 0; list-style-position: outside; }
.edaic__msg li { margin: 0 0 3px; padding: 0; }
.edaic__msg li:last-child { margin-bottom: 0; }
.edaic__msg a { color: var(--edaic-secondary); text-decoration: underline; }

/* Indicator „se scrie" */
.edaic__typing { display: flex; gap: 4px; padding: 12px 14px; }
.edaic__typing span { width: 7px; height: 7px; border-radius: 50%; background: #a9b4cc; animation: edaicBlink 1.2s infinite; }
.edaic__typing span:nth-child(2) { animation-delay: .2s; }
.edaic__typing span:nth-child(3) { animation-delay: .4s; }
@keyframes edaicBlink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* Intrebari rapide */
.edaic__quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; background: #f6f8fc; }
.edaic__quick:empty { display: none; }
.edaic__quick-btn {
	border: 1px solid var(--edaic-secondary); color: var(--edaic-secondary);
	background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12.5px;
	cursor: pointer; transition: background .15s ease, color .15s ease;
}
.edaic__quick-btn:hover { background: var(--edaic-secondary); color: #fff; }

/* Consimtamant */
.edaic__consent { padding: 8px 14px; background: #fff8e6; border-top: 1px solid #f0e2b6; font-size: 12px; }
.edaic__consent label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; color: #5d5026; }
.edaic__consent--attention { animation: edaicShake .5s; background: #ffefc4; }
@keyframes edaicShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Formular */
.edaic__form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #e5e9f2; background: #fff; }
.edaic__input {
	flex: 1; border: 1px solid #d5dbe8; border-radius: 999px; padding: 9px 15px;
	font-size: 14px; outline: none; min-width: 0;
}
.edaic__input:focus { border-color: var(--edaic-secondary); box-shadow: 0 0 0 3px rgba(0,123,255,.14); }
.edaic__send {
	width: 40px; height: 40px; flex: 0 0 40px; border: 0; border-radius: 50%;
	background: var(--edaic-secondary); color: #fff; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.edaic__send:hover { filter: brightness(1.08); }

/* Notificare GDPR */
.edaic__notice { margin: 0; padding: 8px 14px 11px; font-size: 11px; line-height: 1.45; color: #76809a; background: #fff; }
.edaic__notice a { color: var(--edaic-secondary); }

/* Mobil */
@media (max-width: 540px) {
	.edaic--floating { bottom: 14px; }
	.edaic--right { right: 14px; }
	.edaic--left { left: 14px; }
	.edaic__window { width: calc(100vw - 28px) !important; bottom: 70px; }
	.edaic__messages { height: min(46vh, 340px); }
}

/* Bula de intampinare (teaser) — mesaj langa butonul flotant */
.edaic__teaser {
	position: absolute; bottom: calc(100% + 14px); max-width: 250px;
	background: var(--edaic-secondary); color: #fff;
	padding: 14px 18px; border-radius: 16px; font-size: 15px; line-height: 1.55;
	box-shadow: 0 10px 30px rgba(0,0,0,.22); cursor: pointer;
	animation: edaicTeaserIn .4s ease .8s both;
}
.edaic--right .edaic__teaser { right: 0; border-bottom-right-radius: 4px; }
.edaic--left .edaic__teaser { left: 0; border-bottom-left-radius: 4px; }
.edaic__teaser::after {
	content: ""; position: absolute; top: 100%; border: 8px solid transparent;
	border-top-color: var(--edaic-secondary);
}
.edaic--right .edaic__teaser::after { right: 22px; }
.edaic--left .edaic__teaser::after { left: 22px; }
.edaic__teaser:hover { filter: brightness(1.06); }
@keyframes edaicTeaserIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 480px) { .edaic__teaser { max-width: min(250px, calc(100vw - 110px)); font-size: 14px; } }

/* Linkuri in raspunsurile botului + buton WhatsApp */
.edaic__msg--bot a { color: var(--edaic-secondary); text-decoration: underline; word-break: break-all; }
.edaic__msg--bot a.edaic-wa, .edaic .edaic__msg--bot a.edaic-wa {
	display: inline-block; background: #25D366; color: #fff; text-decoration: none;
	font-size: 12.5px !important; font-weight: 700 !important; line-height: 1 !important; padding: 6px 11px;
	border-radius: 999px; margin-left: 6px; vertical-align: 1px; word-break: normal;
}
.edaic__msg--bot a.edaic-wa::before { content: "✆ "; }
.edaic__msg--bot a.edaic-wa:hover { background: #1ebe5b; }

/* Buton conversatie noua (header) */
.edaic__reset { background: transparent; border: 0; color: #fff; opacity: .85; font-size: 17px; cursor: pointer; padding: 4px 8px; line-height: 1; }
.edaic__reset:hover { opacity: 1; transform: rotate(90deg); transition: transform .25s ease; }

/* Buton flotant = DOAR poza (fata), patrat rotunjit ca in design */
.edaic__bubble--photo { width: 72px; height: 72px; border-radius: 16px; background: #fff; padding: 0; overflow: hidden; border: 3px solid #fff; }
.edaic__bubble--photo .edaic__bubble-photo { width: 100%; height: 100%; border-radius: 13px; object-fit: cover; display: block; }

/* X-ul de inchidere al bulei de intampinare — rotund, ca in design */
.edaic__teaser { padding-right: 26px; }
.edaic__teaser-close {
	position: absolute; top: -12px; right: -12px; width: 30px; height: 30px;
	border: 0; border-radius: 50%; cursor: pointer;
	background: var(--edaic-secondary); color: #fff; font-size: 13px; line-height: 1;
	box-shadow: 0 4px 12px rgba(0,0,0,.25); filter: brightness(1.08);
	display: flex; align-items: center; justify-content: center;
}
.edaic__teaser-close:hover { filter: brightness(1.2); }

/* FIX inchidere: atributul [hidden] trebuie sa bata display:flex de mai sus,
   altfel fereastra nu se mai poate inchide (si nici porni ascunsa corect). */
.edaic__window[hidden] { display: none !important; }
