/* Extracted from app/Views/public/hozwu_ai.php */

/* ============ HoZWU AI Assistant — scoped design system ============ */
  .hz-page{
    --hz-emerald-950:#062A1D;
    --hz-emerald-800:#0B4B33;
    --hz-emerald-700:#0F6B45;
    --hz-emerald-600:#158055;
    --hz-gold:#C9A24D;
    --hz-gold-soft:#EADFBC;
    --hz-cream:#FBF8F1;
    --hz-card:#FFFFFF;
    --hz-ink:#1E2420;
    --hz-ink-soft:#5C665F;
    --hz-line:#E7E1D3;
    font-family:'Inter',sans-serif;
    color:var(--hz-ink);
    background:var(--hz-cream);
  }
  .hz-page h1, .hz-page h2, .hz-page h3{
    font-family:'Amiri', serif;
    letter-spacing:.2px;
  }

  /* ---------- Star lattice watermark ---------- */
  .hz-star-field{
    background-image:
      linear-gradient(45deg, rgba(255,255,255,.05) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.05) 75%),
      linear-gradient(45deg, rgba(255,255,255,.05) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.05) 75%);
    background-size: 46px 46px;
    background-position: 0 0, 23px 23px;
  }

  /* ---------- Hero ---------- */
  .hz-hero{
    position:relative;
    overflow:hidden;
    background:radial-gradient(1100px 480px at 50% -20%, var(--hz-emerald-700) 0%, var(--hz-emerald-800) 45%, var(--hz-emerald-950) 100%);
    padding:3.5rem 0 3rem;
    color:#fff;
    text-align:center;
  }
  .hz-hero .hz-star-field{ position:absolute; inset:0; opacity:.5; }
  .hz-hero-inner{ position:relative; z-index:2; }
  .hz-hero-orb{
    width:64px; height:64px;
    margin:0 auto 1rem;
    border-radius:50%;
    background:rgba(255,255,255,.1);
    border:1px solid rgba(255,255,255,.2);
    display:flex; align-items:center; justify-content:center;
    font-size:1.7rem;
    color:var(--hz-gold);
    backdrop-filter:blur(2px);
  }
  .hz-hero h1{
    font-size:clamp(1.9rem, 3.6vw, 2.5rem);
    font-weight:700;
    color:#fff;
    margin-bottom:.5rem;
  }
  .hz-hero p{
    color:rgba(255,255,255,.82);
    font-size:1.02rem;
    margin-bottom:0;
  }

  /* ---------- Chat card ---------- */
  .hz-chat-wrap{ padding:3.5rem 0; }
  .hz-chat-card{
    background:var(--hz-card);
    border:1px solid var(--hz-line);
    border-radius:22px;
    box-shadow:0 24px 60px rgba(6,42,29,.12);
    overflow:hidden;
  }

  /* ---------- Chat header ---------- */
  .hz-chat-header{
    position:relative;
    display:flex;
    align-items:center;
    gap:.9rem;
    padding:1.1rem 1.4rem;
    background:linear-gradient(135deg, var(--hz-emerald-700), var(--hz-emerald-800));
    overflow:hidden;
  }
  .hz-chat-header .hz-star-field{ position:absolute; inset:0; opacity:.3; }
  .hz-chat-header > *{ position:relative; z-index:2; }
  .hz-chat-avatar{
    width:44px; height:44px;
    border-radius:50%;
    background:linear-gradient(135deg, var(--hz-gold-soft), var(--hz-gold));
    display:flex; align-items:center; justify-content:center;
    flex-shrink:0;
  }
  .hz-chat-avatar i{ color:var(--hz-emerald-950); font-size:1.25rem; }
  .hz-chat-title{ color:#fff; font-weight:700; font-size:.98rem; font-family:'Inter',sans-serif; }
  .hz-chat-sub{ color:rgba(255,255,255,.75); font-size:.8rem; display:flex; align-items:center; gap:.4rem; }
  .hz-status-dot{
    width:7px; height:7px;
    border-radius:50%;
    background:#5FD98A;
    box-shadow:0 0 0 3px rgba(95,217,138,.25);
    flex-shrink:0;
  }
  .hz-clear-btn{
    margin-left:auto;
    display:inline-flex;
    align-items:center;
    gap:.4rem;
    font-family:'Inter',sans-serif;
    font-weight:600;
    font-size:.82rem;
    color:#fff;
    background:rgba(255,255,255,.1);
    border:1px solid rgba(255,255,255,.28);
    border-radius:999px;
    padding:.45rem .95rem;
    cursor:pointer;
    transition:background .18s ease, transform .18s ease;
  }
  .hz-clear-btn:hover{ background:rgba(255,255,255,.2); transform:translateY(-1px); color:#fff; }

  /* ---------- Messages area ---------- */
  #chatMessages{
    padding:1.5rem;
    background:
      radial-gradient(circle at 15% 8%, rgba(201,162,77,.06), transparent 40%),
      var(--hz-cream);
    min-height:380px;
    max-height:500px;
    overflow-y:auto;
    scroll-behavior:smooth;
  }
  #chatMessages::-webkit-scrollbar{ width:8px; }
  #chatMessages::-webkit-scrollbar-thumb{ background:var(--hz-line); border-radius:999px; }

  .hz-msg-row{
    display:flex;
    gap:.6rem;
    margin-bottom:1.1rem;
    align-items:flex-start;
  }
  .hz-msg-row.is-user{ flex-direction:row-reverse; }

  .hz-avatar{
    width:32px; height:32px;
    border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    flex-shrink:0;
    font-size:.85rem;
  }
  .hz-avatar.is-bot{ background:linear-gradient(135deg, var(--hz-emerald-700), var(--hz-emerald-800)); color:#fff; }
  .hz-avatar.is-user{ background:var(--hz-gold); color:var(--hz-emerald-950); }

  .hz-bubble{
    max-width:78%;
    padding:.85rem 1.05rem;
    font-size:.9rem;
    line-height:1.6;
    white-space:pre-wrap;
    border-radius:16px;
  }
  .hz-bubble.is-bot{
    background:#fff;
    border:1px solid var(--hz-line);
    color:var(--hz-ink);
    border-top-left-radius:4px;
    box-shadow:0 2px 10px rgba(6,42,29,.05);
  }
  .hz-bubble.is-bot strong{ color:var(--hz-emerald-800); }
  .hz-bubble.is-user{
    background:linear-gradient(135deg, var(--hz-emerald-700), var(--hz-emerald-800));
    color:#fff;
    border-top-right-radius:4px;
    box-shadow:0 6px 16px rgba(15,107,69,.22);
  }
  .hz-msg-time{
    font-size:.68rem;
    margin-top:.35rem;
  }
  .hz-bubble.is-bot .hz-msg-time{ color:var(--hz-ink-soft); }
  .hz-bubble.is-user .hz-msg-time{ color:rgba(255,255,255,.75); }

  /* ---------- Typing indicator ---------- */
  .hz-typing-dots{
    display:inline-flex;
    gap:3px;
    vertical-align:middle;
    margin-left:.3rem;
  }
  .hz-typing-dots span{
    width:5px; height:5px;
    border-radius:50%;
    background:var(--hz-emerald-600);
    opacity:.4;
    animation:hzBlink 1.1s infinite ease-in-out;
  }
  .hz-typing-dots span:nth-child(2){ animation-delay:.15s; }
  .hz-typing-dots span:nth-child(3){ animation-delay:.3s; }
  @keyframes hzBlink{ 0%,80%,100%{ opacity:.25; transform:scale(.85); } 40%{ opacity:1; transform:scale(1); } }

  /* ---------- Input footer ---------- */
  .hz-chat-footer{
    padding:1.1rem 1.4rem 1.3rem;
    background:#fff;
    border-top:1px solid var(--hz-line);
  }
  #chatForm{ display:flex; gap:.6rem; }
  .hz-page #chatInput{
    flex:1;
    border:1px solid var(--hz-line);
    border-radius:999px;
    padding:.75rem 1.2rem;
    font-size:.92rem;
    background:var(--hz-cream);
    color:var(--hz-ink);
    transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
  }
  .hz-page #chatInput:focus{
    outline:none;
    background:#fff;
    border-color:var(--hz-emerald-600);
    box-shadow:0 0 0 .2rem rgba(21,128,85,.12);
  }
  .hz-page #chatInput::placeholder{ color:#9aa39c; }
  .hz-send-btn{
    width:46px; height:46px;
    flex-shrink:0;
    border:none;
    border-radius:50%;
    background:linear-gradient(135deg, var(--hz-emerald-700), var(--hz-emerald-800));
    color:#fff;
    display:flex; align-items:center; justify-content:center;
    font-size:1.05rem;
    cursor:pointer;
    box-shadow:0 8px 18px rgba(15,107,69,.28);
    transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease;
  }
  .hz-send-btn:hover:not(:disabled){ transform:translateY(-2px) scale(1.03); box-shadow:0 12px 24px rgba(15,107,69,.34); }
  .hz-send-btn:disabled{ opacity:.55; cursor:default; transform:none; }

  .hz-chat-tip{
    display:flex;
    align-items:center;
    gap:.4rem;
    color:var(--hz-ink-soft);
    font-size:.78rem;
    margin:.8rem 0 0;
  }
  .hz-chat-tip i{ color:var(--hz-gold); }

  .hz-reveal{ opacity:0; transform:translateY(18px); transition:opacity .6s ease, transform .6s ease; }
  .hz-reveal.hz-in{ opacity:1; transform:translateY(0); }

  @media (prefers-reduced-motion: reduce){
    .hz-reveal{ opacity:1; transform:none; transition:none; }
    .hz-typing-dots span{ animation:none; }
  }
