.chat-window{z-index:10000;box-sizing:border-box;background:#fff;border:1px solid #00000014;border-radius:16px;flex-direction:column;width:420px;max-width:calc(100vw - 16px);height:520px;max-height:calc(100dvh - 30px);display:flex;position:fixed;top:50%;left:50%;overflow:hidden;transform:translate(-50%,-50%);box-shadow:0 4px 25px #0000002e}@media (min-width:768px){.chat-window{height:570px;top:calc(50% + 40px)}}@media (max-width:480px){.chat-window{border-radius:14px;width:calc(100vw - 12px);max-width:calc(100vw - 12px);height:calc(100dvh - 24px);max-height:86vh}}.chat-header{background:#00000005;border-bottom:1px solid #00000014;flex-shrink:0;justify-content:space-between;align-items:center;padding:12px 15px;display:flex}.chat-business-info{align-items:center;gap:10px;display:flex}.chat-logo{border:1px solid #0000001a;border-radius:10px;flex-shrink:0;width:40px;height:40px;overflow:hidden}.chat-logo img{object-fit:cover;width:100%;height:100%}.logo-placeholder-chat{color:#fff;background:linear-gradient(135deg,#4a90e2,#9b59b6);justify-content:center;align-items:center;width:100%;height:100%;font-size:1.2rem;font-weight:700;display:flex}.chat-business-info h4{color:#333;margin:0;font-size:1rem;font-weight:700}.chat-business-info span{color:#666;font-size:.8rem}.close-chat{color:#333;cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;width:30px;height:30px;padding:5px;font-size:1.5rem;transition:all .3s;display:flex}.close-chat:hover{background:#0000000d;transform:scale(1.1)}.chat-body{flex-direction:column;flex:1;display:flex;position:relative;overflow:hidden}.chat-loading,.login-prompt,.no-messages{color:#666;text-align:center;justify-content:center;align-items:center;height:100%;padding:20px;display:flex}.messages-container{-webkit-overflow-scrolling:touch;background:#f8f9fa;flex-direction:column;flex:1;min-height:0;padding:10px;display:flex;overflow:hidden auto}.message{width:100%;margin-bottom:8px;display:flex}.own-message{justify-content:flex-end}.other-message{justify-content:flex-start}.message-content{word-wrap:break-word;word-break:break-word;border-radius:8px;min-width:200px;max-width:95%;padding:4px 12px;line-height:1.2;position:relative;box-shadow:0 1px 2px #0000001a}.own-message .message-content{color:#000;background:#dcf8c6;border-radius:12px 12px 4px}.other-message .message-content{color:#000;background:#fff;border-radius:12px 12px 12px 4px}.message-content p{color:#1a2332;margin:0 0 6px;font-size:.95rem;font-weight:500;line-height:1.4}.message-meta-footer{justify-content:flex-end;align-items:center;gap:5px;margin-top:5px;display:flex}.message-time{color:#4b5563;opacity:.85;white-space:nowrap;font-size:.68rem;font-weight:500}.own-message .message-time{color:#1f2937}.message-status-ticks{letter-spacing:-1.5px;-webkit-user-select:none;user-select:none;align-items:center;font-size:.82rem;font-weight:700;line-height:1;display:inline-flex}.message-status-ticks.sent,.message-status-ticks.delivered{color:#9333ea}.message-status-ticks.seen{color:#059669}.chat-footer{z-index:10;box-sizing:border-box;background:#fffffffa;border-top:1px solid #00000014;flex-shrink:0;width:100%;padding:8px 10px;position:sticky;bottom:0}.message-form{box-sizing:border-box;align-items:center;gap:6px;width:100%;display:flex}.message-input{color:#333;box-sizing:border-box;background:#fff;border:1px solid #0000001f;border-radius:20px;outline:none;flex:1;min-width:0;height:38px;min-height:38px;padding:8px 12px;font-size:.9rem;font-weight:500;transition:all .2s}.message-input:focus{background:#fff;border-color:#4a90e2}.message-input::placeholder{color:#0006}.send-button{color:#fff;cursor:pointer;box-sizing:border-box;background:linear-gradient(135deg,#4a90e2,#9b59b6);border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:36px;min-width:36px;height:36px;min-height:36px;font-size:1rem;transition:all .2s;display:flex}.send-button:hover:not(:disabled){transform:scale(1.05);box-shadow:0 4px 15px #4a90e266}.send-button:disabled{opacity:.5;cursor:not-allowed}.invoice-download{margin:8px 0 5px}.download-invoice-btn{color:#fff;cursor:pointer;background:linear-gradient(135deg,#28a745,#20c997);border:none;border-radius:8px;align-items:center;gap:5px;padding:8px 12px;font-size:.8rem;transition:all .3s;display:flex}.download-invoice-btn:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 12px #28a7454d}.download-invoice-btn:disabled{opacity:.6;cursor:not-allowed;transform:none}.scroll-to-bottom-btn{color:#fff;cursor:pointer;z-index:100;background:linear-gradient(135deg,#4a90e2,#9b59b6);border:none;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;font-size:1.2rem;transition:all .3s;display:flex;position:absolute;bottom:20px;right:20px;box-shadow:0 2px 10px #0003}.scroll-to-bottom-btn:hover{transform:scale(1.1);box-shadow:0 4px 15px #4a90e266}.scroll-to-bottom-btn span{font-size:1.4rem;font-weight:700}@media (min-width:768px){.chat-header,.messages-container,.chat-footer{padding:15px}}.invoice-actions{flex-wrap:wrap;gap:10px;margin-top:10px;display:flex}.view-invoice-btn,.download-invoice-btn{cursor:pointer;border:none;border-radius:6px;padding:8px 16px;font-size:14px;font-weight:600;transition:all .3s}.view-invoice-btn{color:#4a90e2;background:#4a90e233;border:1px solid #4a90e24d}.view-invoice-btn:hover{background:#4a90e24d;transform:translateY(-1px)}.download-invoice-btn{color:#4caf50;background:#4caf5033;border:1px solid #4caf504d}.download-invoice-btn:hover:not(:disabled){background:#4caf504d;transform:translateY(-1px)}.download-invoice-btn:disabled{opacity:.5;cursor:not-allowed}.pdf-viewer-overlay{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:20000;box-sizing:border-box;background:#000000bf;justify-content:center;align-items:center;padding:16px;display:flex;position:fixed;inset:0}.pdf-viewer-modal{background:#fff;border-radius:12px;flex-direction:column;width:100%;max-width:860px;height:92vh;max-height:92vh;display:flex;overflow:hidden;box-shadow:0 20px 60px #00000073}.pdf-viewer-header{background:linear-gradient(135deg,#1e40af 0%,#3b82f6 100%);flex-shrink:0;justify-content:space-between;align-items:center;padding:12px 20px;display:flex}.pdf-viewer-header h3{color:#fff;letter-spacing:.3px;margin:0;font-size:1.05rem;font-weight:600}.pdf-header-actions{align-items:center;gap:10px;display:flex}.download-pdf-modal-btn{color:#fff;cursor:pointer;background:#fff3;border:1px solid #ffffff59;border-radius:6px;align-items:center;gap:6px;padding:6px 14px;font-size:.85rem;font-weight:600;transition:all .2s;display:flex}.download-pdf-modal-btn:hover{background:#ffffff4d;transform:translateY(-1px)}.close-pdf-btn{color:#fff;cursor:pointer;background:#ffffff26;border:1px solid #ffffff40;border-radius:6px;padding:6px 14px;font-size:.85rem;font-weight:600;transition:all .2s}.close-pdf-btn:hover{background:#ffffff40;transform:translateY(-1px)}.pdf-viewer-iframe{background:#525659;border:none;flex:1;width:100%;height:100%;min-height:0}@media (max-width:768px){.pdf-viewer-overlay{padding:8px}.pdf-viewer-modal{width:98%;height:94vh;max-height:94vh}.pdf-viewer-header{padding:10px 14px}.pdf-viewer-header h3{font-size:.95rem}.invoice-actions{flex-direction:column}.view-invoice-btn,.download-invoice-btn{width:100%}}.chat-media-image-container{cursor:pointer;background:#0000000d;border-radius:12px;max-width:260px;margin-bottom:6px;overflow:hidden}.chat-image-thumbnail{object-fit:cover;width:100%;max-height:220px;transition:transform .2s;display:block}.chat-image-thumbnail:hover{transform:scale(1.02)}.chat-media-video-container{background:#000;border-radius:12px;max-width:280px;margin-bottom:6px;overflow:hidden}.chat-video-player{border-radius:12px;outline:none;width:100%;max-height:220px;display:block}.voice-note-player{border-radius:14px;align-items:center;gap:8px;min-width:200px;max-width:260px;padding:6px 10px;display:flex}.voice-play-btn{color:#2563eb;cursor:pointer;background:#fff;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:34px;height:34px;font-size:.9rem;transition:transform .15s;display:flex;box-shadow:0 2px 5px #00000026}.voice-play-btn:hover{transform:scale(1.08)}.voice-own .voice-play-btn{color:#1d4ed8;background:#fff}.voice-other .voice-play-btn{color:#fff;background:#2563eb}.voice-waveform-container{flex-direction:column;flex:1;gap:2px;display:flex}.voice-scrubber{appearance:none;cursor:pointer;border-radius:4px;outline:none;width:100%;height:4px}.voice-scrubber::-webkit-slider-thumb{appearance:none;cursor:pointer;background:#fff;border:1px solid #0003;border-radius:50%;width:10px;height:10px}.voice-time-display{opacity:.85;justify-content:space-between;margin-top:2px;font-size:.68rem;font-weight:500;display:flex}.voice-mic-icon{opacity:.7;font-size:1rem}.chat-doc-card{background:#0000000a;border:1px solid #0000000f;border-radius:10px;align-items:center;gap:10px;max-width:280px;margin-bottom:6px;padding:8px 10px;display:flex}.own-message .chat-doc-card{background:#0000000a;border-color:#00000014}.doc-icon-badge{flex-shrink:0;justify-content:center;align-items:center;font-size:1.6rem;display:flex}.doc-info{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.doc-name{white-space:nowrap;text-overflow:ellipsis;color:#1f2937;font-size:.82rem;font-weight:600;overflow:hidden}.doc-size{color:#6b7280;font-size:.7rem}.doc-actions-vertical{flex-direction:column;flex-shrink:0;justify-content:center;align-items:center;gap:6px;display:flex}.doc-icon-btn{cursor:pointer;border:none;border-radius:50%;justify-content:center;align-items:center;width:30px;height:30px;font-size:14px;text-decoration:none;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex;box-shadow:0 1px 3px #0000001a}.doc-icon-btn:hover:not(:disabled){transform:scale(1.12);box-shadow:0 3px 6px #00000029}.doc-icon-btn:disabled{opacity:.55;cursor:not-allowed}.doc-icon-preview{color:#7c3aed;background:#ede9fe}.doc-icon-preview:hover:not(:disabled){color:#fff;background:#7c3aed}.doc-icon-download{color:#15803d;background:#dcfce7}.doc-icon-download:hover:not(:disabled){color:#fff;background:#16a34a}.chat-upload-status{color:#1d4ed8;background:#eff6ff;border-top:1px solid #bfdbfe;align-items:center;gap:6px;padding:6px 12px;font-size:.75rem;font-weight:500;display:flex}.upload-spinner{animation:1s linear infinite spin}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.attach-toggle-btn{color:#475569;cursor:pointer;box-sizing:border-box;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:36px;min-width:36px;height:36px;min-height:36px;font-size:1rem;transition:all .2s;display:flex}.attach-toggle-btn:hover,.attach-toggle-btn.active{color:#fff;background:#3b82f6;border-color:#3b82f6;transform:scale(1.05)}.mic-button{color:#fff;cursor:pointer;box-sizing:border-box;background:#2563eb;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:36px;min-width:36px;height:36px;min-height:36px;font-size:1rem;transition:all .2s;display:flex;box-shadow:0 2px 6px #2563eb59}.mic-button:hover{background:#1d4ed8;transform:scale(1.08)}.attach-menu-overlay{z-index:100;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);background:#0000004d;border-radius:0 0 16px 16px;align-items:flex-end;display:flex;position:absolute;inset:0}.attach-menu-sheet{box-sizing:border-box;background:#fff;border-top:1px solid #00000014;border-radius:14px 14px 16px 16px;width:100%;padding:10px 14px 12px;animation:.2s ease-out slideUp;box-shadow:0 -4px 18px #0000001f}@keyframes slideUp{0%{transform:translateY(100%)}to{transform:translateY(0)}}.attach-menu-header{color:#64748b;text-transform:uppercase;letter-spacing:.5px;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:.72rem;font-weight:700;display:flex}.attach-menu-close-btn{color:#64748b;cursor:pointer;background:#f1f5f9;border:none;border-radius:50%;justify-content:center;align-items:center;width:22px;height:22px;font-size:.7rem;font-weight:700;transition:all .2s;display:flex}.attach-menu-close-btn:hover{color:#0f172a;background:#e2e8f0}.attach-menu-grid{justify-content:space-around;align-items:center;gap:12px;padding:2px 0 4px;display:flex}.attach-item-btn{cursor:pointer;background:0 0;border:none;border-radius:10px;flex-direction:column;align-items:center;gap:4px;padding:4px 8px;transition:all .2s;display:flex}.attach-circle-icon{border-radius:50%;justify-content:center;align-items:center;width:40px;min-width:40px;height:40px;min-height:40px;font-size:1.15rem;transition:all .2s;display:flex;box-shadow:0 2px 5px #0000000f}.photo-btn .attach-circle-icon{background:#eff6ff;border:1.5px solid #bfdbfe}.video-btn .attach-circle-icon{background:#fdf2f8;border:1.5px solid #fbcfe8}.doc-btn .attach-circle-icon{background:#ecfdf5;border:1.5px solid #a7f3d0}.attach-item-btn:hover .attach-circle-icon{transform:translateY(-2px)scale(1.05)}.photo-btn:hover .attach-circle-icon{background:#3b82f6;border-color:#3b82f6}.video-btn:hover .attach-circle-icon{background:#ec4899;border-color:#ec4899}.doc-btn:hover .attach-circle-icon{background:#10b981;border-color:#10b981}.attach-label{color:#334155;font-size:.72rem;font-weight:600}.attach-hint{color:#94a3b8;font-size:.6rem;font-weight:500}.recording-bar{background:#fef2f2;border:1px solid #fee2e2;border-radius:20px;justify-content:space-between;align-items:center;width:100%;padding:4px 6px;animation:1.5s ease-in-out infinite pulseRecording;display:flex}.recording-indicator{align-items:center;gap:6px;display:flex}.recording-dot{background:#ef4444;border-radius:50%;width:10px;height:10px;animation:1s infinite alternate blink}@keyframes blink{0%{opacity:1}to{opacity:.2}}.recording-time{color:#b91c1c;font-size:.85rem;font-weight:700}.recording-wave-anim{align-items:center;gap:3px;height:16px;display:flex}.recording-wave-anim span{background:#ef4444;border-radius:2px;width:3px;height:100%;animation:.8s ease-in-out infinite waveBar}.recording-wave-anim span:first-child{animation-delay:.1s}.recording-wave-anim span:nth-child(2){animation-delay:.3s}.recording-wave-anim span:nth-child(3){animation-delay:.2s}.recording-wave-anim span:nth-child(4){animation-delay:.4s}.recording-wave-anim span:nth-child(5){animation-delay:.15s}@keyframes waveBar{0%,to{transform:scaleY(.3)}50%{transform:scaleY(1)}}.recording-actions{align-items:center;gap:6px;display:flex}.cancel-record-btn{cursor:pointer;background:0 0;border:none;border-radius:50%;padding:4px;font-size:1.1rem;transition:transform .15s}.cancel-record-btn:hover{transform:scale(1.15)}.send-record-btn{color:#fff;cursor:pointer;background:#10b981;border:none;border-radius:50%;justify-content:center;align-items:center;width:32px;height:32px;font-size:.95rem;transition:transform .15s;display:flex;box-shadow:0 2px 6px #10b98159}.send-record-btn:hover{transform:scale(1.08)}.image-lightbox-overlay{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);z-index:20000;background:#000000d9;justify-content:center;align-items:center;padding:16px;animation:.2s ease-out fadeIn;display:flex;position:fixed;inset:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.image-lightbox-modal{background:#1e293b;border-radius:12px;flex-direction:column;max-width:90vw;max-height:90vh;display:flex;overflow:hidden;box-shadow:0 20px 50px #00000080}.image-lightbox-header{color:#fff;background:#0f172a;justify-content:space-between;align-items:center;padding:10px 16px;display:flex}.image-title{white-space:nowrap;text-overflow:ellipsis;max-width:60%;font-size:.85rem;font-weight:600;overflow:hidden}.image-lightbox-actions{align-items:center;gap:8px;display:flex}.download-image-btn{color:#fff;background:#3b82f6;border-radius:6px;padding:5px 12px;font-size:.8rem;font-weight:600;text-decoration:none;transition:background .15s}.download-image-btn:hover{background:#2563eb}.close-lightbox-btn{color:#fff;cursor:pointer;background:#ffffff26;border:none;border-radius:6px;padding:5px 10px;font-size:.85rem;font-weight:700}.close-lightbox-btn:hover{background:#ffffff40}.image-lightbox-body{justify-content:center;align-items:center;max-height:calc(90vh - 60px);padding:10px;display:flex;overflow:auto}.image-lightbox-body img{object-fit:contain;border-radius:6px;max-width:100%;max-height:calc(85vh - 60px)}
