/* DHP advice assistant — prominent chat widget */
.dhp-advice {
  position: fixed;
  right: 1rem;
  bottom: 6.5rem;
  z-index: 160;
}
@media (min-width: 768px) {
  .dhp-advice {
    right: 1.5rem;
    bottom: 5.5rem;
  }
}
@media (min-width: 1200px) {
  .dhp-advice {
    right: 2rem;
    bottom: 6rem;
  }
}

.dhp-advice__toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #0f4c5c, #0d3d4a);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(15, 76, 92, 0.4);
  font-size: 0.9rem;
  text-align: left;
  max-width: calc(100vw - 2rem);
}
.dhp-advice__toggle:hover {
  background: linear-gradient(135deg, #13657a, #0f4c5c);
}
.dhp-advice__toggle-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}
.dhp-advice__toggle-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.2;
}
.dhp-advice__toggle-text strong {
  font-size: 0.95rem;
  font-weight: 700;
}
.dhp-advice__toggle-text small {
  font-size: 0.72rem;
  opacity: 0.88;
  font-weight: 500;
}

.dhp-advice__panel {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.85rem);
  width: min(24rem, calc(100vw - 2rem));
  height: min(34rem, calc(100vh - 9rem));
  background: #fff;
  border-radius: 1.15rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}
@media (min-width: 768px) {
  .dhp-advice__panel {
    width: min(28rem, calc(100vw - 3rem));
    height: min(36rem, calc(100vh - 8rem));
  }
}
.dhp-advice.is-open .dhp-advice__panel {
  display: flex;
  flex-direction: column;
}

.dhp-advice__header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, #0f4c5c, #0d3d4a);
  color: #fff;
}
.dhp-advice__header strong {
  display: block;
  font-size: 1rem;
}
.dhp-advice__header p {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  opacity: 0.9;
}
.dhp-advice__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.dhp-advice__modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.dhp-advice__mode {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dhp-advice__mode:hover {
  border-color: #fdba74;
}
.dhp-advice__mode.is-active {
  border-color: #ea580c;
  box-shadow: 0 0 0 1px #ea580c;
  background: #fff7ed;
}
.dhp-advice__mode-icon {
  font-size: 1.1rem;
  line-height: 1;
  margin-top: 0.1rem;
}
.dhp-advice__mode-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.dhp-advice__mode-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.dhp-advice__mode-meta {
  font-size: 0.65rem;
  line-height: 1.35;
  color: #64748b;
}

.dhp-advice__messages {
  flex: 1;
  min-height: 12rem;
  overflow-y: auto;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #fff;
}
.dhp-advice__msg {
  padding: 0.65rem 0.85rem;
  border-radius: 0.85rem;
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 92%;
}
.dhp-advice__msg--bot {
  background: #f1f5f9;
  color: #334155;
  align-self: flex-start;
}
.dhp-advice__msg--user {
  background: #fff7ed;
  color: #9a3412;
  align-self: flex-end;
}
.dhp-advice__msg--system {
  align-self: center;
  max-width: 100%;
  background: #ecfeff;
  color: #0f4c5c;
  font-size: 0.75rem;
  text-align: center;
}

.dhp-advice__suggestions {
  padding: 0 0.85rem 0.65rem;
  background: #fff;
  border-top: 1px solid #f1f5f9;
}
.dhp-advice__suggestions-label {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}
.dhp-advice__suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.dhp-advice__suggestion {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.74rem;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.dhp-advice__suggestion:hover {
  background: #ffedd5;
  border-color: #fdba74;
}
.dhp-advice__suggestion:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}

.dhp-advice__form {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}
.dhp-advice__form input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
}
.dhp-advice__form .btn-dhp {
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

body:has(.mini-cart.is-open) .dhp-advice:not(.is-open) {
  visibility: hidden;
  pointer-events: none;
}

.dhp-advice__disclaimer {
  margin: 0;
  padding: 0 0.85rem 0.85rem;
  font-size: 0.68rem;
  line-height: 1.45;
  color: #94a3b8;
  background: #fff;
}
