:root {
  --dlab-ai-orange: #ff5a00;
  --dlab-ai-ink: #071326;
  --dlab-ai-muted: #667085;
  --dlab-ai-line: #d8e1ed;
  --dlab-ai-soft: #f4f7fb;
}

body .dlab-ai-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99998;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 214px;
  min-height: 68px;
  padding: 10px 18px 10px 10px;
  border: 1px solid rgba(255, 255, 255, .38) !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #ff5a00 0%, #ff7a1a 100%) !important;
  color: #fff !important;
  text-align: left;
  box-shadow: 0 20px 45px rgba(7, 19, 38, .26) !important;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.15 !important;
  transition: transform .18s ease, box-shadow .18s ease;
}

body .dlab-ai-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 55px rgba(7, 19, 38, .32) !important;
}

body .dlab-ai-launcher[hidden] {
  display: none !important;
}

body .dlab-ai-launcher .dlab-ai-launcher__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #071326;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}

body .dlab-ai-launcher .dlab-ai-launcher__text {
  display: grid;
  gap: 2px;
}

body .dlab-ai-launcher .dlab-ai-launcher__text strong {
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

body .dlab-ai-launcher .dlab-ai-launcher__text small {
  color: rgba(255, 255, 255, .88);
  font-size: 12px;
  font-weight: 700;
}

.dlab-ai-chat {
  position: fixed;
  right: 22px;
  bottom: 104px;
  z-index: 99999;
  width: min(440px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 126px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--dlab-ai-line);
  border-radius: 20px;
  background: #fff;
  color: var(--dlab-ai-ink);
  box-shadow: 0 30px 84px rgba(7, 19, 38, .28);
  font-family: inherit;
}

.dlab-ai-chat[hidden] {
  display: none;
}

.dlab-ai-chat--inline {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: auto;
  width: 100%;
  max-height: none;
}

.dlab-ai-chat__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: radial-gradient(circle at 20% 0%, rgba(255, 90, 0, .34), transparent 36%), #071326;
  color: #fff;
}

.dlab-ai-chat__brandmark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #ff5a00;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.dlab-ai-chat__heading {
  display: grid;
  flex: 1;
  line-height: 1.2;
}

.dlab-ai-chat__heading strong {
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.dlab-ai-chat__heading small {
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
  font-weight: 700;
}

.dlab-ai-chat__close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 11px;
  background: transparent;
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.dlab-ai-chat__messages {
  min-height: 250px;
  padding: 16px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.dlab-ai-chat__message {
  max-width: 88%;
  padding: 11px 13px;
  border-radius: 15px;
  line-height: 1.48;
  white-space: pre-wrap;
  font-size: 14px;
  box-shadow: 0 5px 14px rgba(7, 19, 38, .05);
}

.dlab-ai-chat__message--assistant {
  align-self: flex-start;
  background: #fff;
  color: #102033;
  border: 1px solid #e1e8f0;
}

.dlab-ai-chat__message--user {
  align-self: flex-end;
  background: #ff5a00;
  color: #fff;
}

.dlab-ai-chat__quick {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 16px 12px;
  background: #f8fafc;
}

.dlab-ai-chat__quick button {
  border: 1px solid #cdd9e6;
  border-radius: 999px;
  background: #fff;
  color: #d92662;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.dlab-ai-chat__card {
  align-self: stretch;
  padding: 14px;
  border: 1px solid #dbe5f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(7, 19, 38, .08);
}

.dlab-ai-chat__card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--dlab-ai-ink);
  font-weight: 900;
}

.dlab-ai-chat__card p {
  margin: 0 0 12px;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

.dlab-ai-chat__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dlab-ai-chat__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 12px;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none !important;
  cursor: pointer;
}

.dlab-ai-chat__cta--primary {
  border: 0 !important;
  background: var(--dlab-ai-orange) !important;
  color: #fff !important;
}

.dlab-ai-chat__cta--secondary {
  border: 1px solid #cdd9e6 !important;
  background: #fff !important;
  color: var(--dlab-ai-ink) !important;
}

.dlab-ai-chat__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e4ebf3;
  background: #fff;
}

