.shan-chat, .shan-chat * { box-sizing: border-box; }
  .shan-chat {
    --shan-chat-green: #1f5a3a;
    --shan-chat-green-dark: #143d28;
    --shan-chat-milk: #f6faf4;
    --shan-chat-gold: #e3a417;
    --shan-chat-ink: #1c2a22;
    --shan-chat-muted: #62736a;
    --shan-chat-line: #dbe5dc;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--shan-chat-ink);
  }

  /* Sticky tab on the right wall */
  .shan-chat-tab {
    position: fixed; right: 0; top: 50%;
    transform: translateY(-50%);
    z-index: 99998;
    display: flex; align-items: center; gap: 10px;
    padding: 16px 11px;
    background: var(--shan-chat-green);
    color: #fff; border: 0; cursor: pointer;
    border-radius: 12px 0 0 12px;
    box-shadow: -3px 4px 18px rgba(20, 61, 40, .35);
    writing-mode: vertical-rl;
    font: 600 14px/1 "Segoe UI", system-ui, Arial, sans-serif;
    letter-spacing: .4px;
    transition: padding .2s ease, background .2s ease;
  }
  .shan-chat-tab:hover { background: var(--shan-chat-green-dark); padding-right: 16px; }
  .shan-chat-tab svg { width: 20px; height: 20px; flex: none; fill: var(--shan-chat-gold); writing-mode: horizontal-tb; }
  .shan-chat-tab:focus-visible, .shan-chat button:focus-visible, .shan-chat input:focus-visible,
  .shan-chat select:focus-visible, .shan-chat textarea:focus-visible { outline: 3px solid var(--shan-chat-gold); outline-offset: 2px; }
  .shan-chat.shan-chat-open .shan-chat-tab { display: none; }

  /* Panel */
  .shan-chat-panel {
    position: fixed; right: 0; top: 50%;
    z-index: 999999;
    width: 390px; max-width: 100vw;
    height: min(640px, calc(100vh - 32px));
    transform: translate(105%, -50%);
    visibility: hidden;
    display: flex; flex-direction: column;
    background: #fff;
    border-radius: 16px 0 0 16px;
    box-shadow: -8px 10px 40px rgba(20, 40, 30, .28);
    overflow: hidden;
    transition: transform .3s ease, visibility .3s;
  }
  .shan-chat.shan-chat-open .shan-chat-panel { transform: translate(0, -50%); visibility: visible; }

  .shan-chat-head {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    background: var(--shan-chat-green); color: #fff;
    justify-content: space-between;
  }
  .shan-chat-logo {
    width: 150px;  flex: none;
    background: #fff; border-radius: 10px; padding: 4px;
    display: flex; align-items: center; justify-content: center;
  }
  .shan-chat-logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
  .shan-chat-title { flex: 1; min-width: 0; }
  .shan-chat-title strong { display: block; font-size: 15px; line-height: 1.25; }
  .shan-chat-title span { font-size: 12px; opacity: .85; }
  .shan-chat-title span::before {
    content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px;
    border-radius: 50%; background: #6fe39a;
  }
  .shan-chat-close {
    width: 34px; height: 34px; flex: none; border: 0; border-radius: 8px; cursor: pointer;
    background: rgba(255,255,255,.14); color: #fff; font-size: 22px; line-height: 1;
  }
  .shan-chat-close:hover { background: rgba(255,255,255,.26); }

  /* Messages */
  .shan-chat-body {
    flex: 1; overflow-y: auto; padding: 16px 14px 8px;
    background: var(--shan-chat-milk);
    scroll-behavior: smooth;
  }
  .shan-chat-msg { display: flex; margin-bottom: 10px; }
  .shan-chat-msg-bot { justify-content: flex-start; }
  .shan-chat-msg-user { justify-content: flex-end; }
  .shan-chat-bubble {
    max-width: 86%; padding: 10px 13px; border-radius: 14px;
    word-wrap: break-word; overflow-wrap: anywhere;
  }
  .shan-chat-msg-bot .shan-chat-bubble {
    background: #fff; border: 1px solid var(--shan-chat-line); border-bottom-left-radius: 4px;
  }
  .shan-chat-msg-user .shan-chat-bubble {
    background: var(--shan-chat-green); color: #fff; border-bottom-right-radius: 4px;
  }
  .shan-chat-bubble p { margin: 0 0 6px; }
  .shan-chat-bubble p:last-child { margin-bottom: 0; }
  .shan-chat-bubble ul { margin: 4px 0 0; padding-left: 18px; }
  .shan-chat-bubble a { color: var(--shan-chat-green); font-weight: 600; }
  .shan-chat-bubble .shan-chat-link-btn {
    display: inline-block; margin-top: 8px; padding: 7px 12px; border-radius: 8px;
    background: var(--shan-chat-green); color: #fff; text-decoration: none; font-size: 13px;
  }
  .shan-chat-bubble .shan-chat-link-btn:hover { background: var(--shan-chat-green-dark); }

  .shan-chat-typing .shan-chat-bubble { display: flex; gap: 4px; padding: 13px 14px; }
  .shan-chat-typing i {
    width: 7px; height: 7px; border-radius: 50%; background: var(--shan-chat-muted);
    animation: shan-chat-blink 1s infinite ease-in-out;
  }
  .shan-chat-typing i:nth-child(2) { animation-delay: .15s; }
  .shan-chat-typing i:nth-child(3) { animation-delay: .3s; }
  @keyframes shan-chat-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

  /* Quick replies */
  .shan-chat-quick {
    display: flex; flex-wrap: wrap; gap: 7px;
    padding: 8px 14px 4px; background: var(--shan-chat-milk);
  }
  .shan-chat-chip {
    border: 1px solid var(--shan-chat-green); background: #fff; color: var(--shan-chat-green);
    padding: 6px 12px; border-radius: 999px; font: 600 13px/1.2 inherit; cursor: pointer;
    transition: background .15s, color .15s;
  }
  .shan-chat-chip:hover { background: var(--shan-chat-green); color: #fff; }
  .shan-chat-chip-gold { border-color: var(--shan-chat-gold); background: var(--shan-chat-gold); color: #3a2900; }
  .shan-chat-chip-gold:hover { background: #c98f0d; color: #fff; }

  /* Input row */
  .shan-chat-inputbar {
    display: flex; gap: 8px; padding: 10px 14px 12px;
    background: var(--shan-chat-milk); border-top: 1px solid var(--shan-chat-line);
  }
  .shan-chat-input {
    flex: 1; min-width: 0; padding: 10px 12px; font: inherit; font-size: 14px;
    border: 1px solid var(--shan-chat-line); border-radius: 10px; background: #fff; color: var(--shan-chat-ink);
  }
  .shan-chat-send {
    width: 42px; flex: none; border: 0; border-radius: 10px; cursor: pointer;
    background: var(--shan-chat-green); display: flex; align-items: center; justify-content: center;
  }
  .shan-chat-send:hover { background: var(--shan-chat-green-dark); }
  .shan-chat-send svg { width: 18px; height: 18px; fill: #fff; }

  .shan-chat-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 8px 14px; background: #fff; border-top: 1px solid var(--shan-chat-line);
    font-size: 12px; color: var(--shan-chat-muted);
  }
  .shan-chat-foot button {
    border: 0; background: none; padding: 0; cursor: pointer;
    font: 700 12px/1 inherit; color: var(--shan-chat-green); text-decoration: underline;
  }

  /* Enquiry form (end of the chatbot) */
  .shan-chat-formview {
    position: absolute; inset: 0; z-index: 3;
    display: flex; flex-direction: column; background: #fff;
    transform: translateY(102%); visibility: hidden;
    transition: transform .3s ease, visibility .3s;
  }
  .shan-chat-formview.shan-chat-formview-on { transform: translateY(0); visibility: visible; }
  .shan-chat-formhead {
    display: flex; align-items: center; gap: 10px; padding: 13px 16px;
    background: var(--shan-chat-gold); color: #3a2900;
  }
  .shan-chat-formhead strong { flex: 1; font-size: 15px; }
  .shan-chat-back {
    border: 0; background: rgba(58,41,0,.12); color: #3a2900; width: 32px; height: 32px;
    border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1;
  }
  .shan-chat-form { flex: 1; overflow-y: auto; padding: 14px 16px 18px; }
  .shan-chat-form p.shan-chat-note { margin: 0 0 12px; color: var(--shan-chat-muted); font-size: 13px; }
  .shan-chat-field { margin-bottom: 11px; }
  .shan-chat-field label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 13px; }
  .shan-chat-field input, .shan-chat-field select, .shan-chat-field textarea {
    width: 100%; padding: 10px 11px; font: inherit; font-size: 14px; color: var(--shan-chat-ink);
    border: 1px solid #c4d1c7; border-radius: 9px; background: #fff;
  }
  .shan-chat-field textarea { min-height: 78px; resize: vertical; }
  .shan-chat-field.shan-chat-invalid input, .shan-chat-field.shan-chat-invalid select { border-color: #c0392b; }
  .shan-chat-err { display: none; margin-top: 3px; color: #c0392b; font-size: 12px; }
  .shan-chat-field.shan-chat-invalid .shan-chat-err { display: block; }
  .shan-chat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .shan-chat-submit {
    width: 100%; padding: 12px; border: 0; border-radius: 10px; cursor: pointer;
    background: var(--shan-chat-green); color: #fff; font: 700 15px/1 inherit;
  }
  .shan-chat-submit:hover { background: var(--shan-chat-green-dark); }
  .shan-chat-submit[disabled] { opacity: .6; cursor: wait; }
  .shan-chat-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

  /* Responsive */
  @media (max-width: 480px) {
    .shan-chat-panel {
      width: 100vw; height: 100vh; height: 100dvh; top: 0; border-radius: 0;
      transform: translate(105%, 0);
    }
    .shan-chat.shan-chat-open .shan-chat-panel { transform: translate(0, 0); }
    .shan-chat-tab { padding: 13px 8px; font-size: 13px; }
    .shan-chat-row { grid-template-columns: 1fr; gap: 0; }
    .shan-chat-bubble { max-width: 90%; }
    .shan-chat-input, .shan-chat-field input, .shan-chat-field select, .shan-chat-field textarea { font-size: 16px; }
    
    #mff{
        grid-template-columns: 1fr 1fr;
        gap: 10;
    }
    .nice-select.open .list{
        height: 200px;
  overflow-y: auto !important;
    }
  }
  @media (max-height: 520px) and (min-width: 481px) {
    .shan-chat-panel { height: calc(100vh - 12px); }
  }
  @media (prefers-reduced-motion: reduce) {
    .shan-chat *, .shan-chat-panel, .shan-chat-formview { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  }
  
  
  @media only screen and (min-width: 1200px) and (max-width: 1319px) {
  .shan-chat-tab {

  top: 47%;
  }
  }
  
  
    .nice-select.open .list{
        height: 200px;
  overflow-y: auto !important;
    }