#elgrial-chatbot, #elgrial-chatbot * { box-sizing: border-box; }
#elgrial-chatbot {
  position: fixed; right: 22px; bottom: 22px; z-index: 2147483000;
  font-family: Arial, Helvetica, sans-serif; color: #3d2b3d;
}
.egc-launcher {
  width: 58px; height: 58px; border: 0; border-radius: 50%;
  background: linear-gradient(145deg, #6b1b7a, #953396);
  color: #fff; font-size: 25px; cursor: pointer; box-shadow: 0 8px 24px rgba(61,20,78,.35);
}
.egc-launcher:hover { background: linear-gradient(145deg, #7b258c, #a63dab); }
.egc-panel {
  display: none; position: absolute; right: 0; bottom: 72px;
  width: 390px; max-width: calc(100vw - 24px); height: 600px; max-height: calc(100vh - 110px);
  background: #fff; border: 1px solid #e5d2e9; border-radius: 12px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(61,20,78,.25); flex-direction: column;
}
.egc-panel.egc-open { display: flex; }
.egc-head { background: linear-gradient(145deg, #5a176b, #953396); color: #fff; padding: 12px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.egc-head b { display: block; font-size: 15px; line-height: 1.2; }
.egc-head small { display: block; margin-top: 3px; font-size: 10px; letter-spacing: .4px; color: #f7d36b; }
.egc-close { border: 0; background: transparent; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px; }
.egc-foot-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.egc-foot-btn { display: inline-block; border: 1px solid #d9b8e0; background: #fff; color: #6b1b7a; border-radius: 14px; padding: 4px 9px; font-size: 10px; font-weight: 700; text-decoration: none; cursor: pointer; font-family: inherit; }
.egc-foot-btn:hover { background: #f7e9f9; }
.egc-disclaimer { display: block; }
.egc-body { flex: 1; overflow-y: auto; padding: 12px; background: #fbf7fc; }
.egc-msg { max-width: 88%; margin: 0 0 9px; padding: 9px 11px; border-radius: 9px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.egc-msg.bot { background: #fff; border: 1px solid #ead9ee; border-bottom-left-radius: 3px; }
.egc-msg.user { margin-left: auto; background: #7a2c7a; color: #fff; border-bottom-right-radius: 3px; }
.egc-msg a { color: #7a2c7a; text-decoration: underline; }
.egc-msg.user a { color: #fff; }
.egc-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.egc-suggestion { border: 1px solid #d9b8e0; background: #fff; color: #6b1b7a; border-radius: 14px; padding: 6px 9px; font-size: 11px; cursor: pointer; text-align: left; }
.egc-suggestion:hover { background: #f7e9f9; }
.egc-typing { color: #8b7890; font-size: 12px; font-style: italic; padding: 2px 0 8px; display: none; }
.egc-inputbar { display: flex; gap: 7px; padding: 9px; border-top: 1px solid #ead9ee; background: #fff; }
.egc-input { flex: 1; min-width: 0; border: 1px solid #cfaed6; border-radius: 6px; padding: 9px 10px; font-size: 13px; font-family: inherit; outline: none; }
.egc-input:focus { border-color: #953396; box-shadow: 0 0 0 2px rgba(149,51,150,.12); }
.egc-send { border: 0; border-radius: 6px; background: #fdbd41; color: #3b0a47; font-weight: 700; padding: 0 13px; cursor: pointer; font-size: 13px; }
.egc-send:disabled { opacity: .55; cursor: default; }
.egc-foot { padding: 7px 10px 9px; background: #fff; border-top: 1px solid #f1e4f4; font-size: 10px; line-height: 1.35; color: #796681; }
.egc-foot a { color: #6b1b7a; }
.egc-support { white-space: nowrap; }
@media (max-width: 520px) {
  #elgrial-chatbot { right: 12px; bottom: 12px; }
  .egc-panel { position: fixed; right: 8px; left: 8px; bottom: 78px; width: auto; max-width: none; height: 68vh; max-height: 68vh; }
}

.egc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 9px; }
.egc-action { display: inline-block; border: 1px solid #d9b8e0; background: #fff; color: #6b1b7a !important; border-radius: 5px; padding: 6px 9px; font-size: 11px; font-weight: 700; text-decoration: none; }
.egc-action:hover { background: #f7e9f9; text-decoration: none; }


.egc-panel.egc-open { animation: egcIn .18s ease-out; }
@keyframes egcIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.egc-start { padding: 2px 2px 6px; }
.egc-start-title { font-family: Georgia, 'Times New Roman', serif; font-size: 19px; line-height: 1.2; color: #4b1755; margin: 0 0 5px; }
.egc-start-sub { font-size: 11.5px; line-height: 1.45; color: #796681; margin: 0 0 13px; }
.egc-routes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.egc-route { display: flex; flex-direction: column; gap: 3px; text-align: left; border: 1px solid #e0a52e; background: #fdbd41; border-radius: 8px; padding: 10px; cursor: pointer; min-height: 68px; }
.egc-route:hover { background: #ffcf6a; border-color: #c98a1e; }
.egc-route.egc-route-active { background: #ffcf6a; border-color: #6b1b7a; box-shadow: 0 0 0 1px #6b1b7a inset; }
.egc-route b { font-size: 12.5px; line-height: 1.25; color: #3b0a47; }
.egc-route span { font-size: 10.5px; line-height: 1.35; color: #4a2b3a; }
.egc-hooks-label { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: #953396; font-weight: 700; margin: 14px 0 6px; }
.egc-hooks { display: flex; flex-direction: column; gap: 5px; }
.egc-hook { text-align: left; border: 1px solid #e5d2e9; background: #fff; color: #3d2b3d; border-radius: 7px; padding: 7px 9px; font-size: 11.5px; line-height: 1.35; cursor: pointer; }
.egc-hook:hover { background: #f7e9f9; border-color: #cfaed6; }
.egc-more, .egc-write { display: inline-block; border: 0; background: transparent; color: #6b1b7a; font-size: 11px; font-weight: 700; cursor: pointer; padding: 9px 0 0; text-decoration: underline; }
.egc-more { margin-right: 14px; }
.egc-write { display: block; }
.egc-start-note { font-size: 10px; line-height: 1.35; color: #8b7890; margin: 12px 0 0; }
@media (max-width: 520px) {
  .egc-routes { grid-template-columns: 1fr; }
  .egc-route { min-height: 0; }
  .egc-start-title { font-size: 18px; }
}
