:root {
--brand-color: #3993d5;
--dark-btn: #1e293b;
--text-main: #0f172a;
--text-sub: #94a3b8;
--green-status: #22c55e;
--gray-bg: #f4f7f6;
--gold: #F4C430;
--silver: #C0C0C0;
--red-clear: #e74c3c;
}
.smart-launcher-wrapper {
position: fixed;
bottom: 30px;
right: 30px;
z-index: 99999;
display: flex;
align-items: center;
gap: 12px;
font-family: 'Segoe UI', sans-serif;
}
.chat-pill-btn {
background: #fff;
height: 60px;
padding: 0 20px 0 10px;
border-radius: 35px;
box-shadow: 0 8px 24px rgba(0,0,0,0.12);
display: flex;
align-items: center;
gap: 12px;
cursor: pointer;
transition: transform 0.2s, box-shadow 0.2s;
border: 1px solid rgba(0,0,0,0.04);
}
.chat-pill-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.15); }
.pill-icon-box {
width: 42px; height: 42px;
background: var(--brand-color);
border-radius: 50%;
display: flex; align-items: center; justify-content: center;
position: relative;
flex-shrink: 0;
}
.pill-icon-box i { color: white; font-size: 20px; }
.status-dot {
position: absolute; bottom: 0; right: 0;
width: 12px; height: 12px;
background: var(--green-status);
border: 2px solid #fff;
border-radius: 50%;
}
.pill-text-col { display: flex; flex-direction: column; line-height: 1.2; }
.pill-title { font-weight: 700; color: var(--text-main); font-size: 15px; }
.pill-subtitle { font-size: 13px; color: var(--text-sub); font-weight: 500; }
.scroll-top-btn {
width: 0;
height: 50px;
overflow: hidden;
opacity: 0;
transform: scale(0.8);

background: var(--dark-btn);
border-radius: 50%;
display: flex; align-items: center; justify-content: center;
cursor: pointer;
color: white;
font-size: 18px;
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); 
}