.dlab-ai-chat__form textarea {
  width: 100%;
  resize: none;
  border: 1px solid #cdd9e6;
  border-radius: 13px;
  padding: 12px;
  font: inherit;
  font-size: 14px;
}

.dlab-ai-chat__form button,
.dlab-ai-offer-form button {
  border: 0;
  border-radius: 13px;
  background: #071326;
  color: #fff;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
}

.dlab-ai-chat__form button:disabled,
.dlab-ai-offer-form button:disabled {
  opacity: .55;
  cursor: wait;
}

.dlab-ai-chat__privacy {
  margin: 0;
  padding: 0 16px 14px;
  color: var(--dlab-ai-muted);
  background: #fff;
  font-size: 12px;
}

.dlab-ai-offer-form {
  display: grid;
  gap: 10px;
}

.dlab-ai-offer-form label {
  display: grid;
  gap: 5px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.dlab-ai-offer-form input,
.dlab-ai-offer-form textarea {
  width: 100%;
  border: 1px solid #cdd9e6;
  border-radius: 11px;
  padding: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}

.dlab-ai-offer-form__upload {
  padding: 12px;
  border: 1px dashed #b8c7d9;
  border-radius: 13px;
  background: #f7faff;
}

.dlab-ai-offer-form button {
  min-height: 42px;
}

.dlab-ai-offer-form__error {
  margin: 0;
  padding: 10px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff1f2;
  color: #b91c1c;
}

.dlab-ai-material-advisor {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  gap: 28px;
  margin: 52px auto;
  padding: 34px;
  border: 1px solid #d8e1ed;
  border-radius: 22px;
  background: radial-gradient(circle at top left, rgba(255, 90, 0, .10), transparent 32%), linear-gradient(135deg, #fff 0%, #f6f9fc 100%);
  box-shadow: 0 24px 70px rgba(12, 24, 40, .10);
}

.dlab-ai-material-advisor__eyebrow {
  margin: 0 0 10px;
  color: #ff5a00;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dlab-ai-material-advisor h2 {
  margin: 0 0 12px;
  color: #071326;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

.dlab-ai-material-advisor p,
.dlab-ai-material-advisor li {
  color: #334155;
  font-size: 16px;
  line-height: 1.7;
}

.dlab-ai-material-advisor ul {
  margin: 18px 0 0;
  padding-left: 20px;
}

.dlab-ai-material-advisor__box {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d8e1ed;
  border-radius: 18px;
  background: #fff;
}

.dlab-ai-material-advisor__prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dlab-ai-material-advisor__prompts button {
  border: 1px solid #cdd9e6;
  border-radius: 999px;
  background: #fff;
  color: #071326;
  padding: 9px 12px;
  font-weight: 800;
  cursor: pointer;
}

.dlab-ai-material-advisor__form {
  display: grid;
  gap: 10px;
}

.dlab-ai-material-advisor__form textarea {
  width: 100%;
  min-height: 124px;
  resize: vertical;
  border: 1px solid #cdd9e6;
  border-radius: 14px;
  padding: 14px;
  font: inherit;
}

.dlab-ai-material-advisor__form button {
  justify-self: start;
  border: 0;
  border-radius: 13px;
  background: #ff5a00;
  color: #fff;
  padding: 13px 18px;
  font-weight: 900;
  cursor: pointer;
}

.dlab-ai-material-advisor__answer {
  min-height: 0;
  border-radius: 14px;
  color: #102033;
  white-space: pre-wrap;
  line-height: 1.65;
}

.dlab-ai-material-advisor__answer:not(:empty) {
  padding: 14px;
  border: 1px solid #d8e1ed;
  background: #f6f9fc;
}

@media (max-width: 640px) {
  body .dlab-ai-launcher {
    right: 12px;
    bottom: 12px;
    min-width: 184px;
  }

  .dlab-ai-chat {
    right: 12px;
    bottom: 92px;
    width: calc(100vw - 24px);
  }

  .dlab-ai-chat__actions,
  .dlab-ai-chat__form {
    grid-template-columns: 1fr;
  }

  .dlab-ai-chat__form button {
    min-height: 44px;
  }

  .dlab-ai-material-advisor {
    grid-template-columns: 1fr;
    padding: 22px;
  }
}
