

/* === MSG CHAT FINAL v9 === */
.chat-form button{
  min-width: 110px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: #1f8c68;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(31,140,104,.18);
}

.chat-form button:hover{
  filter: brightness(.96);
}

.chat-form button:active{
  transform: translateY(1px);
}

@media (max-width:768px){
  .chat-wrap{
    min-height: calc(100dvh - 86px);
    padding-bottom: calc(78px + env(safe-area-inset-bottom,0px));
  }

  .chat-thread{
    max-height: calc(100dvh - 228px);
    overflow-y: auto;
  }

  .chat-form{
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(56px + env(safe-area-inset-bottom,0px));
    z-index: 7000;
    display: grid;
    grid-template-columns: 1fr 96px;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 7px;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(15,23,42,.10);
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(15,23,42,.13);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .chat-form textarea{
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    resize: none;
    overflow-y: auto;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 16px;
    line-height: 22px;
    border: 1px solid rgba(15,23,42,.14);
    outline: none;
  }

  .chat-form textarea:focus{
    border-color: rgba(31,140,104,.45);
    box-shadow: 0 0 0 3px rgba(31,140,104,.12);
  }

  .chat-form button{
    min-width: 0;
    width: 96px;
    height: 44px;
    padding: 0 10px;
    font-size: 13px;
  }

  body:has(.chat-wrap) .aiw-launcher{
    bottom: calc(118px + env(safe-area-inset-bottom,0px));
  }
}


/* === MSG PRODUCT CONTEXT v1 === */
.chat-product-context{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:10px 0;
  padding:12px;
  border:1px solid rgba(17,70,38,.12);
  border-radius:12px;
  background:#f8fff9;
}

.chat-product-context__label{
  color:#667085;
  font-size:12px;
  font-weight:700;
}

.chat-product-context__title{
  color:#101828;
  font-size:15px;
  font-weight:800;
  line-height:1.25;
}

.chat-product-context__actions{
  display:flex;
  gap:8px;
  flex-shrink:0;
}

.chat-product-context__actions a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 12px;
  border-radius:12px;
  background:#1f8c68;
  color:#fff;
  font-size:13px;
  font-weight:800;
  text-decoration:none;
}

.chat-product-context__actions a:first-child{
  background:#fff;
  color:#1f8c68;
  border:1px solid rgba(31,140,104,.28);
}

@media (max-width:768px){
  .chat-product-context{
    margin:8px 10px;
    align-items:flex-start;
    flex-direction:column;
  }

  .chat-product-context__actions{
    width:100%;
  }

  .chat-product-context__actions a{
    flex:1;
  }
}