.scroll-top-btn:hover { background: #000; transform: scale(1.1) !important; }
.smart-launcher-wrapper.scrolled .scroll-top-btn {
width: 50px;
opacity: 1;
transform: scale(1);
margin-left: 0;
}
.chat-container {
position: fixed; bottom: 20px; right: 20px; 
width: 40vw; min-width: 400px; max-width: 600px; height: 90vh;
background: #fff; border-radius: 16px; 
box-shadow: -5px 0 30px rgba(0,0,0,0.15);
display: none; flex-direction: column; z-index: 100000;
font-family: 'Segoe UI', sans-serif; overflow: hidden; border: 1px solid #e1e1e1;
}

@media (max-width: 768px) {
.chat-container { width: 100% !important; height: 100% !important; min-width: 0; top: 0; left: 0; right: 0; bottom: 0; border-radius: 0; border: none; }
.smart-launcher-wrapper { bottom: 20px; right: 20px; }
}
.province-screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: white; z-index: 20; display: flex; flex-direction: column; }
.prov-header { padding: 25px; text-align: center; border-bottom: 1px solid #eee; }
.prov-list { flex: 1; overflow-y: auto; padding: 15px; }
.prov-item { padding: 15px 20px; margin-bottom: 8px; border: 1px solid #eee; border-radius: 10px; cursor: pointer; transition: 0.2s; font-size: 16px; }
.prov-item:hover { background: var(--brand-color); color: white; border-color: var(--brand-color); }

.chat-screen { display: flex; flex-direction: column; height: 100%; position: relative; }
.chat-header { background: white; padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; z-index: 10; }
.current-prov { cursor: pointer; display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14px; color: #333; }
.current-prov:hover { color: var(--brand-color); }
.close-btn { cursor: pointer; font-size: 24px; color: #999; }
.close-btn:hover { color: #333; }
.chat-content-wrapper { position: relative; flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.chat-body { flex: 1; background: var(--gray-bg); padding: 20px; padding-bottom: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }
.clear-chat-btn {
position: absolute; bottom: 20px; right: 25px;
width: 36px; height: 36px; background: rgba(255, 255, 255, 0.95);
border: 1px solid #ddd; border-radius: 50%;
display: flex; align-items: center; justify-content: center;
cursor: pointer; color: #777; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
transition: all 0.2s; z-index: 50;
}
.clear-chat-btn:hover { background: var(--red-clear); color: white; border-color: var(--red-clear); }
.clear-tooltip {
position: absolute; right: 45px; top: 8px; background: #333; color: white;
padding: 4px 8px; border-radius: 4px; font-size: 11px; white-space: nowrap;
opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.clear-chat-btn:hover .clear-tooltip { opacity: 1; }
.msg-wrapper { display: flex; flex-direction: column; max-width: 85%; position: relative; margin-bottom: 15px; }
.msg-wrapper.bot { align-self: flex-start; }
.msg-wrapper.user { align-self: flex-end; }
.msg { padding: 12px 18px; border-radius: 14px; font-size: 15px; line-height: 1.5; box-shadow: 0 1px 3px rgba(0,0,0,0.05); white-space: pre-wrap; }
.msg.bot { background: #fff; color: #333; border-bottom-left-radius: 2px; }
.msg.user { background: var(--brand-color); color: white; border-bottom-right-radius: 2px; }

.copy-btn {
position: absolute; bottom: -14px; right: 0; width: 24px; height: 24px; 
background: white; border: 1px solid #ddd; border-radius: 50%; 
display: flex; align-items: center; justify-content: center;
cursor: pointer; font-size: 10px; color: #666; opacity: 0; transition: all 0.2s;
box-shadow: 0 2px 5px rgba(0,0,0,0.1); z-index: 5;
}
.msg-wrapper:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background: var(--brand-color); color: white; border-color: var(--brand-color); }
.copy-btn.copied { background: var(--green); color: white; border-color: var(--green); }
.lawyer-dock { background: #fff; border-top: 1px solid #eee; width: 100%; flex-shrink: 0; display: none; padding-bottom: 5px; z-index: 5; height: 195px; }
.lawyer-slider-container { display: flex; gap: 15px; overflow-x: auto; padding: 15px 20px; width: 100%; height: 100%; box-sizing: border-box; cursor: grab; scrollbar-width: none; align-items: center; }
.lawyer-card { min-width: 280px; max-width: 280px; background: #fff; border-radius: 12px; border: 1px solid #e0e0e0; padding: 15px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 3px 8px rgba(0,0,0,0.05); flex-shrink: 0; position: relative; transition: transform 0.2s; }
.lawyer-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.lawyer-card.gold { border: 1px solid var(--gold); background: #FFFDF5; }
.lawyer-card.silver { border: 1px solid var(--silver); }
.badge-free { position: absolute; top: -8px; right: -8px; background: #36d851; color: white; font-size: 10px; font-weight: bold; padding: 4px 8px; border-radius: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.15); z-index: 2; }
.lawyer-name { font-size: 15px; font-weight: 700; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lawyer-spec { font-size: 13px; color: #666; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 2.8em; line-height: 1.4; }
.lawyer-spec i { color: var(--brand-color); margin-right: 5px; }
.action-row { display: flex; gap: 10px; margin-top: 10px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; background: #f0f4f8; color: #555; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: all 0.2s; font-size: 15px; position: relative; }
.icon-btn:hover { background: var(--brand-color); color: white; }
.icon-btn.gold-web { color: #b8860b; background: #fff8dc; }
.icon-btn.gold-web:hover { background: #b8860b; color: white; }
.icon-btn.green-free { color: var(--green); background: #e6f4ea; }
.icon-btn.green-free:hover { background: #36d851; color: white; }
.icon-btn::after { content: attr(data-tooltip); position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.85); color: white; padding: 5px 10px; border-radius: 6px; font-size: 11px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 100; }
.icon-btn:hover::after { opacity: 1; }
.input-area { padding: 15px 20px 10px 20px; background: white; border-top: 1px solid #eee; display: flex; align-items: flex-end; gap: 10px; flex-shrink: 0; z-index: 10; position: relative; }
.chat-textarea { flex: 1; background: #f9f9f9; border: 1px solid #ddd; border-radius: 20px; padding: 12px 15px; font-size: 15px; outline: none; resize: none; max-height: 120px; font-family: inherit; line-height: 1.4; }
.chat-textarea:focus { border-color: var(--brand-color); background: white; }
.send-btn { width: 45px; height: 45px; background: var(--brand-color); color: white; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; }
.send-btn:hover { background: #2f7eb8; }
.typing-indicator { font-size: 11px; color: #999; margin-left: 20px; display: none; padding-top: 2px;}
.legal-disclaimer { font-size: 10px; color: #aaa; text-align: center; padding: 8px; background: #fff; flex-shrink: 0; }
.ai-tooltip {
position: absolute;
bottom: 75px;
right: 0;
width: 260px;
background: #fff;
border: 1px solid #e0e0e0;
border-radius: 12px;
padding: 12px 15px;
box-shadow: 0 5px 20px rgba(0,0,0,0.15);
z-index: 100000;
opacity: 0;
visibility: hidden;
transform: translateY(10px) scale(0.95);
transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
cursor: pointer;
display: flex;
flex-direction: column;
}
.ai-tooltip.visible {
opacity: 1;
visibility: visible;
transform: translateY(0) scale(1);
}

.tooltip-text {
color: #333;
font-size: 13px;
line-height: 1.4;
font-weight: 500;
font-family: 'Segoe UI', sans-serif;
}
.tooltip-close {
position: absolute;
top: 2px;
right: 5px;
font-size: 16px;
color: #999;
cursor: pointer;
padding: 0 5px;
line-height: 1;
z-index: 10;
}
.tooltip-close:hover { color: #333; }
.tooltip-arrow {
position: absolute;
bottom: -6px;
right: 100px;
width: 12px;
height: 12px;
background: white;
border-bottom: 1px solid #e0e0e0;
border-right: 1px solid #e0e0e0;
transform: rotate(45deg);
}
@media (max-width: 768px) {
.ai-tooltip {
width: 240px;
bottom: 85px; 
right: 10px;
}
}