/* Frontend styles */
.wpwa-container {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Position-specific styles */
.wpwa-floating-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.wpwa-embed-bubble {
    display: inline-block;
}

.wpwa-embed-chat {
    display: block;
    max-width: 350px;
    margin: 0 auto;
}

/* Revert button styles */
.wpwa-button {
    background: #25D366;
    color: white;
    border-radius: 50px;
    padding: 10px 25px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.wpwa-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.wpwa-button-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpwa-text {
    font-size: 16px;
    font-weight: 500;
}

.wpwa-popup {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
}

.wpwa-header {
    background: #075E54;
    color: white;
    padding: 20px;
    position: relative;
}

.wpwa-header h3 {
    margin: 0 0 5px 0;
    font-size: 17px;
    font-weight: 600;
}

.wpwa-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.wpwa-close {
    position: absolute;
    right: 16px;
    top: 16px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.wpwa-close:hover {
    opacity: 1;
}

.wpwa-agents-list {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.wpwa-agent-card {
    border: 1px solid #E2E2E2;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    background: #fff;
}

.wpwa-agent-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.wpwa-agent-info {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.wpwa-agent-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background-color: #128C7E;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    margin-right: 12px;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wpwa-agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.wpwa-agent-details {
    flex: 1;
    min-width: 0;
}

.wpwa-agent-details h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f1f1f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpwa-department, .wpwa-hours {
    display: block;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpwa-chat-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: white;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.2);
}

.wpwa-chat-button:hover {
    background: #1fa855;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.3);
}

.wpwa-chat-icon {
    width: 18px;
    height: 18px;
}

/* Scrollbar styling */
.wpwa-agents-list::-webkit-scrollbar {
    width: 6px;
}

.wpwa-agents-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.wpwa-agents-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.wpwa-agents-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Hello message popup styles */
.wpwa-hello-popup {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 10px;
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 280px;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s ease;
    pointer-events: auto;
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
}

.wpwa-hello-popup:hover {
    background: #f8f8f8;
}

.wpwa-hello-popup:after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 24px;
    width: 14px;
    height: 14px;
    background: white;
    transform: rotate(45deg);
    border-right: 1px solid rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.wpwa-hello-popup.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.wpwa-hello-message {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

/* Add a close hint */
.wpwa-hello-message:after {
    content: '(Click to close)';
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    opacity: 0.8;
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    .wpwa-popup {
        width: calc(100vw - 32px);
        right: 16px;
    }
    
    .wpwa-agent-card {
        padding: 12px;
    }
    
    .wpwa-chat-button {
        padding: 8px 12px;
    }
    
    .wpwa-button {
        padding: 8px 20px;
    }
    
    .wpwa-text {
        font-size: 14px;
    }
    
    .wpwa-hello-popup {
        max-width: 240px;
        margin-bottom: 8px;
    }
} 

/* Position styles */
.wpwa-position-bottom-right {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.wpwa-position-bottom-left {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
}

.wpwa-position-top-right {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.wpwa-position-top-left {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
}

/* Adjust popup position based on button position */
.wpwa-position-bottom-left .wpwa-popup {
    right: auto;
    left: 0;
}

.wpwa-position-top-right .wpwa-popup {
    bottom: auto;
    top: 80px;
}

.wpwa-position-top-left .wpwa-popup {
    bottom: auto;
    top: 80px;
    right: auto;
    left: 0;
}

/* Adjust hello popup position */
.wpwa-position-bottom-left .wpwa-hello-popup {
    right: auto;
    left: 0;
}

.wpwa-position-bottom-left .wpwa-hello-popup:after {
    right: auto;
    left: 24px;
}

.wpwa-position-top-right .wpwa-hello-popup,
.wpwa-position-top-left .wpwa-hello-popup {
    bottom: auto;
    top: 100%;
    margin-bottom: 0;
    margin-top: 10px;
}

.wpwa-position-top-right .wpwa-hello-popup:after,
.wpwa-position-top-left .wpwa-hello-popup:after {
    bottom: auto;
    top: -8px;
    transform: rotate(-135deg);
}

.wpwa-position-top-left .wpwa-hello-popup {
    right: auto;
    left: 0;
}

.wpwa-position-top-left .wpwa-hello-popup:after {
    right: auto;
    left: 24px;
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    .wpwa-position-bottom-right,
    .wpwa-position-bottom-left {
        bottom: 10px;
    }
    
    .wpwa-position-bottom-right {
        right: 10px;
    }
    
    .wpwa-position-bottom-left {
        left: 10px;
    }
    
    .wpwa-position-top-right,
    .wpwa-position-top-left {
        top: 10px;
    }
    
    .wpwa-position-top-right {
        right: 10px;
    }
    
    .wpwa-position-top-left {
        left: 10px;
    }
} 