.wpos-container {
    position: fixed;
    bottom: 24px;
    z-index: 999999;
    direction: rtl;
    text-align: right;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 12px;
    transition: left 0.3s ease, right 0.3s ease;
}
.wpos-container.pos-left {
    left: 24px;
    right: auto;
}
.wpos-container.pos-right {
    right: 24px;
    left: auto;
}
.wpos-toggle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--wpos-grad);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 3;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    border-radius: 100% !important;
}
.wpos-toggle:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.wpos-toggle svg {
    width: 28px;
    height: 28px;
    fill: #fff;
    position: absolute;
    transition: transform 0.3s ease, opacity 0.25s ease;
}
.wpos-toggle .wpos-ic-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
}
.wpos-online-indicator-dot {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 15px;
    height: 15px;
    background: #00e676;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.8);
    animation: wposIndicatorPulse 1.5s infinite alternate;
    z-index: 5;
    pointer-events: none;
}
@keyframes wposIndicatorPulse {
    0% { transform: scale(0.9); box-shadow: 0 0 4px rgba(0, 230, 118, 0.5); }
    100% { transform: scale(1.1); box-shadow: 0 0 12px rgba(0, 230, 118, 0.9); }
}
.wpos-pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--wpos-primary);
    opacity: 0.35;
    animation: wposPulse 2.2s infinite ease-out;
    pointer-events: none;
}
@keyframes wposPulse {
    0% { transform: scale(1); opacity: 0.8; }
    70% { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}
.wpos-panel {
    width: 325px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16);
    overflow: hidden;
    position: absolute;
    bottom: 80px;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}
