.tripy-ai-root {
  position: fixed;
  right: 18px;
  bottom: 108px;
  z-index: 9998;
}

.tripy-ai-launcher {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #2f5bff 0%, #6b4dff 48%, #00b7ff 100%);
  box-shadow: 0 18px 45px rgba(32, 67, 185, 0.34);
}

.tripy-ai-launcher__badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.tripy-ai-launcher__text {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}

.tripy-ai-launcher__text small {
  opacity: 0.84;
  font-size: 12px;
}

.tripy-ai-panel {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.tripy-ai-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 15, 34, 0.34);
  backdrop-filter: blur(3px);
}

.tripy-ai-panel__sheet {
  position: absolute;
  right: 18px;
  bottom: 22px;
  width: min(420px, calc(100vw - 24px));
  height: min(76vh, 760px);
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(78, 97, 173, 0.14);
  background: linear-gradient(180deg, #f9fbff 0%, #ffffff 18%, #f5f8ff 100%);
  box-shadow: 0 36px 80px rgba(17, 24, 39, 0.28);
}

.tripy-ai-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(29, 49, 97, 0.08);
  background: linear-gradient(135deg, #eef4ff 0%, #f7fbff 100%);
}

.tripy-ai-panel__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tripy-ai-panel__brand > span {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #2845b8;
  background: linear-gradient(135deg, rgba(47, 91, 255, 0.12), rgba(0, 183, 255, 0.14));
}

.tripy-ai-panel__brand small {
  display: block;
  margin-top: 2px;
  color: #63718b;
}

.tripy-ai-panel__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tripy-ai-panel__ghost,
.tripy-ai-panel__close {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
}

.tripy-ai-panel__ghost {
  padding: 9px 12px;
  color: #2845b8;
  background: rgba(47, 91, 255, 0.08);
}

.tripy-ai-panel__close {
  width: 38px;
  height: 38px;
  font-size: 24px;
  line-height: 1;
  background: rgba(19, 29, 58, 0.06);
  color: #1f2a44;
}

.tripy-ai-panel__context {
  padding: 12px 18px 0;
}

.tripy-ai-context__title {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6f7a90;
}

.tripy-ai-context__row,
.tripy-ai-panel__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tripy-ai-pill,
.tripy-ai-chip {
  border-radius: 999px;
  border: 1px solid rgba(54, 82, 158, 0.12);
  background: #fff;
}

.tripy-ai-pill {
  padding: 7px 12px;
  font-size: 12px;
  color: #33415c;
}

.tripy-ai-panel__messages {
  overflow: auto;
  padding: 14px 18px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tripy-ai-message {
  max-width: 88%;
}

.tripy-ai-message--user {
  align-self: flex-end;
}

.tripy-ai-message__role {
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #70809b;
}

.tripy-ai-message__body {
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.45;
  color: #1d2740;
  background: #fff;
  border: 1px solid rgba(44, 72, 140, 0.08);
  box-shadow: 0 10px 24px rgba(18, 27, 45, 0.06);
}

.tripy-ai-message--user .tripy-ai-message__body {
  color: #fff;
  background: linear-gradient(135deg, #325cff 0%, #5b57ff 100%);
  border-color: transparent;
}

.tripy-ai-panel__chips {
  padding: 0 18px 12px;
}

.tripy-ai-chip {
  padding: 9px 13px;
  cursor: pointer;
  font-size: 13px;
  color: #203150;
}

.tripy-ai-chip:hover {
  border-color: rgba(47, 91, 255, 0.22);
  background: #f3f7ff;
}

.tripy-ai-panel__composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(29, 49, 97, 0.08);
  background: #fff;
}

.tripy-ai-panel__composer textarea {
  resize: none;
  min-height: 48px;
  max-height: 120px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(47, 91, 255, 0.12);
  outline: none;
  font: inherit;
  color: #1d2740;
  background: #f8fbff;
}

.tripy-ai-panel__composer textarea:focus {
  border-color: rgba(47, 91, 255, 0.38);
  box-shadow: 0 0 0 4px rgba(47, 91, 255, 0.08);
}

.tripy-ai-panel__composer button {
  min-width: 88px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  cursor: pointer;
  padding: 0 16px;
  background: linear-gradient(135deg, #325cff 0%, #5b57ff 100%);
}

.tripy-ai-panel__composer button:disabled {
  opacity: 0.72;
  cursor: default;
}

@media (max-width: 767px) {
  .tripy-ai-root {
    right: 12px;
    bottom: 92px;
  }

  .tripy-ai-launcher {
    padding: 10px 12px;
  }

  .tripy-ai-launcher__text small {
    display: none;
  }

  .tripy-ai-panel__sheet {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: min(84vh, 760px);
    border-radius: 22px 22px 0 0;
  }

  .tripy-ai-message {
    max-width: 92%;
  }
}


/* Keep the original + services FAB visible beside/above the new AI launcher */
#tripy-web-service-fab{
  position: fixed;
  right: 28px;
  bottom: 40px;
  width: 62px;
  height: 62px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(180deg,#16a34a 0%,#0f8f3d 100%);
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    0 18px 32px rgba(15,23,42,.22),
    inset 0 2px 0 rgba(255,255,255,.22);
  cursor: pointer;
  z-index: 10040;
}

#tripy-web-service-fab > span{
  display: block;
  transform: translateY(-1px);
}

/* Service popup menu */
#tripy-web-service-menu{
  position: fixed;
  right: 28px;
  bottom: 192px;
  z-index: 10039;
  min-width: 220px;
}

/* Keep AI launcher slightly lower */
#tripy-web-ai-root,
#tripy-web-ai-launcher,
.tripy-ai-root,
.tripy-ai-launcher{
  z-index: 10030;
}

@media (max-width: 760px){
  #tripy-web-service-fab{
    right: 18px;
    bottom: 108px;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    font-size: 32px;
  }

  #tripy-web-service-menu{
    right: 16px;
    bottom: 178px;
    min-width: min(82vw, 240px);
  }
}


/* keep AI launcher below the green + services fab */
.tripy-ai-root{
  z-index:10030;
}

.tripy-ai-panel{
  z-index:10031;
}

#tripy-web-service-fab{
  z-index:10040;
}

#tripy-web-service-menu{
  z-index:10039;
}

/* richer message/cards */
.tripy-ai-cards{
  display:grid;
  gap:10px;
  margin-top:12px;
}

.tripy-ai-card{
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  padding:12px 14px;
  background:#fff;
  box-shadow:0 10px 25px rgba(15,23,42,.06);
}

.tripy-ai-card__title{
  font-weight:700;
  font-size:14px;
  margin-bottom:6px;
  color:#0f172a;
}

.tripy-ai-card__body{
  font-size:13px;
  line-height:1.5;
  color:#334155;
}

.tripy-ai-card__meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.tripy-ai-card__footer{
  margin-top:12px;
}

.tripy-ai-message__actions{
  margin-top:10px;
}

.tripy-ai-action{
  border:0;
  border-radius:12px;
  padding:10px 14px;
  background:rgba(37,99,235,.08);
  color:#1d4ed8;
  font-weight:700;
  cursor:pointer;
}

.tripy-ai-action--primary{
  background:linear-gradient(135deg,#4f46e5,#06b6d4);
  color:#fff;
}