/* ===== Widget Base ===== */
.chatgvt-widget {
    position: fixed;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.chatgvt-widget.chatgvt-bottom-right { bottom: 24px; right: 24px; }
.chatgvt-widget.chatgvt-bottom-left  { bottom: 24px; left: 24px; }
.chatgvt-widget.chatgvt-top-right    { top: 24px; right: 24px; }
.chatgvt-widget.chatgvt-top-left     { top: 24px; left: 24px; }

/* ===== FAB Button ===== */
.chatgvt-fab {
    width: var(--chatgvt-size, 60px);
    height: var(--chatgvt-size, 60px);
    cursor: pointer;
    position: relative;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chatgvt-fab:hover {
    transform: scale(1.08);
}
.chatgvt-fab-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.chatgvt-fab-close {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ===== Badge ===== */
.chatgvt-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

/* ===== Popup ===== */
.chatgvt-popup {
    position: absolute;
    bottom: calc(var(--chatgvt-size, 60px) + 16px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.chatgvt-widget.chatgvt-bottom-left .chatgvt-popup {
    right: auto;
    left: 0;
}

.chatgvt-popup-header {
    background: #075e54;
    color: #fff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.chatgvt-popup-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
}
.chatgvt-popup-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}
.chatgvt-popup-close:hover { opacity: 1; }

.chatgvt-agents-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

/* ===== Agent Row — FULLY CLICKABLE ===== */
.chatgvt-agent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f0f0f0;
}
.chatgvt-agent-item:last-child { border-bottom: none; }
.chatgvt-agent-item:hover { background: #f5f5f5; }

.chatgvt-agent-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #e0e0e0;
}
.chatgvt-agent-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chatgvt-agent-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #075e54;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.chatgvt-agent-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.chatgvt-agent-name {
    font-size: 15px;
    font-weight: 600;
    color: #111;
}
.chatgvt-agent-role {
    font-size: 12px;
    color: #888;
}
.chatgvt-agent-msg {
    font-size: 12px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Action Buttons (inside row) ===== */
.chatgvt-agent-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.chatgvt-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s;
}
.chatgvt-call-btn {
    background: #3b82f6;
    color: #fff;
}
.chatgvt-call-btn:hover { background: #2563eb; }

.chatgvt-wa-icon {
    background: transparent;
    padding: 0;
    border-radius: 6px;
}
.chatgvt-wa-icon img {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: block;
}

.chatgvt-popup-footer {
    padding: 10px 18px;
    text-align: center;
    font-size: 11px;
    color: #aaa;
    border-top: 1px solid #f0f0f0;
}

/* ===== Agent Initial (when no photo) ===== */
.chatgvt-agent-initial {
    font-size: 18px;
}
