



/* === MOBILE CHAT INPUT CLEAN v3 === */
@media (max-width:768px){
  .chat-wrap{
    min-height: calc(100dvh - 86px);
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

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

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

  .chat-form textarea{
    height: 46px;
    min-height: 46px;
    max-height: 46px;
    resize: none;
    overflow-y: auto;
    padding: 12px 14px;
    border-radius: 999px;
    font-size: 16px;
    line-height: 1.25;
    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{
    height: 46px;
    padding: 0 14px;
    border-radius: 999px;
    border: 0;
    background: #1f8c68;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(31,140,104,.22);
  }

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

/* === MOBILE CHAT BUTTON COMPACT v4 === */
@media (max-width:768px){
  .chat-form{
    grid-template-columns: 1fr 88px;
    align-items: center;
    padding: 6px;
  }
  .chat-form textarea{
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 10px 13px;
  }
  .chat-form button{
    height: 42px;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 999px;
  }
}


/* === MOBILE CHAT FIX v6: no zoom, bottom input, clean button === */
@media (max-width:768px){
  .chat-wrap{ padding-bottom:calc(78px + env(safe-area-inset-bottom,0px)); }
  .chat-thread{ max-height:calc(100dvh - 228px); }

  .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 92px;
    gap:8px;
    padding:7px;
    margin:0;
    background:rgba(255,255,255,.96);
    border:1px solid rgba(15,23,42,.10);
    border-radius:22px;
    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:999px;
    font-size:16px;
    line-height:22px;
    border:1px solid rgba(15,23,42,.14);
    outline:none;
  }

  .chat-form button{
    height:44px;
    padding:0 12px;
    border:0;
    border-radius:999px;
    background:#1f8c68;
    color:#fff;
    font-size:13px;
    font-weight:800;
    box-shadow:0 8px 18px rgba(31,140,104,.22);
  }
}