.wpos-container.pos-left .wpos-panel {
    left: 0;
    right: auto;
    transform-origin: bottom left;
    transform: scale(0.85) translateY(20px);
}
.wpos-container.pos-right .wpos-panel {
    right: 0;
    left: auto;
    transform-origin: bottom right;
    transform: scale(0.85) translateY(20px);
}
.wpos-container.open .wpos-panel {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}
.wpos-container.open .wpos-toggle {
    background: #333333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.wpos-container.open .wpos-toggle .wpos-ic-chat {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
}
.wpos-container.open .wpos-toggle .wpos-ic-close {
    opacity: 1;
    transform: rotate(0) scale(1);
}
.wpos-header {
    background: var(--wpos-grad);
    padding: 20px 16px 16px;
    text-align: center;
    color: #ffffff;
    position: relative;
    flex-shrink: 0;
}
.wpos-header::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    top: -50px;
    left: -40px;
    pointer-events: none;
}
.wpos-logo {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255,255,255,0.35);
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.wpos-logo svg {
    width: 26px;
    height: 26px;
    fill: #ffffff;
}
.wpos-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wpos-header h2 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 4px 0 !important;
    color: #ffffff !important;
}
.wpos-header p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 !important;
    line-height: 1.5;
}
.wpos-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}
.wpos-dot {
    width: 8px;
    height: 8px;
    background: #69f0ae;
    border-radius: 50%;
    animation: wposBlink 1.8s infinite ease-in-out;
}
@keyframes wposBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.wpos-status-row span {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.9);
}
.wpos-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.wpos-tab {
    flex: 1;
    padding: 10px 2px 8px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #94a3b8;
    border-bottom: 3px solid transparent;
    transition: all 0.25s ease;
}
.wpos-tab svg {
    width: 18px;
    height: 18px;
    fill: #cbd5e1;
    transition: fill 0.25s ease;
}
.wpos-tab.active {
    color: var(--wpos-dark);
    border-bottom-color: var(--wpos-dark);
    background: #ffffff;
}
.wpos-tab.active svg {
    fill: var(--wpos-dark);
}
.wpos-tab:hover:not(.active) {
    background: #f1f5f9;
    color: #64748b;
}
.wpos-content {
    overflow-y: auto;
    flex: 1;
    height: 255px;
    max-height: 255px;
    background: #ffffff;
}
.wpos-pane {
    display: none;
    padding: 12px 10px;
}
.wpos-pane.active {
    display: block;
}
.wp-card-item {
    background: #fafafa;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 8px;
}
.wp-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.wp-card-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f1f5f9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wp-card-avatar svg {
    width: 20px;
    height: 20px;
    fill: #94a3b8;
}
.wp-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wp-card-details {
    flex: 1;
}
.wp-card-details strong {
    display: block;
    font-size: 12.5px;
    color: #1e293b;
    font-weight: 700;
}
.wp-card-details span {
    font-size: 10px;
    color: #64748b;
}
.wp-card-actions {
    display: flex;
    gap: 6px;
}
.wp-action-btn {
    flex: 1;
    padding: 6px;
    border-radius: 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform 0.2s;
}
.wp-action-btn:active {
    transform: scale(0.97);
}
.wpos-btn-tel {
    background: var(--wpos-primary);
    color: #ffffff !important;
}
.wpos-btn-wa {
    background: #25d366;
    color: #ffffff !important;
}
.wpos-msg-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fafafa;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 8px 10px;
    margin-bottom: 8px;
    text-decoration: none !important;
    transition: transform 0.2s, background-color 0.2s;
}
.wpos-msg-card:hover {
    transform: translateX(-2px);
    background: #f8fafc;
}
.wpos-msg-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wpos-msg-icon svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
}
.wpos-msg-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}
.wpos-msg-whatsapp .wpos-msg-icon { background: #25d366; }
.wpos-msg-telegram .wpos-msg-icon { background: #0088cc; }
.wpos-msg-instagram .wpos-msg-icon { background: linear-gradient(135deg,#833ab4,#fd1d1d,#fcb045); }
.wpos-msg-custom .wpos-msg-icon { background: #64748b; }

.wpos-msg-meta {
    flex: 1;
}
.wpos-msg-meta strong {
    display: block;
    font-size: 12px;
    color: #1e293b;
}
.wpos-msg-meta span {
    font-size: 10px;
    color: #64748b;
}
.wpos-msg-arrow svg {
    width: 16px;
    height: 16px;
    fill: #94a3b8;
}
.wpos-map-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
}
.wpos-map-btn {
    padding: 8px;
    border-radius: 8px;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none !important;
    color: #ffffff !important;
    transition: opacity 0.2s;
}
.wpos-map-btn:hover { opacity: 0.9; }
.wpos-map-btn.neshan { background: #1976d2; }
.wpos-map-btn.balad { background: #388e3c; }
.wpos-map-btn.google { background: #ea4335; }

.wpos-address-box {
    display: flex;
    gap: 8px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px;
    font-size: 11px;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 8px;
}
.wpos-address-box svg {
    width: 16px;
    height: 16px;
    fill: var(--wpos-primary);
    flex-shrink: 0;
    margin-top: 2px;
}
.wpos-workhours {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff8e1;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 11px;
    color: #b7791f;
}
.wpos-workhours svg {
    width: 14px;
    height: 14px;
    fill: #b7791f;
    flex-shrink: 0;
}
.wpos-faq-item {
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    margin-bottom: 6px;
    overflow: hidden;
}
.wpos-faq-q {
    width: 100%;
    padding: 10px;
    background: #fafafa;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 11.5px;
    color: #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    transition: background 0.2s;
}
.wpos-faq-q:hover {
    background: #f1f5f9;
}
.wpos-faq-q svg {
    width: 14px;
    height: 14px;
    fill: #94a3b8;
    transition: transform 0.25s ease;
}
.wpos-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.2s ease;
    font-size: 11px;
    color: #475569;
    line-height: 1.8;
    background: #ffffff;
    padding: 0 10px;
}
.wpos-faq-item.open .wpos-faq-q {
    background: #fff5f5;
    color: var(--wpos-dark);
}
.wpos-faq-item.open .wpos-faq-q svg {
    transform: rotate(180deg);
    fill: var(--wpos-dark);
}
.wpos-faq-item.open .wpos-faq-a {
    max-height: 180px;
    padding: 8px 10px 10px;
    border-top: 1px solid #fff5f5;
}
.wpos-empty-msg {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    padding: 30px 10px;
}
.wpos-footer {
    text-align: center;
    padding: 8px;
    font-size: 9px;
    color: #cbd5e1;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
    flex-shrink: 0;
}