/* Floating private-chatroom widget: only visible to customers who booked.
   Bubble hides on X and reappears after 30 minutes. */
#twrChatBubble{position:fixed;right:18px;bottom:18px;z-index:9998;display:none}
#twrChatBubble.show{display:block;animation:twrCbPop .25s ease}
@keyframes twrCbPop{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}
#twrChatBubble .twr-cb-btn{width:60px;height:60px;border-radius:50%;border:none;cursor:pointer;
  background:linear-gradient(135deg,#166534,#4D7C0F);color:#fff;font-size:24px;
  box-shadow:0 6px 20px rgba(22,101,52,.45);display:flex;align-items:center;justify-content:center;
  transition:transform .15s ease}
#twrChatBubble .twr-cb-btn:hover{transform:scale(1.07)}
#twrChatBubble .twr-cb-btn::after{content:'';position:absolute;width:60px;height:60px;border-radius:50%;
  border:2px solid #4D7C0F;animation:twrCbPing 2.2s ease-out infinite;pointer-events:none}
@keyframes twrCbPing{0%{transform:scale(1);opacity:.7}70%{transform:scale(1.45);opacity:0}100%{opacity:0}}
#twrChatBubble .twr-cb-x{position:absolute;top:-8px;right:-6px;width:24px;height:24px;border-radius:50%;
  border:none;background:#1f2937;color:#fff;font-size:14px;line-height:1;cursor:pointer;z-index:2;
  box-shadow:0 2px 6px rgba(0,0,0,.3);display:flex;align-items:center;justify-content:center;padding:0}
#twrChatPanel{position:fixed;top:0;right:0;bottom:0;width:100%;max-width:400px;z-index:9999;background:#fff;
  transform:translateX(105%);transition:transform .28s ease;box-shadow:-8px 0 30px rgba(0,0,0,.18)}
#twrChatPanel.open{transform:translateX(0)}
.twr-cp-head{position:absolute;top:0;left:0;right:0;height:56px;background:linear-gradient(135deg,#166534,#4D7C0F);color:#fff;padding:0 12px;
  display:flex;align-items:center;gap:10px;box-sizing:border-box}
.twr-cp-head .twr-cp-dot{width:10px;height:10px;border-radius:50%;background:#4ade80;flex:none;
  box-shadow:0 0 6px #4ade80}
.twr-cp-head .twr-cp-title{font-weight:600;font-size:15px;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.twr-cp-head select{max-width:130px;border-radius:8px;border:none;padding:4px 6px;font-size:12px;color:#14532d}
.twr-cp-head .twr-cp-close{background:rgba(255,255,255,.18);border:none;color:#fff;width:32px;height:32px;
  border-radius:50%;font-size:16px;cursor:pointer;flex:none}
.twr-cp-head .twr-cp-close:hover{background:rgba(255,255,255,.32)}
#twrChatPanel iframe{position:absolute;top:56px;left:0;right:0;bottom:0;width:100%;height:calc(100% - 56px);
  border:0;display:block;background:#f8fafc;overscroll-behavior:contain}
.twr-lead{position:absolute;top:56px;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;
  background:#f8fafc;padding:20px;overflow-y:auto;box-sizing:border-box;overscroll-behavior:contain}
.twr-lead-card{background:#fff;border-radius:16px;padding:24px 20px;max-width:320px;width:100%;box-shadow:0 4px 16px rgba(0,0,0,.08);text-align:center}
.twr-lead-card h4{color:#166534;margin:0 0 8px;font-size:18px}
.twr-lead-card p{color:#6b7280;font-size:13px;margin:0 0 16px;line-height:1.5}
.twr-lead-card input{width:100%;box-sizing:border-box;border:1.5px solid #e5e7eb;border-radius:10px;padding:10px 12px;font-size:14px;margin-bottom:10px;outline:none;font-family:inherit}
.twr-lead-card input:focus{border-color:#4D7C0F}
.twr-lead-card button#twrLeadGo{width:100%;border:none;border-radius:10px;padding:11px;background:linear-gradient(135deg,#166534,#4D7C0F);color:#fff;font-size:15px;font-weight:600;cursor:pointer}
.twr-lead-card button#twrLeadGo:disabled{opacity:.6;cursor:default}
.twr-lead-err{color:#dc2626;font-size:12px;min-height:18px;margin-top:8px}
@media(max-width:480px){
  #twrChatBubble{right:14px;bottom:14px}
  #twrChatBubble .twr-cb-btn{width:56px;height:56px;font-size:22px}
}
